Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr. Engr. Sami ur Rahman Digital Image Processing Lecture 9: Rotation, Scaling, Shear, Affine Transformation.

Similar presentations


Presentation on theme: "Dr. Engr. Sami ur Rahman Digital Image Processing Lecture 9: Rotation, Scaling, Shear, Affine Transformation."— Presentation transcript:

1 Dr. Engr. Sami ur Rahman Digital Image Processing Lecture 9: Rotation, Scaling, Shear, Affine Transformation

2 University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 2 Courtesy Gonzalez and Woods

3 Transformation Transformations: Move and rotate objects, scaling, stretching Euclidean Transformations The Euclidean transformations are the most commonly used transformations. An Euclidean transformation is either a translation, a rotation, or a reflection. The angles and lengths remain constant. University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 3

4 Translation 012345 0000000 1014700 2014700 3014800 4000000 5000000 012345 0000000 1000147 2000147 3000148 4000000 5000000 012345 0000000 10 000 00 20 000 00 3014700 4014700 5014800 012345 0000000 10 000 00 20 00 000 30 00 147 4000147 5000148 University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 4

5 Translation 012345 0000000 1014700 2014700 3014800 4000000 5000000 012345 0000000 10 000 00 20 00 000 30 00 147 4000147 5000148 University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 5

6 Translation University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 6

7 Rotation (x, y) (x’, y’) x = r cos () y = r sin () x’ = r cos ( +  ) y’ = r sin ( +  ) Trig Identity… x’ = r cos() cos(  ) – r sin() sin(  ) y’ = r cos() sin(  ) + r sin() cos(  ) Substitute… x’ = x cos(  ) - y sin(  ) y’ = x sin(  ) + y cos(  ) r  x = r cos () y = r sin () x’ = r cos ( +  ) y’ = r sin ( +  ) r University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 7 Sin ( +  ) = sin cos  + cos sin  Sin ( -  ) = sin cos  - cos  sin cos ( +  ) = cos cos  - sin  sin cos ( -  ) = cos cos  +sin  sin

8 Rotation University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 8

9 Scaling University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 9 Scaling: Resizing an image

10 Scaling University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 10

11 Scaling University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 11 012345678910 000000000000 100014700000 200014700000 300014800000 400000000000 500000000000 600000000000 700000000000 800000000000 900000000000 0123456789 0 1 2 3 4 5 6 7 8 9 Rescaling and interpolation

12 Interpolation University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 12 Interpolation: Constructing new data points from existing data points Types of interpolation  Nearest neighbor interpolation  Linear interpolation  Bilinear interpolation  Polynomial interpolation  Piecewise constant interpolation  Spline interpolation

13 Shear University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 13 Shear: the deformation of a material substance in which parallel internal surfaces slide past one another Horizontal shearVertical shearNo shear

14 Shear University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 14 Horizontal shear Vertical shear

15 Affine Transformation University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 15 Affine transformation or affine map or an affinity:  A transformation which preserves straight lines (i.e., all points lying on a line initially still lie on a line after transformation)  Preserves ratios of distances between points lying on a straight line (e.g., the midpoint of a line segment remains the midpoint after transformation).midpoint  Does not necessarily preserve angles or lengths.

16 Thanks for your attention


Download ppt "Dr. Engr. Sami ur Rahman Digital Image Processing Lecture 9: Rotation, Scaling, Shear, Affine Transformation."

Similar presentations


Ads by Google