2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis.

Slides:



Advertisements
Similar presentations
Affine Transformations
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
Kinematics Pose (position and orientation) of a Rigid Body
1 Computer Graphics Chapter 6 2D Transformations.
Transformations II Week 2, Wed Jan 17
2D Geometric Transformations
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
3D Coordinate Systems and Transformations Revision 1
CS485/685 Computer Vision Prof. George Bebis
Computer Graphics with OpenGL 3e
Asma Kanwal Lecturer Department of Computer Science, GC University, Lahore Dr. Wajahat Mahmood Qazi Assistant Professor Department of Computer Science,
1 Computer Graphics Week7 -2D Rotation. 3-Rotation A shape can be rotated about any of the three axes. A rotation about the z-axis will actually rotate.
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Transformations Dr. Amy Zhang.
Lecture Notes: Computer Graphics.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
Part7: Geometric Transformations
1 2D Transformations 几何变换. 2 What is a transformation? A transformation is an operation that transforms or changes a shape (line, drawing etc.) There.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Geometric Transformations
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Transformations of Objects – 3D
3D transformations Dr Nicolas Holzschuch University of Cape Town Modified by Longin Jan Latecki
Geometric Objects and Transformation
CS654: Digital Image Analysis Lecture 6: Basic Transformations.
Transformation.
Introduction to Computer Graphics Geometric Transformations
Computer Graphics 3D Transformations. Translation.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
3-D Geometric Transformations
3D Geometric Transformation
3D Geometric Transformation
CSCI 425/ D Mathematical Preliminaries. CSCI 425/525 2 Coordinate Systems Z X Y Y X Z Right-handed coordinate system Left-handed coordinate system.
Affine Geometry.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Instructor: Mircea Nicolescu Lecture 9
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
2D Transformation Homogenous Coordinates Scale/Rotate/Reflect/Shear: X’ = XT Translate: X’ = X + T Multiple values for the same point e.g., (2, 3, 6)
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphic 2 D Transformation.
Image Warping 2D Geometric Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
FCC Graficación CAD/CAM 3D Transformations. Contents 1. Translation 2. Scaling 3. Rotation 4. Other Transformations.
Instructor: Dr. Shereen Aly Taie Basic Two-Dimensional Geometric Transformation 5.2 Matrix Representations and Homogeneous Coordinates 5.3 Inverse.
Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Transforms.
3. Transformation
Geometric Transformations Hearn & Baker Chapter 5
2D Transformations with Matrices
3D Geometric Transformations
Geometrical Transformations
3D transformations Dr Nicolas Holzschuch University of Cape Town
Transformations 2 University of British Columbia
TWO DIMENSIONAL TRANSFORMATION
The Pinhole Camera Model
Presentation transcript:

2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis

2D Translation Moves a point to a new location by adding translation amounts to the coordinates of the point. or

2D Translation (cont’d) To translate an object, translate every point of the object by the same amount.

2D Scaling Changes the size of the object by multiplying the coordinates of the points by scaling factors. or

2D Scaling (cont’d) Uniform vs non-uniform scaling Effect of scale factors:

2D Rotation Rotates points by an angle θ about origin (θ >0: counterclockwise rotation) From ABP triangle: From ACP’ triangle: A BC

2D Rotation (cont’d) From the above equations we have: or

Summary of 2D transformations Use homogeneous coordinates to express translation as matrix multiplication

Homogeneous coordinates Add one more coordinate: (x,y)  (x h, y h, w) Recover (x,y) by homogenizing (x h, y h, w): So, x h =xw, y h =yw, (x, y)  (xw, yw, w)

Homogeneous coordinates (cont’d) (x, y) has multiple representations in homogeneous coordinates: –w=1 (x,y)  (x,y,1) –w=2 (x,y)  (2x,2y,2) All these points lie on a line in the space of homogeneous coordinates !! projective space

2D Translation using homogeneous coordinates w=1

2D Translation using homogeneous coordinates (cont’d) Successive translations:

2D Scaling using homogeneous coordinates w=1

2D Scaling using homogeneous coordinates (cont’d) Successive scalings:

2D Rotation using homogeneous coordinates w=1

2D Rotation using homogeneous coordinates (cont’d) Successive rotations: or

Composition of transformations The transformation matrices of a series of transformations can be concatenated into a single transformation matrix. * Translate P 1 to origin * Perform scaling and rotation * Translate to P 2 Example:

Composition of transformations (cont’d) Important: preserve the order of transformations! translation + rotation rotation + translation

General form of transformation matrix Representing a sequence of transformations as a single transformation matrix is more efficient! (only 4 multiplications and 4 additions) translation rotation, scale

Special cases of transformations Rigid transformations –Involves only translation and rotation (3 parameters) –Preserve angles and lengths upper 2x2 submatrix is ortonormal

Example: rotation matrix

Special cases of transformations Similarity transformations –Involve rotation, translation, scaling (4 parameters) –Preserve angles but not lengths

Affine transformations Involve translation, rotation, scale, and shear (6 parameters) Preserve parallelism of lines but not lengths and angles.

2D shear transformation Shearing along x-axis: Shearing along y-axis changes object shape!

Affine Transformations Under certain assumptions, affine transformations can be used to approximate the effects of perspective projection! G. Bebis, M. Georgiopoulos, N. da Vitoria Lobo, and M. Shah, " Recognition by learning affine transformations", Pattern Recognition, Vol. 32, No. 10, pp , affine transformed object

Projective Transformations affine (6 parameters) projective (8 parameters)

3D Transformations Right-handed / left-handed systems

3D Transformations (cont’d) Positive rotation angles for right-handed systems: (counter-clockwise rotations)

Homogeneous coordinates Add one more coordinate: (x,y,z)  (x h, y h, z h,w) Recover (x,y,z) by homogenizing (x h, y h, z h,w): In general, x h =xw, y h =yw, z h =zw (x, y,z)  (xw, yw, zw, w) Each point (x, y, z) corresponds to a line in the 4D-space of homogeneous coordinates.

3D Translation

3D Scaling

3D Rotation Rotation about the z-axis:

3D Rotation (cont’d) Rotation about the x-axis:

3D Rotation (cont’d) Rotation about the y-axis

Change of coordinate systems Suppose that the coordinates of P 3 are given in the xyz coordinate system How can you compute its coordinates in the R x R y R z coordinate system? (1) (1) Recover the translation T and rotation R from R x R y R z to xyz. that aligns R x R y R z with xyz (2) (2) Apply T and R on P 3 to compute its coordinates in the R x R y R z system.

(1.1) Recover translation T If we know the coordinates of P 1 (i.e., origin of R x R y R z ) in the xyz coordinate system, then T is: –P 1x –P 1y –P 1z T= uxux uyuy uxux

(1.2) Recover rotation R u x, u y, u z are unit vectors in the xyz coordinate system. r x, r y, r z are unit vectors in the R x R y R z coordinate system (r x, r y, r z are represented in the xyz coordinate system) Find rotation R: r z  u z, r x  u x, and r y  u y R uxux uyuy uxux

Change of coordinate systems: recover rotation R (cont’d) uz=uz= ux=ux= uy=uy=

Thus, the rotation matrix R is given by:

Change of coordinate systems: recover rotation R (cont’d) Verify that it performs the correct mapping: r x  u x r y  u y r z  u z