280 likes | 393 Views
Formation et Analyse d’Images Session 2. Daniela Hall 26 September 2005. Course Overview. Session 1: Overview Human vision Homogenous coordinates Camera models Session 2: Tensor notation Image transformations Homography computation Session 3: Reflection models Color spaces
E N D
Formation et Analyse d’ImagesSession 2 Daniela Hall 26 September 2005
Course Overview • Session 1: • Overview • Human vision • Homogenous coordinates • Camera models • Session 2: • Tensor notation • Image transformations • Homography computation • Session 3: • Reflection models • Color spaces • Session 4: • Pixel based image analysis • Session 5: • Gaussian filter operators • Scale Space
Course overview • Session 6: • Contrast description • Hough transform • Session 7: • Kalman filter • Session 8: • Tracking of regions, pixels, and lines • Session 9: • Stereo vision • Session 10: • Epipolar geometry • Session 11: exercises and questions
Trifocal Tensor • A tensor is used in 3d position estimation with multiple cameras. The (trifocal) tensor encapsulates all the (projective) geometric relations between 3 camera views independent of the scene. • Reference • book: R. Hartley, A.Zisserman: Multiple view geometry in computer vision, Appendix 1, Cambridge University Press, 2000 • Exists on-linehttp://www.robots.ox.ac.uk/~vgg/hzbook/hzbook1.html
Tensor notation • In tensor notation a superscript stands for a column vector • a subscript for a row vector (useful to specify lines) • A matrix is written as
Tensor notation • Tensor summation convention: • an index repeated as sub and superscript in a product represents summation over the range of the index. • Example:
Tensor notation • Scalar product can be written as • where the subscript has the same index as the superscript. This implicitly computes the sum. • This is commutative • Multiplication of a matrix and a vector • This means a change of P from the coordinate system i to the coordinate system j (transformation).
Line equation • In R2 a line is defined by the equation • In homogenous coordinates we can write this as • In tensor notation we can write this as
The tensor operator Eijk and Eijk • The tensor Eijk is defined for i,j,k=1,...,3 as odd even 1 2 3 2 3 1 3 1 2 3 2 1 1 3 2 2 1 3
Example • Line equation in tensor notation
Example • Intersection of two lines • L: l1x+l2y+l3=0, M: m1x+m2y+m3=0 • Intersection: • Tensor: • Result:
Classic Tensor notation T is a transformation from the system A to B Homogenous coordinates Translation
Homogenous coordinates Rotation • Classic • Tensor notation
Tsd Destination image Source image Image transformation For each position Pd in the destination image we search the pixel color I(Pd).
Tsd Destination image Source image Image transformation First we compute a position Ps in the source image.
Pd Ps1 Ps0 Ps Ps3 Ps2 Image transformation • P is not integer. • How do we compute I(Pd)=I(Ps)? • Answer: by a linear combination of the neighboring pixels I(Psi) (interpolation). Tsd
Interpolation methods • 0th order: take value of closest neighbor • fast, applied for binary images • 1st order: linear interpolation and bi-linear interpolation • 3rd order: cubic spline interpolation
intensity I(P) Ps0 Ps1 Ps Ps3 Ps2 Ps0 Ps1 Ps position P 1D linear interpolation Gradient Pixel color
2D linear interpolation intensity I(P) y Ps0 Ps1 I(Ps) Psy Ps Ps Ps3 Ps2 Ps1 x Psx Ps0 Gradient Pixel color
Ps0 Ps1 Ps Ps3 Ps2 Bi-linear interpolation The bilinear approach computes the weighted average of the four neighboring pixels. The pixels are weighted according to the area. D C A B
Higher order interpolation • Cubic spline interpolation takes into account more than only the closest pixels. • Result: more expensive to compute, but image has less artefacts, image is smoother.
Homographie: projection from one plane to another • Homographie HBA is bijective QB = HBA PA
Homography computation • H can be computed from 4 point correspondences. Rd1 Rd2 Ps1 Ps2 Ps3 Ps4 Rd3 Rd4 Destination image (rectified) Source image (observed)
Homography computation • H is 3x3 matrix and has 8 degrees of freedom (homogenous coordinates) • gives 8 equations and one solution for H.