SlideShare a Scribd company logo
1 of 37
Lecture 7: Transformations and warping
CSCI 455: Computer Vision
Reading
• Szeliski: Chapter 3.6
Image alignment
Why don’t these image line up exactly?
What is the geometric relationship
between these two images?
?
Answer: Similarity transformation (translation, rotation, uniform scale)
What is the geometric relationship
between these two images?
?
What is the geometric relationship
between these two images?
Very important for creating mosaics!
First, we need to know what this transformation is.
Second, we need to figure out how to compute it using feature matches.
Richard Szeliski Image Stitching 7
Image Warping
• image filtering: change range of image
• g(x) = h(f(x))
• image warping: change domain of image
• g(x) = f(h(x))
f
x
h
g
x
f
x
h
g
x
Richard Szeliski Image Stitching 8
Image Warping
• image filtering: change range of image
• g(x) = h(f(x))
• image warping: change domain of image
• g(x) = f(h(x))
h
h
f
f g
g
Richard Szeliski Image Stitching 10
Parametric (global) warping
• Examples of parametric warps:
translation rotation aspect
Parametric (global) warping
• Transformation T is a coordinate-changing machine:
p’ = T(p)
• What does it mean that T is global?
– Is the same for any point p
– can be described by just a few numbers (parameters)
• Let’s consider linear xforms (can be represented by a 2x2 matrix):
T
p = (x,y) p’ = (x’,y’)
Common linear transformations
• Uniform scaling by s:
(0,0) (0,0)
What is the inverse?
Common linear transformations
• Rotation by angle θ (about the origin)
(0,0) (0,0)
What is the inverse?
For rotations:
θ
2x2 Matrices
• What types of transformations can be
represented with a 2x2 matrix?
2D mirror about Y axis?
2D mirror across line y = x?
• What types of transformations can be
represented with a 2x2 matrix?
2D Translation?
Translation is not a linear operation on 2D coordinates
NO!
2x2 Matrices
All 2D Linear Transformations
• Linear transformations are combinations of …
– Scale,
– Rotation,
– Shear, and
– Mirror
• Properties of linear transformations:
– Origin maps to origin
– Lines map to lines
– Parallel lines remain parallel
– Ratios are preserved
– Closed under composition


















y
x
dc
ba
y
x
'
'




















y
x
lk
ji
hg
fe
dc
ba
y
x
'
'
Homogeneous coordinates
Trick: add one more coordinate:
homogeneous image
coordinates
Converting from homogeneous coordinates
x
y
w
(x, y, w)
w = 1
(x/w, y/w, 1)
homogeneous plane
Translation
• Solution: homogeneous coordinates to the
rescue
Affine transformations
any transformation
represented by a 3x3 matrix
with last row [ 0 0 1 ] we call
an affine transformation
Basic affine transformations



















 











1100
0cossin
0sincos
1
'
'
y
x
y
x

































1100
10
01
1
'
'
y
x
t
t
y
x
y
x































1100
01
01
1
'
'
y
x
sh
sh
y
x
y
x
Translate
2D in-plane rotation Shear































1100
00
00
1
'
'
y
x
s
s
y
x
y
x
Scale
Affine Transformations
• Affine transformations are combinations of …
– Linear transformations, and
– Translations
• Properties of affine transformations:
– Origin does not necessarily map to origin
– Lines map to lines
– Parallel lines remain parallel
– Ratios are preserved
– Closed under composition

























w
y
x
fed
cba
w
y
x
100
'
'
Is this an affine transformation?
Where do we go from here?
affine transformation
what happens when we
mess with this row?
Projective Transformations aka
Homographies aka Planar Perspective Maps
Called a homography
(or planar perspective map)
Homographies
What happens when
the denominator is 0?
Points at infinity
Image warping with homographies
image plane in front image plane below
black area
where no pixel
maps to
Homographies
Homographies
• Homographies …
– Affine transformations, and
– Projective warps
• Properties of projective transformations:
– Origin does not necessarily map to origin
– Lines map to lines
– Parallel lines do not necessarily remain parallel
– Ratios are not preserved
– Closed under composition
Alternate formulation for
homographies
where the length of the vector [h00 h01 … h22] is 1
2D image transformations
These transformations are a nested set of groups
• Closed under composition and inverse is a member
Implementing image warping
• Given a coordinate xform (x’,y’) = T(x,y) and a
source image f(x,y), how do we compute an
xformed image g(x’,y’) = f(T(x,y))?
f(x,y) g(x’,y’)
x x’
T(x,y)
y y’
Forward Warping
• Send each pixel f(x) to its corresponding
location (x’,y’) = T(x,y) in g(x’,y’)
f(x,y) g(x’,y’)
x x’
T(x,y)
• What if pixel lands “between” two pixels?
y y’
Forward Warping
• Send each pixel f(x,y) to its corresponding
location x’ = h(x,y) in g(x’,y’)
f(x,y) g(x’,y’)
x x’
T(x,y)
• What if pixel lands “between” two pixels?
• Answer: add “contribution” to several pixels,
normalize later (splatting)
• Can still result in holes
y y’
Inverse Warping
• Get each pixel g(x’,y’) from its corresponding
location (x,y) = T-1(x,y) in f(x,y)
f(x,y) g(x’,y’)
x x’
T-1(x,y)
• Requires taking the inverse of the transform
• What if pixel comes from “between” two pixels?
y y’
Inverse Warping
• Get each pixel g(x’) from its corresponding
location x’ = h(x) in f(x)
• What if pixel comes from “between” two pixels?
• Answer: resample color value from interpolated
(prefiltered) source image
f(x,y) g(x’,y’)
x x’
y y’
T-1(x,y)
Interpolation
• Possible interpolation filters:
– nearest neighbor
– bilinear
– bicubic
– sinc
• Needed to prevent “jaggies”
and “texture crawl”
(with prefiltering)
Questions?

More Related Content

What's hot

03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIPbabak danyal
 
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPTHOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPTAhtesham Ullah khan
 
Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction Ulaş Bağcı
 
Object Detection & Tracking
Object Detection & TrackingObject Detection & Tracking
Object Detection & TrackingAkshay Gujarathi
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsasodariyabhavesh
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
Computer Vision Structure from motion
Computer Vision Structure from motionComputer Vision Structure from motion
Computer Vision Structure from motionWael Badawy
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and RepresentationAmnaakhaan
 
Point processing
Point processingPoint processing
Point processingpanupriyaa7
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationMostafa G. M. Mostafa
 

What's hot (20)

03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
 
Deep Learning for Computer Vision: Object Detection (UPC 2016)
Deep Learning for Computer Vision: Object Detection (UPC 2016)Deep Learning for Computer Vision: Object Detection (UPC 2016)
Deep Learning for Computer Vision: Object Detection (UPC 2016)
 
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPTHOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
 
Application of image processing
Application of image processingApplication of image processing
Application of image processing
 
Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction
 
raycasting. ppt
raycasting. pptraycasting. ppt
raycasting. ppt
 
Object Detection & Tracking
Object Detection & TrackingObject Detection & Tracking
Object Detection & Tracking
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
 
fractals
fractalsfractals
fractals
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Computer Vision Structure from motion
Computer Vision Structure from motionComputer Vision Structure from motion
Computer Vision Structure from motion
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Point processing
Point processingPoint processing
Point processing
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image processing
Image processingImage processing
Image processing
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 

Similar to Computer Vision transformations

Similar to Computer Vision transformations (20)

lec07_transformations.pptx
lec07_transformations.pptxlec07_transformations.pptx
lec07_transformations.pptx
 
07 cie552 image_mosaicing
07 cie552 image_mosaicing07 cie552 image_mosaicing
07 cie552 image_mosaicing
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
 
04transformation2d
04transformation2d04transformation2d
04transformation2d
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Transformations in Computer Graphics
Transformations in Computer GraphicsTransformations in Computer Graphics
Transformations in Computer Graphics
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-online
 
transformations.pdf
transformations.pdftransformations.pdf
transformations.pdf
 
2d transformations
2d transformations2d transformations
2d transformations
 
2 transformation computer graphics
2 transformation computer graphics2 transformation computer graphics
2 transformation computer graphics
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
Function transformations
Function transformationsFunction transformations
Function transformations
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
 
Cs8092 computer graphics and multimedia unit 2
Cs8092 computer graphics and multimedia unit 2Cs8092 computer graphics and multimedia unit 2
Cs8092 computer graphics and multimedia unit 2
 

More from Wael Badawy

HTML introduction
HTML introduction HTML introduction
HTML introduction Wael Badawy
 
Np complete reductions
Np complete reductionsNp complete reductions
Np complete reductionsWael Badawy
 
N F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite AutomataN F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite AutomataWael Badawy
 
Computer Vision Cameras
Computer Vision CamerasComputer Vision Cameras
Computer Vision CamerasWael Badawy
 
Computer Vision Gans
Computer Vision GansComputer Vision Gans
Computer Vision GansWael Badawy
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classificationWael Badawy
 
Universal turing
Universal turing Universal turing
Universal turing Wael Badawy
 
Turing variations
Turing variations Turing variations
Turing variations Wael Badawy
 
Time complexity
Time complexity Time complexity
Time complexity Wael Badawy
 
Regular pumping
Regular pumping Regular pumping
Regular pumping Wael Badawy
 
Regular pumping examples
Regular pumping examples Regular pumping examples
Regular pumping examples Wael Badawy
 
Regular properties
Regular propertiesRegular properties
Regular propertiesWael Badawy
 
Regular expressions
Regular expressions Regular expressions
Regular expressions Wael Badawy
 
Pushdown Automota
Pushdown Automota Pushdown Automota
Pushdown Automota Wael Badawy
 
Pda accept context free
Pda accept context freePda accept context free
Pda accept context freeWael Badawy
 
Computer Vision sfm
Computer Vision sfmComputer Vision sfm
Computer Vision sfmWael Badawy
 
Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometricWael Badawy
 
Computer vision - light
Computer vision - lightComputer vision - light
Computer vision - lightWael Badawy
 

More from Wael Badawy (20)

HTML introduction
HTML introduction HTML introduction
HTML introduction
 
Np complete reductions
Np complete reductionsNp complete reductions
Np complete reductions
 
N F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite AutomataN F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite Automata
 
Parsers -
Parsers -Parsers -
Parsers -
 
Computer Vision Cameras
Computer Vision CamerasComputer Vision Cameras
Computer Vision Cameras
 
Computer Vision Gans
Computer Vision GansComputer Vision Gans
Computer Vision Gans
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classification
 
Universal turing
Universal turing Universal turing
Universal turing
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing variations
Turing variations Turing variations
Turing variations
 
Time complexity
Time complexity Time complexity
Time complexity
 
Regular pumping
Regular pumping Regular pumping
Regular pumping
 
Regular pumping examples
Regular pumping examples Regular pumping examples
Regular pumping examples
 
Regular properties
Regular propertiesRegular properties
Regular properties
 
Regular expressions
Regular expressions Regular expressions
Regular expressions
 
Pushdown Automota
Pushdown Automota Pushdown Automota
Pushdown Automota
 
Pda accept context free
Pda accept context freePda accept context free
Pda accept context free
 
Computer Vision sfm
Computer Vision sfmComputer Vision sfm
Computer Vision sfm
 
Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometric
 
Computer vision - light
Computer vision - lightComputer vision - light
Computer vision - light
 

Recently uploaded

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 

Recently uploaded (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 

Computer Vision transformations

  • 1. Lecture 7: Transformations and warping CSCI 455: Computer Vision
  • 3. Image alignment Why don’t these image line up exactly?
  • 4. What is the geometric relationship between these two images? ? Answer: Similarity transformation (translation, rotation, uniform scale)
  • 5. What is the geometric relationship between these two images? ?
  • 6. What is the geometric relationship between these two images? Very important for creating mosaics! First, we need to know what this transformation is. Second, we need to figure out how to compute it using feature matches.
  • 7. Richard Szeliski Image Stitching 7 Image Warping • image filtering: change range of image • g(x) = h(f(x)) • image warping: change domain of image • g(x) = f(h(x)) f x h g x f x h g x
  • 8. Richard Szeliski Image Stitching 8 Image Warping • image filtering: change range of image • g(x) = h(f(x)) • image warping: change domain of image • g(x) = f(h(x)) h h f f g g
  • 9. Richard Szeliski Image Stitching 10 Parametric (global) warping • Examples of parametric warps: translation rotation aspect
  • 10. Parametric (global) warping • Transformation T is a coordinate-changing machine: p’ = T(p) • What does it mean that T is global? – Is the same for any point p – can be described by just a few numbers (parameters) • Let’s consider linear xforms (can be represented by a 2x2 matrix): T p = (x,y) p’ = (x’,y’)
  • 11. Common linear transformations • Uniform scaling by s: (0,0) (0,0) What is the inverse?
  • 12. Common linear transformations • Rotation by angle θ (about the origin) (0,0) (0,0) What is the inverse? For rotations: θ
  • 13. 2x2 Matrices • What types of transformations can be represented with a 2x2 matrix? 2D mirror about Y axis? 2D mirror across line y = x?
  • 14. • What types of transformations can be represented with a 2x2 matrix? 2D Translation? Translation is not a linear operation on 2D coordinates NO! 2x2 Matrices
  • 15. All 2D Linear Transformations • Linear transformations are combinations of … – Scale, – Rotation, – Shear, and – Mirror • Properties of linear transformations: – Origin maps to origin – Lines map to lines – Parallel lines remain parallel – Ratios are preserved – Closed under composition                   y x dc ba y x ' '                     y x lk ji hg fe dc ba y x ' '
  • 16. Homogeneous coordinates Trick: add one more coordinate: homogeneous image coordinates Converting from homogeneous coordinates x y w (x, y, w) w = 1 (x/w, y/w, 1) homogeneous plane
  • 17. Translation • Solution: homogeneous coordinates to the rescue
  • 18. Affine transformations any transformation represented by a 3x3 matrix with last row [ 0 0 1 ] we call an affine transformation
  • 19. Basic affine transformations                                 1100 0cossin 0sincos 1 ' ' y x y x                                  1100 10 01 1 ' ' y x t t y x y x                                1100 01 01 1 ' ' y x sh sh y x y x Translate 2D in-plane rotation Shear                                1100 00 00 1 ' ' y x s s y x y x Scale
  • 20. Affine Transformations • Affine transformations are combinations of … – Linear transformations, and – Translations • Properties of affine transformations: – Origin does not necessarily map to origin – Lines map to lines – Parallel lines remain parallel – Ratios are preserved – Closed under composition                          w y x fed cba w y x 100 ' '
  • 21. Is this an affine transformation?
  • 22. Where do we go from here? affine transformation what happens when we mess with this row?
  • 23. Projective Transformations aka Homographies aka Planar Perspective Maps Called a homography (or planar perspective map)
  • 26. Image warping with homographies image plane in front image plane below black area where no pixel maps to
  • 28. Homographies • Homographies … – Affine transformations, and – Projective warps • Properties of projective transformations: – Origin does not necessarily map to origin – Lines map to lines – Parallel lines do not necessarily remain parallel – Ratios are not preserved – Closed under composition
  • 29. Alternate formulation for homographies where the length of the vector [h00 h01 … h22] is 1
  • 30. 2D image transformations These transformations are a nested set of groups • Closed under composition and inverse is a member
  • 31. Implementing image warping • Given a coordinate xform (x’,y’) = T(x,y) and a source image f(x,y), how do we compute an xformed image g(x’,y’) = f(T(x,y))? f(x,y) g(x’,y’) x x’ T(x,y) y y’
  • 32. Forward Warping • Send each pixel f(x) to its corresponding location (x’,y’) = T(x,y) in g(x’,y’) f(x,y) g(x’,y’) x x’ T(x,y) • What if pixel lands “between” two pixels? y y’
  • 33. Forward Warping • Send each pixel f(x,y) to its corresponding location x’ = h(x,y) in g(x’,y’) f(x,y) g(x’,y’) x x’ T(x,y) • What if pixel lands “between” two pixels? • Answer: add “contribution” to several pixels, normalize later (splatting) • Can still result in holes y y’
  • 34. Inverse Warping • Get each pixel g(x’,y’) from its corresponding location (x,y) = T-1(x,y) in f(x,y) f(x,y) g(x’,y’) x x’ T-1(x,y) • Requires taking the inverse of the transform • What if pixel comes from “between” two pixels? y y’
  • 35. Inverse Warping • Get each pixel g(x’) from its corresponding location x’ = h(x) in f(x) • What if pixel comes from “between” two pixels? • Answer: resample color value from interpolated (prefiltered) source image f(x,y) g(x’,y’) x x’ y y’ T-1(x,y)
  • 36. Interpolation • Possible interpolation filters: – nearest neighbor – bilinear – bicubic – sinc • Needed to prevent “jaggies” and “texture crawl” (with prefiltering)