Image Warping Image Mapping Image Mapping - Examples Forward - PowerPoint PPT Presentation
Image Warping Image Mapping Image Mapping - Examples Forward Mapping Forward Mapping - Disadvantages Example Forward Mapping Original Rotated Zoom In Backward Mapping The Problem: (u,v) are not integers! "# Nearest Neighbor
Image Warping
Image Mapping
Image Mapping - Examples
Forward Mapping
Forward Mapping - Disadvantages
Example – Forward Mapping Original Rotated Zoom In
Backward Mapping The Problem: (u,v) are not integers! 𝑔 "#
Nearest Neighbor
Example - Nearest Neighbor Original Rotated Zoom In
Bi-linear Interpolation • Bi-linear interpolates four closest pixels. • The weight for each pixel is proportional to its distance from the sampling point (x,y)
Bi-linear Interpolation
Bi-linear Interpolation
Bi-linear Interpolation
Bi-linear Interpolation
Example Bi-linear Original Rotated Zoom In
Bi-cubic • Bicubic interpolates 16 closest neighbors (4x4 neighborhood) • The result is much more smooth (u,v)
Bi-cubic Interpolation
Bi-cubic Interpolation
Bi-cubic Interpolation
Example Bi-cubic Original Rotated Zoom In
Nearest Neighbor
Bi-Linear Interpolation
Bi-Cubic Interpolation
Comparison Nearest Neighbor Bi-cubic Bi-linear
Direct Rotation
Shear
Shear
Shear and Scale Operating line by line, faster and simpler filters
Shear a a æ ö æ ö æ ö r x x cos - y sin ç ÷ = ç ÷ = ç ÷ T ç ÷ ç ÷ ç ÷ a + a s y x sin y cos è ø è ø è ø æ ö æ ö æ ö æ ö æ ö r u x x ç ÷ ç ÷ = ç ÷ = ç ÷ = ç ÷ B B A T ç ÷ ç ÷ ç ÷ ç ÷ ç ÷ s v y y è ø è ø è ø è ø è ø æ ö æ ö u x ç ÷ ç ÷ = A ç ÷ ç ÷ v y è ø è ø
Shear A preserve columns æ ö æ ö æ ö u x x ç ÷ ç ÷ ç ÷ = = A ç ÷ ç ÷ ç ÷ v y f(x, y) è ø è ø è ø B preserve rows æ ö æ ö æ ö r u g(u, v) ç ÷ ç ÷ ç ÷ = = B ç ÷ ç ÷ ç ÷ s v v è ø è ø è ø
Shear a a æ ö æ ö æ ö r x x cos - y sin ç ÷ ç ÷ ç ÷ = = T ç ÷ ç ÷ ç ÷ a + a s y x sin y cos è ø è ø è ø æ ö æ ö æ ö æ ö æ ö æ ö r u x x g(x, f(x, y)) ç ÷ ç ÷ ç ÷ ç ÷ ç ÷ ç ÷ = = = = B B A B ç ÷ ç ÷ ç ÷ ç ÷ ç ÷ ç ÷ s v y f(x, y) f(x, y) è ø è ø è ø è ø è ø è ø We get = = a + a f(x, y) s x sin y cos = a - a g(u, v) x cos y sin
Shear = a - a g(u, v) x cos y sin We need to express it in terms of u,v We know that x=u, and = = a + a v f(x, y) x sin y cos We get a a v - x sin v - u sin = = y a a cos cos
Shear We put it all together and get a v - u sin = a a = a - a g(u, v) u cos - sin u sec v tan a cos
Shear At last we get æ ö æ ö x x ç ÷ ç ÷ = A ç ÷ ç ÷ a + a y x sin y cos è ø è ø a - a æ ö æ ö u u sec v tan ç ÷ ç ÷ = B ç ÷ ç ÷ v v è ø è ø
Shear Using a large angle (80 degree)
Shear
Shear
Shear Second pass with Backward Mapping
Shear • Rotate in 90 degree, then use shear with a small angle • We still have a scale factor in the shear which create holes; one solution is to use filter
Shear The other solution is by using three shear transformations a - a - a - a æ ö æ ö æ ö æ ö cos sin 1 tan / 2 1 0 1 tan / 2 ç ÷ ç ÷ ç ÷ ç ÷ = ç ÷ ç ÷ ç ÷ ç ÷ a a a sin cos 0 1 sin 1 0 1 è ø è ø è ø è ø We need Three passes instead of Two. But no scale! Just shift lines!
Shear Two first shears
Shear
Shear
Shear
Shear
Shear
Recommend
More recommend
Explore More Topics
Stay informed with curated content and fresh updates.