Image Warping Image Mapping Image Mapping - Examples Forward - - PowerPoint PPT Presentation

image warping image mapping image mapping examples
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Image Warping

slide-2
SLIDE 2

Image Mapping

slide-3
SLIDE 3

Image Mapping - Examples

slide-4
SLIDE 4

Forward Mapping

slide-5
SLIDE 5

Forward Mapping - Disadvantages

slide-6
SLIDE 6

Example – Forward Mapping

Original Rotated

Zoom In

slide-7
SLIDE 7

Backward Mapping

𝑔"#

The Problem: (u,v) are not integers!

slide-8
SLIDE 8
slide-9
SLIDE 9
slide-10
SLIDE 10

Nearest Neighbor

slide-11
SLIDE 11
slide-12
SLIDE 12

Example - Nearest Neighbor

Original Rotated

Zoom In

slide-13
SLIDE 13

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)

slide-14
SLIDE 14

Bi-linear Interpolation

slide-15
SLIDE 15

Bi-linear Interpolation

slide-16
SLIDE 16

Bi-linear Interpolation

slide-17
SLIDE 17

Bi-linear Interpolation

slide-18
SLIDE 18

Example Bi-linear

Original Rotated

Zoom In

slide-19
SLIDE 19

Bi-cubic

(u,v)

  • Bicubic interpolates 16 closest neighbors (4x4 neighborhood)
  • The result is much more smooth
slide-20
SLIDE 20

Bi-cubic Interpolation

slide-21
SLIDE 21

Bi-cubic Interpolation

slide-22
SLIDE 22

Bi-cubic Interpolation

slide-23
SLIDE 23

Example Bi-cubic

Original Rotated

Zoom In

slide-24
SLIDE 24

Nearest Neighbor

slide-25
SLIDE 25

Bi-Linear Interpolation

slide-26
SLIDE 26

Bi-Cubic Interpolation

slide-27
SLIDE 27

Comparison

Nearest Neighbor Bi-linear Bi-cubic

slide-28
SLIDE 28

Direct Rotation

slide-29
SLIDE 29

Shear

slide-30
SLIDE 30

Shear

slide-31
SLIDE 31

Shear and Scale

Operating line by line, faster and simpler filters

slide-32
SLIDE 32

Shear

÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ y x A v u ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ y x T y x A B v u B s r

÷ ÷ ø ö ç ç è æ + = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ a a a a cos y sin x sin y

  • cos

x y x T s r

slide-33
SLIDE 33

Shear

÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ y) f(x, x y x A v u

A preserve columns

÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ v v) g(u, v u B s r

B preserve rows

slide-34
SLIDE 34

Shear

÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ y) f(x, y)) f(x, g(x, y) f(x, x B y x A B v u B s r

We get

a a cos y sin x s y) f(x, + = =

÷ ÷ ø ö ç ç è æ + = ÷ ÷ ø ö ç ç è æ = ÷ ÷ ø ö ç ç è æ a a a a cos y sin x sin y

  • cos

x y x T s r a a sin y cos x v) g(u,

  • =
slide-35
SLIDE 35

Shear

We need to express it in terms of u,v We know that x=u, and

a a cos y sin x y) f(x, v + = = a a sin y cos x v) g(u,

  • =

We get

a a a a cos sin u

  • v

cos sin x

  • v

y = =

slide-36
SLIDE 36

Shear

a a a a a a tan v sec u sin cos sin u

  • v
  • cos

u v) g(u,

  • =

=

We put it all together and get

slide-37
SLIDE 37

Shear

At last we get

÷ ÷ ø ö ç ç è æ + = ÷ ÷ ø ö ç ç è æ a a cos y sin x x y x A ÷ ÷ ø ö ç ç è æ

  • =

÷ ÷ ø ö ç ç è æ v tan v sec u v u B a a

slide-38
SLIDE 38

Shear

Using a large angle (80 degree)

slide-39
SLIDE 39

Shear

slide-40
SLIDE 40

Shear

slide-41
SLIDE 41

Shear

Second pass with Backward Mapping

slide-42
SLIDE 42

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

slide-43
SLIDE 43

Shear

÷ ÷ ø ö ç ç è æ

  • ÷

÷ ø ö ç ç è æ ÷ ÷ ø ö ç ç è æ

  • =

÷ ÷ ø ö ç ç è æ

  • 1

2 / tan 1 1 sin 1 1 2 / tan 1 cos sin sin cos a a a a a a a

The other solution is by using three shear transformations

We need Three passes instead of Two. But no scale! Just shift lines!

slide-44
SLIDE 44

Shear

Two first shears

slide-45
SLIDE 45

Shear

slide-46
SLIDE 46

Shear

slide-47
SLIDE 47

Shear

slide-48
SLIDE 48

Shear

slide-49
SLIDE 49

Shear