Prof. Amr Goneid Department of Computer Science & Engineering

Slides:



Advertisements
Similar presentations
By Cynthia Rodriguez University of Texas at San Antonio
Advertisements

Geometric Operations Move over rover. Geometric Operations  Previous operations have taken a sample at some location and changed the sample value (the.
Mapping: Scaling Rotation Translation Warp
Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.
1 Computer Graphics Chapter 6 2D Transformations.
Geometric Transformations CSE P 576 Larry Zitnick
CSci 6971: Image Registration Lecture 3: Images and Transformations January 20, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
Lecture 8: Geometric transformations CS4670: Computer Vision Noah Snavely.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
CS485/685 Computer Vision Prof. George Bebis
Lecture 9: Image alignment CS4670: Computer Vision Noah Snavely
Now Playing: Gong Sigur Rós From Takk... Released September 13, 2005.
© 2003 by Davi GeigerComputer Vision October 2003 L1.1 Structure-from-EgoMotion (based on notes from David Jacobs, CS-Maryland) Determining the 3-D structure.
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
CS 450: Computer Graphics 2D TRANSFORMATIONS
Digital Image Processing & Pattern Analysis (CSCE 563) Course Outline & Introduction Prof. Amr Goneid Department of Computer Science & Engineering The.
Image Stitching Ali Farhadi CSE 455
WP3 - 3D reprojection Goal: reproject 2D ball positions from both cameras into 3D space Inputs: – 2D ball positions estimated by WP2 – 2D table positions.
Spatial transformations
Chapter 3: Image Restoration Geometric Transforms.
Geometric transformations Affine transformations Forward mapping Interpolations schemes.
Geometric Operations and Morphing.
Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South.
Digital Image Processing Lecture 7: Geometric Transformation March 16, 2005 Prof. Charlene Tsai.
CSci 6971: Image Registration Lecture 3: Images and Transformations March 1, 2005 Prof. Charlene Tsai.
Digital Image and Video Coding 11. Basics of Video Coding H. Danyali
©College of Computer and Information Science, Northeastern University CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 12 – October 1, 2012.
Metrology 1.Perspective distortion. 2.Depth is lost.
Digital Image Processing Lecture 6: Image Geometry
Geometric transformations Affine transformations Forward mapping Interpolations schemes.
CVPR 2003 Tutorial Recognition and Matching Based on Local Invariant Features David Lowe Computer Science Department University of British Columbia.
CS482 Selected Topics in Digital Image Processing بسم الله الرحمن الرحيم Instructor: Dr. Abdullah Basuhail,CSD, FCIT, KAU, 1432H Chapter 2: Digital Image.
Geometric Transformations CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Dr. Engr. Sami ur Rahman Digital Image Processing Lecture 9: Rotation, Scaling, Shear, Affine Transformation.
GEOMETRIC OPERATIONS. Transformations and directions Affine (linear) transformations Translation, rotation and scaling Non linear (Warping transformations)
Digital Image Processing & Pattern Analysis (CSCE 563) Introduction to Pattern Analysis Prof. Amr Goneid Department of Computer Science & Engineering The.
J. Flusser, T. Suk, and B. Zitová Moments and Moment Invariants in Pattern Recognition The slides accompanying.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park.
Hough transform and geometric transform
© by Yu Hen Hu 1 ECE533 Digital Image Processing Image Geometry and Geometric Transformation.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Introduction to Medical Imaging Regis Introduction to Medical Imaging Registration Alexandre Kassel Course
Digital Image Processing
Image Warping 2D Geometric Transformations
Arithmetic and Geometric Transformations (Chapter 2) CS474/674 – Prof. Bebis.
CMSC5711 Image processing and computer vision
Chapter 6: Image Geometry 6.1 Interpolation of Data
COSC579: Image Align, Mosaic, Stitch
Image Geometry and Geometric Transformation
Outline Announcement Local operations (continued) Linear filters
Computer Vision Lecture 4: Color
CSCE 441: Computer Graphics Image Warping
CMSC5711 Image processing and computer vision
Recap from Friday Image Completion Synthesis Order Graph Cut Scene Completion.
Geometric Transformations
Lecture 3: Camera Rotations and Homographies
Geometric Transformations
Geometric Transformations
2D transformations (a.k.a. warping)
Geometric Transformations
© 2010 Cengage Learning Engineering. All Rights Reserved.
Introduction to Mathematical tools in used in DIP
Geometric Transformations
Image Stitching Linda Shapiro ECE/CSE 576.
Geometric Transformations
Translation in Homogeneous Coordinates
Image Stitching Linda Shapiro ECE P 596.
Geometric Transformations
Presentation transcript:

Digital Image Processing & Pattern Analysis (CSCE 563) Geometric Transformations Prof. Amr Goneid Department of Computer Science & Engineering The American University in Cairo

Geometric Transformations Image Cropping Interpolation Image Resizing Image Rotation Affine Transform Image Registration Prof. Amr Goneid, AUC

Image Cropping Cropping refers to the removal of the outer parts of an image to select a rectangular ROI. In MATLAB, The bounding rectangle is rect = [col,row,w,h] B = imcrop or [B , rect] = imcrop; uses mouse to define area B = imcrop(A,rect); Returns the cropped image defined by the bounding rectangle A B h w col,row Prof. Amr Goneid, AUC

Example: Top Left Quadrant load treesc; [n,m] = size(X); rect = [1,1,m/2,n/2]; B = imcrop(X,rect); subplot(2,1,1); imshow(X,map); subplot(2,1,2); imshow(B,map); Prof. Amr Goneid, AUC

Interpolation 2-D Interpolation Used in resizing and rotation Nearest Neighbor Interpolation (nearest) Bilinear Interpolation (bilinear) Bicubic Interpolation (bicubic) Prof. Amr Goneid, AUC

Interpolations Nearest Neighbor Bilinear Prof. Amr Goneid, AUC

Example:Bilinear interpolation (From Wikipedia) bilinear interpolation is an extension of linear interpolation for interpolating functions of two variables on a regular grid. The key idea is to perform linear interpolation first in one direction, and then again in the other direction. to find the value of the unknown function f at the point P = (x, y). It is assumed that we know the value of f at the four points Q11 = (x1, y1), Q12 = (x1, y2), Q21 = (x2, y1), and Q22 = (x2, y2). Prof. Amr Goneid, AUC

Example:Bilinear interpolation Linear interpolation in the x-direction interpolating in the y-direction This yields Prof. Amr Goneid, AUC

Bilinear interpolation In a coordinate system in which the four points are at (0, 0), (0, 1), (1, 0), and (1, 1), then in matrix form The result of bilinear interpolation is independent of the order of interpolation. If we had first performed the linear interpolation in the y-direction and then in the x-direction, the resulting approximation would be the same. Prof. Amr Goneid, AUC

Resizing using Interpolation No Interpolation Resize by 183% Original With Interpolation Prof. Amr Goneid, AUC

Resizing B = imresize(A,m,’method’) m = ratio Example: load clownc; B = imresize(X,3,’nearest’); C = imresize(X,0.3,’nearest’); subplot(3,1,1); imshow(X,map); subplot(3,1,2); imshow(B,map); subplot(3,1,3); imshow(C,map); Prof. Amr Goneid, AUC

Rotation B = imrotate(A,angle); or B = imrotate(A,angle,’crop’); angle is anti-clockwise (degrees) Example: load amber256; C = imrotate(X,45,'crop'); subplot(2,1,1); imshow(X,map); subplot(2,1,2); imshow(C,map); Prof. Amr Goneid, AUC

Affine Transform Let f be an image defined over (w,z) coordinate system, g is a geometric transformation of f with: (x , y) = T{(w , z)} Example: (x , y) = T{(w , z)} = (w/2 , z/2) This is shrinking f by ½ in both spatial dimensions. Prof. Amr Goneid, AUC

Affine Transform Prof. Amr Goneid, AUC

Affine Transform Commonly used transform is the Affine Transform, in matrix form: [x y 1] = [w z 1] T = [w z 1] Can produce scaling, translation, rotation and shear. Prof. Amr Goneid, AUC

Affine Transform Prof. Amr Goneid, AUC

Affine Transform MATLAB Example (scaling): T = [2 0 0; 0 3 0; 0 0 1]; tform = maketform(‘affine’ , T); wz = [1 1; 3 2]; xy = tformfwd(wz , tform); Result is xy = [2 3; 6 6]; Also: wz2 = tforminv(xy , tform); % inverse transform Prof. Amr Goneid, AUC

Affine Transform Examples: Scale Horizontally by 3 and vertically by 2 Shear T2 = [1 0 0; 0.2 1 0; 0 0 1]; Tscale = [1.5 0 0; 0 2 0; 0 0 1]; Trot = [cos(pi/4) sin(pi/4) 0; -sin(pi/4) cos(pi/4) 0; 0 0 1]; Tshear = [1 0 0; 0.2 1 0; 0 0 1]; T3 = Tscale * Trot * Tshear; Prof. Amr Goneid, AUC

Affine Transform Prof. Amr Goneid, AUC

Affine Transform Prof. Amr Goneid, AUC

Image Registration Image registration is the process of overlaying two or more images of the same scene taken at different times, from different viewpoints, and/or by different sensors. Applications: Change detection, Image fusion, Target recognition, Target localization, Depth perception, Image mosaicing, Motion estimation Prof. Amr Goneid, AUC

Image Registration CP CP Prof. Amr Goneid, AUC

Image Registration CP CP CP CP Prof. Amr Goneid, AUC

Image Registration (References) Image registration methods: a survey Barbara Zitova´*, Jan Flusser http://library.utia.cas.cz/prace/20030125.pdf Image Registration http://tango.andrew.cmu.edu/~gustavor/42431-intro-bioimaging/readings/ch8.pdf Image Registration in MATLAB http://www.mathworks.com/help/toolbox/images/f20-9579.html Prof. Amr Goneid, AUC