ImageWarping
ImageMapping
ImageMapping- Examples
ForwardMapping
ForwardMapping- Disadvantages
Example– ForwardMappingOriginal Rotated
ZoomIn
BackwardMapping
𝑓"#
TheProblem:(u,v)arenotintegers!
NearestNeighbor
Example- NearestNeighborOriginal Rotated
ZoomIn
Bi-linearInterpolation• Bi-linearinterpolatesfourclosestpixels.• Theweightforeachpixelisproportionaltoitsdistancefromthesamplingpoint(x,y)
Bi-linearInterpolation
Bi-linearInterpolation
Bi-linearInterpolation
Bi-linearInterpolation
ExampleBi-linearOriginal Rotated
ZoomIn
Bi-cubic
(u,v)
• Bicubic interpolates16closestneighbors(4x4neighborhood)• Theresultismuchmoresmooth
Bi-cubicInterpolation
Bi-cubicInterpolation
Bi-cubicInterpolation
ExampleBi-cubicOriginal Rotated
ZoomIn
NearestNeighbor
Bi-LinearInterpolation
Bi-CubicInterpolation
ComparisonNearestNeighbor Bi-linear Bi-cubic
DirectRotation
Shear
Shear
ShearandScaleOperatinglinebyline,fasterandsimplerfilters
Shear
÷÷ø
öççè
æ=÷÷
ø
öççè
æyx
Avu
÷÷ø
öççè
æ=÷÷
ø
öççè
æ÷÷ø
öççè
æ=÷÷
ø
öççè
æ=÷÷
ø
öççè
æyx
Tyx
ABvu
Bsr
÷÷ø
öççè
æ+
=÷÷ø
öççè
æ=÷÷
ø
öççè
æaaaa
cosysinx siny -cosx
yx
Tsr
Shear
÷÷ø
öççè
æ=÷÷
ø
öççè
æ=÷÷
ø
öççè
æy)f(x,x
yx
Avu
Apreservecolumns
÷÷ø
öççè
æ=÷÷
ø
öççè
æ=÷÷
ø
öççè
ævv)g(u,
vu
Bsr
Bpreserverows
Shear
÷÷ø
öççè
æ=÷÷
ø
öççè
æ=÷÷
ø
öççè
æ÷÷ø
öççè
æ=÷÷
ø
öççè
æ=÷÷
ø
öççè
æy)f(x,y))f(x,g(x,
y)f(x,x
Byx
ABvu
Bsr
Wegetaa cosy sinx sy)f(x, +==
÷÷ø
öççè
æ+
=÷÷ø
öççè
æ=÷÷
ø
öççè
æaaaa
cosysinx siny -cosx
yx
Tsr
aa siny cosx v)g(u, -=
Shear
Weneedtoexpressitintermsofu,vWeknowthatx=u,and
aa cosy sinx y)f(x,v +==
aa siny cosx v)g(u, -=
Weget
aa
aa
cossinu -v
cossinx -vy ==
Shear
aaaaaa tanvsecu sin
cossinu -v-cosu v)g(u, -==
Weputitalltogetherandget
Shear
Atlastweget
÷÷ø
öççè
æ+
=÷÷ø
öççè
æaa cosy sinx
xyx
A
÷÷ø
öççè
æ -=÷÷
ø
öççè
æv
tanvsecu vu
Baa
Shear
Usingalargeangle(80degree)
Shear
Shear
Shear
SecondpasswithBackwardMapping
Shear
• Rotatein90degree,thenuseshearwithasmallangle
• Westillhaveascalefactorintheshearwhichcreateholes;onesolutionistousefilter
Shear
÷÷ø
öççè
æ -÷÷ø
öççè
æ÷÷ø
öççè
æ -=÷÷
ø
öççè
æ -10
2/tan11sin01
102/tan1
cossinsincos a
aa
aaaa
Theothersolutionisbyusingthreesheartransformations
WeneedThreepassesinsteadofTwo.Butnoscale!Justshiftlines!
Shear
Twofirstshears
Shear
Shear
Shear
Shear
Shear
Top Related