2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations...
-
date post
19-Dec-2015 -
Category
Documents
-
view
223 -
download
0
Transcript of 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations...
![Page 1: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/1.jpg)
2-D Geometry
![Page 2: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/2.jpg)
The Image Formation Pipeline
![Page 3: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/3.jpg)
Outline
Vector, matrix basics 2-D point transformations
Translation, scaling, rotation, shear Homogeneous coordinates and
transformations Homography, affine transformation
![Page 4: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/4.jpg)
Notes on Notation (a little different from book)
Vectors, points: x, v (assume column vectors) Matrices: R, T Scalars: x, a Axes, objects: X, Y, O Coordinate systems: W, C Number systems: R, Z Specials
Transpose operator: xT (as opposed to x0)
Identity matrix: Id Matrices/vectors of zeroes, ones: 0, 1
![Page 5: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/5.jpg)
Block Notation for Matrices Often convenient to write matrices in terms of
parts Smaller matrices for blocks Row, column vectors for ranges of entries on rows,
columns, respectively
E.g.: If A is 3 x 3 and :
![Page 6: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/6.jpg)
2-D Transformations
Types Scaling Rotation Shear Translation
Mathematical representation
![Page 7: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/7.jpg)
2-D Scaling
![Page 8: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/8.jpg)
2-D Scaling
![Page 9: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/9.jpg)
2-D Scaling
1
sx
Horizontal shift proportional to horizontal position
![Page 10: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/10.jpg)
2-D Scaling
1sy
Vertical shift proportional to vertical position
![Page 11: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/11.jpg)
2-D Scaling
![Page 12: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/12.jpg)
Matrix form of 2-D Scaling
![Page 13: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/13.jpg)
2-D Scaling
![Page 14: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/14.jpg)
2-D Rotation
![Page 15: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/15.jpg)
2-D Rotation
µ
![Page 16: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/16.jpg)
2-D Rotation
µ
![Page 17: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/17.jpg)
Matrix form of 2-D Rotation
µ
(this is a counterclockwise rotation; reverse signs of sines to get a clockwise one)
![Page 18: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/18.jpg)
Matrix form of 2-D Rotation
µ
![Page 19: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/19.jpg)
2-D Shear (Horizontal)
![Page 20: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/20.jpg)
2-D Shear (Horizontal)
Horizontal displacement proportional to vertical position
![Page 21: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/21.jpg)
2-D Shear (Horizontal)
(Shear factor h is positive for the figure above)
![Page 22: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/22.jpg)
2-D Shear (Horizontal)
![Page 23: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/23.jpg)
2-D Shear (Vertical)
![Page 24: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/24.jpg)
2-D Translation
![Page 25: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/25.jpg)
2-D Translation
![Page 26: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/26.jpg)
2-D Translation
![Page 27: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/27.jpg)
2-D Translation
![Page 28: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/28.jpg)
2-D Translation
![Page 29: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/29.jpg)
2-D Translation
![Page 30: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/30.jpg)
Representing Transformations
Note that we’ve defined translation as a vector addition but rotation, scaling, etc. as matrix multiplications
It’s inconvenient to have two different operations (addition and multiplication) for different forms of transformation
It would be desirable for all transformations to be expressed in a common, linear form (since matrix multiplications are linear transformations)
![Page 31: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/31.jpg)
Example: “Trick” of additional coordinate makes this possible
Old way:
New way:
![Page 32: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/32.jpg)
Translation Matrix
We can write the formula using this “expanded” transformation matrix as:
From now on, assume points are in this “expanded” form unless otherwise noted:
![Page 33: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/33.jpg)
Homogeneous Coordinates
“Expanded” form is called homogeneous coordinates or projective space
Technically, 2-D projective space P2 is defined as Euclidean space R3 ¡ (0, 0, 0)T
Change to projective space by adding a scale factor (usually but not always 1):
![Page 34: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/34.jpg)
Homogeneous Coordinates: Projective Space
Equivalence is defined up to scale, (non-zero for finite points)
Think of projective points in P2 as rays in R3,
where z coordinate is scale factor All Euclidean points along ray are “same” in this sense
![Page 35: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/35.jpg)
Leaving Projective Space
Can go back to non-homogeneous representation by dividing by scale factor and dropping extra coordinate:
This is the same as saying “Where does the ray
intersect the plane defined by z = 1”?
![Page 36: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/36.jpg)
Homogeneous Coordinates: Rotations, etc.
A 2-D rotation, scaling, shear or other transformation normally expressed by a 2 x 2 matrix R is written in homogeneous coordinates with the following 3 x 3 matrix:
The non-commutativity of matrix multiplication explains why different transformation orders give different results—i.e., RT TR
In homogeneous formIn homogeneous form
![Page 37: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/37.jpg)
Example: Transformations Don’t Commute
![Page 38: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/38.jpg)
Example: Transformations Don’t Commute
![Page 39: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/39.jpg)
Example: Transformations Don’t Commute
![Page 40: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/40.jpg)
Example: Transformations Don’t Commute
![Page 41: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/41.jpg)
2-D Transformations
Full-generality 3 x 3 homogeneous transformation is called a homography
![Page 42: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/42.jpg)
2-D Transformations
Full-generality 3 x 3 homogeneous transformation is called a homography
Translation components
![Page 43: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/43.jpg)
2-D Transformations
Full-generality 3 x 3 homogeneoustransformation is called a homography
Scale/rotation components
![Page 44: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/44.jpg)
2-D Transformations
Full-generality 3 x 3 homogeneous transformation is called a homography
Shear/rotation components
![Page 45: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/45.jpg)
2-D Transformations
Full-generality 3 x 3 homogeneous transformation is called a homography
Homogeneous scaling factor
![Page 46: 2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.](https://reader030.fdocuments.in/reader030/viewer/2022033105/56649d2b5503460f94a001d9/html5/thumbnails/46.jpg)
2-D Transformations
Full-generality 3 x 3 homogeneous transformation is called a homography
When these are zero (as they have been so far), H is an affine transformation