Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park.

Similar presentations


Presentation on theme: "Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park."— Presentation transcript:

1 Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park

2 Outline Review Image Warping –Translation Keyframe Animation

3 Review Image Warping –Scaling –Rotation –Together with a 2X2 matrix

4 Image Processing 2-2 Image Warping (Translation) Lots of slides taken from Alexei Efros

5 Review: 2x2 Matrices What types of transformations can be represented with a 2x2 matrix? 2D Identity? 2D Scale around (0,0)?

6 Review: 2x2 Matrices What types of transformations can be represented with a 2x2 matrix? 2D Rotate around (0,0)? 2D Shear?

7 Review: 2x2 Matrices What types of transformations can be represented with a 2x2 matrix? 2D Mirror about Y axis? 2D Mirror over (0,0)?

8 Review: 2x2 Matrices What types of transformations can be represented with a 2x2 matrix? 2D Translation? Only linear 2D transformations can be represented with a 2x2 matrix NO!

9 All 2D Linear Transformations Linear transformations are combinations of … –Scale, –Rotation, –Shear, and –Mirror Properties of linear transformations: –Origin maps to origin –Lines map to lines –Parallel lines remain parallel –Ratios are preserved –Closed under composition

10 Translation How can we represent translation? How can we represent it as a matrix?

11 Homogeneous Coordinates Homogeneous coordinates –represent coordinates in 2 dimensions with a 3-vector ( 동차좌표 )

12 Homogeneous Coordinates Q: How can we represent translation as a 3x3 matrix? A: Using the rightmost column:

13 Translation Example of translation t x = 2 t y = 1 Homogeneous Coordinates

14 Add a 3rd coordinate to every 2D point –(x, y, w) represents a point at location (x/w, y/w) –(x, y, 0) represents a point at infinity –(0, 0, 0) is not allowed Convenient coordinate system to represent many useful transformations 1 2 1 2 (2,1,1) or (4,2,2)or (6,3,3) x y

15 Basic 2D Transformations Basic 2D transformations as 3x3 matrices Translate Rotate Scale

16 Affine Transformations Affine transformations are combinations of … –Linear transformations, and –Translations Properties of affine transformations: –Origin does not necessarily map to origin –Lines map to lines –Parallel lines remain parallel –Ratios are preserved –Closed under composition –Models change of basis ( 유사변환 )

17 Projective Transformations Projective transformations … –Affine transformations, and –Projective warps Properties of projective transformations: –Origin does not necessarily map to origin –Lines map to lines –Parallel lines do not necessarily remain parallel –Ratios are not preserved –Closed under composition –Models change of basis ( 사영변환 )

18 Matrix Composition Transformations can be combined by matrix multiplication p’ = T(t x,t y ) R(  ) S(s x,s y ) p Sequence of composition 1.First, Scaling 2.Next, Rotation 3.Finally, Translation

19 Inverse Transformation Translate Rotate Scale

20 Inverse Transformation p’ = T(t x,t y ) R(  ) S(s x,s y ) p P = S -1 (s x,s y ) R -1 (  ) T -1 (t x,t y ) p’

21 2D image transformations These transformations are a nested set of groups Closed under composition and inverse is a member

22 Keyframe Animation

23 Keyframes? –Define starting and ending points of any smooth transitions The workflow of traditional hand-drawn animation –1. Key frames by senior key artists –2. ‘clean-up’ and ‘inbetweens’ by inbetweeners keyframesinbetweens

24 Keyframe Animation The starting keyframe The ending keyframeThe completed animation

25 Keyframing: issues How do you know where to put the keyframes? Interface: How do you actually specify the key values? Inbetween: How do you make frames between keys

26 Making inbetweens Interpolation Start Time = 0 End Time = 1 Inbetween Time = α (0 ≤ α ≤1) ??

27 Making inbetweens Linear Interpolation Start Time = 0 End Time = 1 Inbetween Time = α (0 ≤ α ≤1) 1-αα

28 State vector How to represent a state? –By Numbers! (or Parameters!) –Examples) Color: R,G,B (H,S,V) Scale: Sx, Sy Rotation: θ Translation: Tx, Ty Position of vertices …

29 State vector A state vector: a collection of parameters –Example with 5 parameters Scale: Sx, Sy Rotation: θ Translation: Tx, Ty

30 Interpolation of state vector Keyframes: (at time=0) (at time=1)

31 Interpolation of state vector What is the state vector at time = α ? 1-αα α

32 Interpolation of state vector What is the state vector at time = α ? 1-αα α


Download ppt "Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park."

Similar presentations


Ads by Google