Geometric Primitives and Transformations
Geometric Primitives and Transformations
So that
2D Lines
Dof: 2
Preserves: Orientation
2D Rotation
Dof: 1
Preserves: Lengths
2D Rigid motion
Dof: 6
Preserves: Parallellism of lines
2D Projective transformation
Given an image
And a transformation function
A spatial transformation changes the image as
following:
Possible solution1:
Round the value and copy the pixel there (Create
cracks and holes)
Possible solution2:
Distribute the value among its n-neighbours in a
weighted fashion (Cause aliasing and blur)
Forward warp
Inverse warp
Advantages:
• No holes since s-1(x’) is defined for all values of x’
(in all the g(x’) domain)
Problems:
• The transformation function must be invertible (not
really a problem since our transformation matrix is
non-singular)
• Point sampling may still occur at non integer
locations
– This is a well studied problem: Image interpolation
Nearest-neighbour
interpolation
Interpolation: estimate the values using the
information from nearby samples
Nearest-neighbour:
Use the image value at the closest integer location
Nearest-neighbour
interpolation
NN-interpolation is very fast but creates artefacts
(blocks) especially if the transformation changes the
scale (ie.zooming)
Bilinear interpolation
Bilinear
NN-interpolation
interpolation