theory and practice of projective rectification richard i. hartley

19
Theory and Practice of Projective Rectification Richard I. Hartley Presented by Yinghua Hu

Upload: micheal

Post on 08-Jan-2016

51 views

Category:

Documents


0 download

DESCRIPTION

Theory and Practice of Projective Rectification Richard I. Hartley. Presented by Yinghua Hu. Goal. Apply 2D projective transformations on a pair of stereo images so that the epipolar lines in resulting images match and are parallel to the x-axis. Epipolar Line. u’. Y 2. X 2. Z 2. O 2. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Theory and Practice of Projective Rectification Richard I. Hartley

Theory and Practice of Projective Rectification

Richard I. Hartley

Presented by

Yinghua Hu

Page 2: Theory and Practice of Projective Rectification Richard I. Hartley

Goal

Apply 2D projective transformations on a pair of stereo images so that the epipolar lines in resulting images match and are parallel to the x-axis.

Page 3: Theory and Practice of Projective Rectification Richard I. Hartley

Stereo ConstraintsEpipolar Geometry

X1

Y1

Z1

O1

Image plane

Focal plane

M

u u’

Y2

X2

Z2O2

Epipolar Line

Epipole

Page 4: Theory and Practice of Projective Rectification Richard I. Hartley

Before rectification

Page 5: Theory and Practice of Projective Rectification Richard I. Hartley

Epipolar lines

Page 6: Theory and Practice of Projective Rectification Richard I. Hartley

After rectification

Page 7: Theory and Practice of Projective Rectification Richard I. Hartley

Some terms

Cofactor matrix A* A*A = AA*=det(A)I If A is an invertible matrix, A*≈(AT)-1

Skew symmetrix matrix Given a vector t = (tx, ty, tz)T

[t]× = [ 0 -tz ty

tz 0 -tx

- ty tx 0 ] [t]×s = t×s

Page 8: Theory and Practice of Projective Rectification Richard I. Hartley

Fundamental matrix

x’TFx = 0

Page 9: Theory and Practice of Projective Rectification Richard I. Hartley

Some Properties

F is the fundamental matrix corresponding to an ordered pair of images (J, J’) and p and p’ are the epipoles, then FT is the fundamental matrix corresponding to ima

ges (J’, J) F=[p’]×M=M* [p]×, M is non-singular and not unique Fp=0 and p’TF=0

Page 10: Theory and Practice of Projective Rectification Richard I. Hartley

Outline of the algorithm

Identify image-to-image matches ui ↔ ui’ between the two images.

Compute the fundamental matrix F and find epipoles p and p’ by Fp=0 and p’TF=0.

Select a projective transformation H’ that maps the epipole p’ to the point at infinity.

Find the matching projective transformation H that minimizes the disparity of the corresponding points.

Resample the two images J and J’ and generate the rectified images

Page 11: Theory and Practice of Projective Rectification Richard I. Hartley

Mapping epipole p’ to infinity

Required mapping H’ = GRT T translate a selected point u0 to the origin R rotate about the origin taking p’ to (f,0,1)T

G maps rotated p’ to infinity (f,0,0) The composite mapping H’ is to the first order

a rigid transformation in the neighborhood of u0

Choice of u0, center of the image or the center of all the corresponding points

Page 12: Theory and Practice of Projective Rectification Richard I. Hartley

Matching Transformations

The matching transformation H on the first image is of the form H = (I+H’p’aT)H’M, in which M can be computed by s

olving F=[p’]×M and a is a vector. It is shown that I+H’p’aT is an affine transformation of t

he form [x y z 0 1 0 0 0 1]

Least square minimization is used to find x,y,z which will minimize ∑d(Hui, H’ui’)2, so the disparity in x direction is also minimized.

Page 13: Theory and Practice of Projective Rectification Richard I. Hartley

Non Quasi-affine Transformation

Page 14: Theory and Practice of Projective Rectification Richard I. Hartley

Quasi-affine Transformation The line at infinity L∞ in the projective plane P2 consists of all

points with last coordinate equal to 0. A view window is a convex subset of the image plane. A projective transformation H is quasi-affine with respect to view

window W if H(W)∩L∞ = Ø Theorem 5.7 proves that for a quasi-affine transformation H’ on

W’ mapping p’ to infinity, and H be any matching projective transformation of H’ on W, there exists a subset W+ of view window W, such that H is quasi-affine with respect to W+ and W+ contains all the matching points in W corresponding to W’.

W+

W-

Page 15: Theory and Practice of Projective Rectification Richard I. Hartley

Resampling images

Firstly, determine the dimensions of the output images, a rectangle R containing H’(W’)∩H(W+). (When I implement it, I use a region containing H’(W’) U H(W+)).

For each pixel location in R, applying separately inverse transformation H-1 and H’-1 to find the corresponding location in images J and J’, interpolate the color values to get the rectified image pair.

Linear interpolation is adequate in most cases.

Page 16: Theory and Practice of Projective Rectification Richard I. Hartley

Scene Reconstruction

Without camera parameters, the scene can be reconstructed but there will remain projective distortion.

It is possible that the reconstructed images will be disconnected. To avoid this problem, a translation is done in x

direction in one of the images before reconstruction.

Page 17: Theory and Practice of Projective Rectification Richard I. Hartley

Applications Rectification may be used to detect changes in the

two images, simplifying image matching problem.

Page 18: Theory and Practice of Projective Rectification Richard I. Hartley

Main contribution

Rectify images based on corresponding points alone

Give a firm mathematical basis as well as a rapid practical algorithm

Page 19: Theory and Practice of Projective Rectification Richard I. Hartley

Doubt in this paper

Page 8, below equation 7Hp = (I+H’p’aT)H’Mp = (I+H’p’aT)H’p’

How? → = (I+aTH’p’)H’p’ ≈ H’p’

H’- 3×3 p’- 3×1 a - 3×1 H’p’aT - 3×3 aT- 1×3 aTH’p’ - 1×1