Você está na página 1de 16

Going Back a little

Cameras.ppt

Computer Vision : CISC 4/689

Applications of RANSAC: Solution for affine parameters


Affine transform of [x,y] to [u,v]:

Rewrite to solve for transform parameters:

Computer Vision : CISC 4/689

Assignment
Program-1
info-Link Data

Computer Vision : CISC 4/689

Another app. : Automatic Homography H Estimation


How to get correct correspondences without human intervention?

from Hartley & Zisserman

Computer Vision : CISC 4/689

Computing a Homography
Lets Side-track
8 degrees of freedom in 3 x 3 matrix H, so at least n points are sufficient to determine it
to compute H
Now stacked matrix A is 2n x 9 vs. 2n x 12 for camera matrix P estimation because all points are 2-D

= 4 pairs of 2-D

Use same basic algorithm for P (aka Direct Linear Transformation, or DLT)

3 collinear points in either image is a degenerate configuration preventing a unique solution

Computer Vision : CISC 4/689

Estimating H: DLT Algorithm


x0i = Hxi is an equation involving homogeneous vectors, so Hxi and x0i need only be in the same direction, not strictly equal
We can specify same directionality by using a cross product formulation:

See Hartley & Zisserman, Chapter 3.1-3.1.1 (linked on course page) for details

Computer Vision : CISC 4/689

Texture Mapping
Needed for nice display when applying transformations (like a homography H) to a whole image

Simple approach: Iterate over source image coordinates and apply x0 get destination pixel location
Problem: Some destination pixels may not be hit, leaving holes

= H x to
= H-1

Easy solution: Iterate over destination image and apply inverse transform x

x0
Round off H-1 x0 to address nearest source pixel value This ensures every destination pixel is filled in

Computer Vision : CISC 4/689

Automatic H Estimation: Feature Extraction


Find features in pair of images using corner detectione.g., eigenvalue threshold of:

from Hartley & Zisserman

Computer Vision : CISC 4/689

~500 features found

Automatic H Estimation: Finding Feature Matches


Best match over threshold within square search window (here 300 pixels) using SSD or normalized cross-correlation

from Hartley & Zisserman

Computer Vision : CISC 4/689

Automatic H Estimation: Finding Feature Matches


Best match over threshold within square search window (here 300 pixels) using SSD or normalized cross-correlation

from Hartley & Zisserman

Computer Vision : CISC 4/689

Automatic H Estimation: Initial Match Hypotheses

from Hartley & Zisserman

268 matched features (over SSD threshold) in left image pointing to locations of corresponding right image features
Computer Vision : CISC 4/689

Automatic H Estimation: Applying RANSAC


Sampling
Size: Recall that 4 correspondences suffice to define homography, so sample size

s=4
Choice Pick SSD threshold conservatively to minimize bad matches Disregard degenerate configurations Ensure points have good spatial distribution over image

Distance measure
Obvious choice is symmetric transfer error:

Computer Vision : CISC 4/689

Automatic H Estimation: Outliers & Inliers after RANSAC


43 samples used with t = 1.25 pixels

from Hartley & Zisserman

117 outliers (

= 0.44)

Computer Vision : CISC 4/689

151 inliers

A Short Review of Camera Calibration

Computer Vision : CISC 4/689

Pinhole Camera Terminology


Image plane
Optical axis Principal point/ image center

Focal length
Camera center/ pinhole Camera point Image point
Computer Vision : CISC 4/689

Calibration
Slides (calibration.ppt)

Computer Vision : CISC 4/689

Você também pode gostar