Transforming and Twisting.

Uploaded on:
Cross-break up
Slide 1

Transforming & Warping

Slide 2

2D Morphing Involves 2 stages Image twisting "inspire components to line up" Cross-break down "blend hues" (blur in/fadeout move) Related to surface mapping and network distortion Texture mapping T(u,v) = (x,y,z), mapping specified by vertex sets. u v

Slide 3

What is surface mapping? Surface mapping T(u,v) = (x,y,z), mapping specified by vertex sets. How can it work? Introduction is utilized. Relative (think Bresenham), or point of view. Uh Oh!!!

Slide 4

Some subtle elements (Thanks, Wikipedia!) Affine surface mapping specifically inserts a surface direction u a between two endpoints and u 0 and u 1 : u a = (1-a)u 0 + au 1 where 0 ≤ a ≤ 1 A little openGL, in case you\'re interested glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );

Slide 5

2D Morphing Grid Deformation G(x,y) = (u2 + v2, uv) (Mapping determined by condition) Lack control for various parts of picture F(u,v); (Do we really need the corners and edges of the picture to move???)

Slide 6

2 pass network Warping (Smythe 90) Idea: use splines to indicate bends on every picture gain power of twisting Input Source & destination pictures 2D cluster of control focuses in source 2D exhibit of control pts in destination How to code new work into a changed picture? Source Destination

Slide 7

To invigorate S D Need to enliven source lattice to destination framework to create middle of the road networks I (could be various goes) At every activity outline, need to produce halfway picture from S & I * Could utilize surface mapping, however the issue is we have to insert discretionarily molded polygons/triangles..

Slide 8

Steps Fit bends through control focuses (e.g. Catmull-Rom splines) 1 st pass: match ranges in x & insert 2 nd pass: match ranges in y in middle of the road picture( from step 2) and add Match picture to new matrix (or pictures, if 2) Cross disintegrate (transform), if 2 unique pictures Linear mix: Color ij = Δ f Color ij D + (1 – Δ f) Color ij S (pixel by pixel)

Slide 9

Steps For Each Frame in Animation for 2 distinct pictures 0 1 f … time 0 n Source picture Source network Intermediate framework Intermediate picture 1 Intermediate picture 2 Composite picture Destination lattice Destination picture Warp source to lattice Warp destination to lattice C ij = Δ f C ij D + (1 – Δ f) C ij S

Slide 10

Magnification and Minification 1 2 3 4 5 1 2 3 4 5 Filter, e.g. gaussian 1 2 3 4 5 1 2 3 4 5 Averaging source pixels How to smooth out pixels?

Slide 11

Feature Based Image Metamorphisis (Beier and Neely, \'92) Instead of utilizing bends, use line-sets to indicate correspondence Instead of 2 pass approach, 1 pass that ascertains weighted commitments from every line pair to every pixel Input: Source picture Destination picture Line sets PQ S PQ D

Slide 12

Step For every edge between source S & destination D Interpolate PQ S & PQ D to produce middle of the road "destination shape" Warp S to moderate destination shape Warp d to transitional destination shape Cross break down distorted pictures Save result as halfway casing Q S Q I Q D Still a few issues (review straight introduction) – perhaps utilize quaternion P S P I P D

Slide 13

Field Morphing For a Single Line Pair Given P\'Q\' in S, and PQ in D Parameterize length as u:0 .. 1 over PQ and scaled over P\'Q\' Given some point X, separation v from PQ u = || X-P|| cos Ө/||Q-P|| (% separation from P, along PQ ) v = [(X – P) ┴(Q-P)]/||Q-P|| Where ┴(m) is characterized - 1/m … e.g. 1/(P-Q) V is the projection of P-X onto the opposite vector V Q\' Is there an option math procedure to get u and v? X v X\' =? u Ө P\'

Slide 14

Field Morphing For a Single Line Pair X\' = P\' + u • (Q\' – P\') + [v •┴(Q\'- P\')]/||Q\'- P\'|| Scaled u vector Unit vector along ┴ Q\' X v X\' u Ө P\'

Slide 15

Single Line Pair 80 Qs Pd Qd (30,50) 10 Ps 10 80 10 Source Destination Given the line sets in the destination and source outlines, what is the pixel in the source outline that compares to the point (30,50) in the destination outline?

Slide 16

u = (X-P d ) •(Q d - P d )/|Q d - P d | 2 u = (20,- 30)•(70,0)/70 2 u = 1400/4900 = 2/7 v = | (X-P d ) x (Q d - P d )/|Q d - P d | 2 | v =|(20,- 30) x (70,0)/70 2 | note: 2D cross item = determinant v = 2100/4900 = 3/7

Slide 17

T = Q s - P s =(0,70) S = (T y , - T x ) = (70,0) X\' = P s + uT + vS X\' = (10,10) + 2/7 (0,70) + 3/7 (70,0) X\' = (10,10) + (0,20) + (30,0) = (40,30)

Slide 18

Multiple Lines Think Shepard\'s calculation For point X in the source picture, we compute X\' for each of the line matches Then utilize a weighted total to at last discover the destination X\'

Slide 19

The subtle elements X\' is ascertained from X and a weighted arrangement of separations from X\' = X + Σ D i W i/( Σ W i ) , n = number of lines D i = X i " – X W i = [ length i P/(a+ dist i )] b P =importance to line length. Expanding P builds the impact of longer lines b = how impact tumbles off with separation (0.5… 2). What if b=0? dist i = separation from X to line i; as separation expands, weight diminishes a = forestalls division by zero, can likewise help with smoothing the lines themselves n i = 1 i = 1

Slide 20

3D Morphing Place join here

Slide 21

3D Morphing Imagine you have two 3D networks; how to transform between them? Issues: Getting a mapping between polygons of the 2 objects Different quantities of polygons Down specimen or expansion examining? Envision you have two 3D volumes; how to transform between them?

Slide 22

Surface Morphing With Different Numbers of triangles Use improvement (edge breakdown procedures) to streamline correspondence Make beyond any doubt it is reversible/tracks changes User needs to rearrange vertices around elements Specify indicates around key components save them Low Resolution, low vertex check High Resolution, high vertex tally

Slide 23

Feature Based Volume Metamorphosis Extension of thought of Beier and Neely Instead of straightforward line sets, component sets Elements have "dimensionality": can be a point, line, rectangular plane or volume (box) spatial design: Local direction framework and cause Scaling element (highlights degree along neighborhood tomahawks) Beier and Neely technique connected to get new work (handwaving..)

Slide 24

Another Method: Fourier Volume Mapping Object volume must be portrayed by a capacity FT: coordinate over [function*e - i2πft ] For every time step Compute FFT of every volume\'s capacity Compute the weighted entirety of the 2 FFTs Undo the Fourier change on the outcome The more "modes", the nearer to the genuine capacity

Slide 25

Pluses and Minuses Resolves correspondence issue (move out of cartesian space into recurrence space) A spotless procedure yet not as much as perfect results (preferred on a few shapes over others) No assurance elements will stay where they ought to

Slide 26

3D Morphing Idea: info triangle network with various number of vertices Use disentanglement to improve correspondence issue

View more...