Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
960 views

Computer Graphics 2D Affine Transformation

2D affine transformations include translations, rotations, scaling, and shearing. Any 2D affine transformation can be decomposed into these four transformations performed in sequence. Translations shift objects along a straight line. Rotations turn objects around a center point. Scaling enlarges or shrinks objects uniformly. Shearing skews objects by shifting coordinates linearly with the other coordinate. Three corresponding point pairs between images are sufficient to determine the affine transformation between them.

Uploaded by

abbaqnadeem
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
960 views

Computer Graphics 2D Affine Transformation

2D affine transformations include translations, rotations, scaling, and shearing. Any 2D affine transformation can be decomposed into these four transformations performed in sequence. Translations shift objects along a straight line. Rotations turn objects around a center point. Scaling enlarges or shrinks objects uniformly. Shearing skews objects by shifting coordinates linearly with the other coordinate. Three corresponding point pairs between images are sufficient to determine the affine transformation between them.

Uploaded by

abbaqnadeem
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

2D Affine Transformation

Presented By
Abbaq Nadeem
Topic
 2D Affine transformation
Affine Transformation

• Translation, Scaling, Rotation, Shearing are all affine


transformation
• Affine transformation – transformed point P’ (x’,y’) is a
linear combination of the original point P (x,y), i.e.
x m11 m12 m13 x
y  m21 m22 m23  y
1 0 0 1 1
• Any 2D affine transformation can be decomposed into a
rotation, followed by a scaling, followed by a shearing,
and followed by a translation.
Affine matrix = translation x shearing x scaling x rotation

4
2D Affine Transformations

y
x

x y

5
Translation
 Re-position a point along a straight line
 Given a point (x,y), and the translation distance
(tx,ty)

The new point: (x’, y’) (x’,y’)


x’ = x + tx
ty
y’ = y + ty (x,y)
tx

OR P’ = P + T where P’ = x’ p = x T = tx
y’ y ty

6
Translation
 How to translate an object with multiple
vertices?

Translate individual
vertices

7
2D Rotation

 Default rotation center: Origin (0,0)

q> 0 : Rotate counter clockwise


q

q< 0 : Rotate clockwise


q

8
2D Rotation

 How to rotate an object with multiple


vertices?

q
Rotate individual
Vertices

9
2D Scaling
(4,4)

(2,2) Sx = 2, Sy = 2

(2,2)
(1,1)

 Not only the object size is changed, it also moved!!


 Usually this is an undesirable effect

10
Shearing

 Y coordinates are unaffected, but x coordinates are


translated linearly with y
 That is: x 1 h 0 x
 y’ = y y = 0 1 0 * y
 x’ = x + y * h 1 0 0 1 1

11
Finding Affine Transformations
 Image of 3 points determines affine transformation

12
Finding Affine Transformations
 Image of 3 points determines affine transformation

13
Finding Affine Transformations
 Image of 3 points determines affine transformation
r P
p’
q r’
q’

14
Finding Affine Transformations
 Image of 3 points determines affine transformation

r P
p’
q r’
q’

What’s the corresponding point in


the right image?

15

You might also like