computer vision : cisc 4/689 going back a little cameras.ppt

16
Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Upload: olivia-stevens

Post on 05-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Going Back a little

• Cameras.ppt

Page 2: Computer Vision : CISC 4/689 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:

Page 3: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Assignment

• Program-1

• info-Link

• Data

Page 4: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Another app. : Automatic Homography H Estimation

• How to get correct correspondences without human intervention?

from Hartley & Zisserman

Page 5: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Computing a Homography

• 8 degrees of freedom in 3 x 3 matrix H, so at least n = 4 pairs of 2-D points are sufficient to determine it

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

DLT) 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

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

Lets Side-track

Page 6: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

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

Page 7: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

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 = H x to get destination pixel location

– Problem: Some destination pixels may not be “hit”, leaving holes

• Easy solution: Iterate over destination image and apply inverse transform x = H-1

x0 – Round off H-1

x0 to address “nearest” source pixel value– This ensures every destination pixel is filled in

Page 8: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Automatic H Estimation: Feature Extraction

• Find features in pair of images using corner detection—e.g., eigenvalue threshold of:

from Hartley & Zisserman

~500 features found

Page 9: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

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

Page 10: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

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

Page 11: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Automatic H Estimation: Initial Match Hypotheses

268 matched features (over SSD threshold) in left image pointing to locations of corresponding right image features

from Hartley & Zisserman

Page 12: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

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:

Page 13: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Automatic H Estimation: Outliers & Inliers after RANSAC

• 43 samples used with t = 1.25 pixels

117 outliers (² = 0.44) 151 inliersfrom Hartley & Zisserman

Page 14: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

A Short Review of Camera Calibration

Page 15: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Pinhole Camera Terminology

Camera center/ pinhole

Principal point/image center

Image point

Camera point

Focal length

Optical axis

Image plane

Page 16: Computer Vision : CISC 4/689 Going Back a little Cameras.ppt

Computer Vision : CISC 4/689

Calibration

• Slides (calibration.ppt)