CS654: Digital Image Analysis Lecture 6: Basic Transformations.

12
CS654: Digital Image Analysis Lecture 6: Basic Transformations

Transcript of CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Page 1: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

CS654: Digital Image Analysis

Lecture 6: Basic Transformations

Page 2: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Recap of Lecture 5

• Different distance measures• D4, D8,Dm, Euclidean

•Application of distance transform• Shape matching

•Arithmetic and logical operations on images• Combining images

Page 3: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Today’s outline

• Basic mathematical transformations in 2-D and 3-D

• Translation

• Rotation

• Scaling

• Inverse transformation

• Perspective projection

• Cartesian and homogeneous co-ordinate system

Page 4: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Basic transformations in 2-D

• Translation

• Rotation

• Scaling

• Concatenate transformations

• Transformation about an arbitrary point

Page 5: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Rotation about a point other than the Origin

1. Translate the object so that the point of translation is moved to the origin

2. Rotate the relocated object as normal around the origin

3. Undo the translation in Step 1 to return the newly rotated object to its new rotated location.

Find the new end points of the line segment which connects the points (1,1) to (3,3) when it is rotated anti-clockwise about the point (1,1) through an angle of π/2.

Page 6: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Basic transformation in 3D: Translation

• Translation• Scaling• Rotation

About z-axis

x' = x*cos + y*siny' = -x*sin + y*cosz' = z

About x-axis

y' = y*cos + z*sinz' = -y*sin + z*cos x' = x

About z-axis

z' = z*cos + x*sin x' = -z*sin + x*cos y' = y

Page 7: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Commutative and non-commutative transformation

Non-Commutative• Non-uniform scale, rotate• Translate – scale• Rotate - translate

Commutative• Translate – translate• Scale – scale• Rotate – rotate• Uniform scaling – rotate

Page 8: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Inverse transformation

• Translation

• Scaling

Rotation

Page 9: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Perspective transformation

P(X,Y,Z)

PI(x,y)

Z

Y

X

World co-ordinate

Image co-ordinate

Given (X,Y,Z) and focal length of the camera can we determine the camera co-ordinate system?

Page 10: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Relation between camera coordinate and world coordinate

Using similar triangle concept compute the relation between world coordinate and camera coordinate

Page 11: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Homogeneous coordinate system

• Cartesian coordinate system (X,Y,Z)

• Homogeneous coordinate system (kX,kY,kZ,k)

• Perspective transformation matrix • Homogeneous camera coordinate system

• Cartesian camera coordinate system

Page 12: CS654: Digital Image Analysis Lecture 6: Basic Transformations.

Thank youNext Lecture: Camera Model and Imaging Geometry