CPSC 4040/6040 Computer Graphics Images
Joshua Levine levinej@clemson.edu
CPSC 4040/6040 Computer Graphics Images Joshua Levine - - PowerPoint PPT Presentation
CPSC 4040/6040 Computer Graphics Images Joshua Levine levinej@clemson.edu Lecture 20 Morphing Nov. 5, 2015 Slide Credits: Szymon Rusinkiewicz Frdo Durand Alexei Efros Yung-Yu Chung Some Final Thoughts on Warping and Sampling A Simple
Joshua Levine levinej@clemson.edu
Slide Credits: Szymon Rusinkiewicz Frédo Durand Alexei Efros Yung-Yu Chung
Scale(src, dst, sx, sy) { w max(1/sx,1/sy); for (int ix = 0; ix < xmax; ix++) { for (int iy = 0; iy < ymax; iy++) { float u = ix / sx; float v = iy / sy; dst(ix,iy) = Resample(src,u,v,k,w); } } } Source image Destination image (u,v) f (ix,iy)
Warp(src, dst) { for (int ix = 0; ix < xmax; ix++) { for (int iy = 0; iy < ymax; iy++) { float w 1 / scale(ix, iy); float u = fx-1(ix,iy); float v = fy-1(ix,iy); dst(ix,iy) = Resample(src,u,v,w); } } } Source image Destination image (u,v) (ix,iy) f
Warp(src, dst) { for (int iu = 0; iu < umax; iu++) { for (int iv = 0; iv < vmax; iv++) { float x = fx(iu,iv); float y = fy(iu,iv); float w 1 / scale(x, y); Splat(src(iu,iv),x,y,k,w); } } }
f
(iu,iv) (x,y) Source image Destination image
Warp(src, dst) { for (int iu = 0; iu < umax; iu++) { for (int iv = 0; iv < vmax; iv++) { float x = fx(iu,iv); float y = fy(iu,iv); float w 1 / scale(x, y); Splat(src(iu,iv),x,y,k,w); } } } (iu,iv) (x,y) Source image Destination image
Tuesday, February 14, 12
http://www.telegraph.co.uk/culture/culturevideo/filmvideo/film-clips/ 9937381/Willow-a-clip-of-the-morphing-sequence.html
http://youtu.be/nUDIoN-_Hxs
warping as a start and a finish
the intermediate steps as well
them!
Tuesday, February 14, 12
Tuesday, February 14, 12
Tuesday, February 14, 12
http://www.salavon.com/work/Class/
like?
reasonable, usually with required user/artist input
Image Average Object Average
x* x* T(x,y)# y* y* f(x,y)* g(x,y)*
?#
transform T?
x* x* T(x,y)* y* y*
?"
x* x* T(x,y)* y* y*
?"
+rotation?
x& x& T(x,y)& y& y&
?"
x* x* T(x,y)* y* y*
?"
projective?
Morphing procedure: For every intermediate step t,
we create a morphing sequence?
parameters
defined independently for every single location x,y!
each pixel (use backward warping with interpolation)
~history/Miscellaneous/darcy.html
%27Arcy_Wentworth_Thompson
evolution
the other.
for it!
T(x,y)#
?#
A) B) C) A) C) B)
Source) DesGnaGon)
interpolation
weighted average of the vertices of the triangles
bilinear interpolation of quads for warping
3 2 1 3 3 2 2 1 1
C w B w A w P
C B A
+ + =
C B A
Barycentric*coordinate*
http://youtu.be/F2AitTPI5U0?t=5m15s
Examples Each of these is an Euclidean warp, why?