1 Computer Science 631 Lecture 2: Morphing Ramin Zabih Computer Science Department CORNELL UNIVERSITY.

Slides:



Advertisements
Similar presentations
Morphing & Warping 2D Morphing Involves 2 steps 1.Image warping “get features to line up” 2.Cross-dissolve “mix colors” (fade-in/fadeout transition)
Advertisements

Warping and Morphing.
Mapping: Scaling Rotation Translation Warp
2-D IMAGE MORPHING.
2D preobrazba (morphing). 2D preobrazba dekle-tiger.
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
MSU CSE 240 Fall 2003 Stockman CV: 3D to 2D mathematics Perspective transformation; camera calibration; stereo computation; and more.
Image Morphing : Rendering and Image Processing Alexei Efros.
1 Computer Science 631 Lecture 3: Morphing, Sampling Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Image Morphing : Computational Photography Alexei Efros, CMU, Fall 2005 © Alexey Tikhonov.
1Jana Kosecka, CS 223b Cylindrical panoramas Cylindrical panoramas with some slides from R. Szeliski, S. Seitz, D. Lowe, A. Efros,
Math 310 Sections Isometry. Transformations Def A transformation is a map from the plane to itself that takes each point in the plane to exactly.
1 Computer Science 631 Lecture 4: Wavelets Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Image Morphing, Triangulation CSE399b, Spring 07 Computer Vision.
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
Image Morphing, Thin-Plate Spline Model CSE399b, Spring 07 Computer Vision
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/27/11 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Image Stitching Ali Farhadi CSE 455
MORPHING Presentation By: SWARUP DEEPIKA JAGMOHAN Date: 22 OCT 2002 Course: COMPUTER GRAPHICS.
CSCE 441: Computer Graphics Image Warping/Morphing Jinxiang Chai.
Warping CSE 590 Computational Photography Tamara Berg.
Computer Science 631 Lecture 7: Colorspace, local operations
CS 551/651 Advanced Computer Graphics Warping and Morphing Spring 2002.
Geometric Operations and Morphing.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/23/10 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric surfaces.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Image Warping and Morphing cs195g: Computational Photography James Hays, Brown, Spring 2010 © Alexey Tikhonov.
Transformations. Congruent Similar Image vs Pre-image Pre-image: the figure before a transformation is applied. Image: The figure resulting from a transformation.
Unit 4 – Flip, Slide & Turn Vocabulary. Unit 4 – Flip, Slide & Turn - Vocabulary Plane: One of the basic undefined terms of geometry. A plane goes on.
GEOMETRIC OPERATIONS. Transformations and directions Affine (linear) transformations Translation, rotation and scaling Non linear (Warping transformations)
Advanced Multimedia Warping & Morphing Tamara Berg.
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Image warping Li Zhang CS559
Lesson 2.7 Objective: To complete dilations on a coordinate plane.
Multimedia Programming 10: Image Morphing
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Computer Graphics I, Fall 2010 Transformations.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Image Warping 2D Geometric Transformations
7.4 Translations and Vectors June 23, Goals Identify and use translations in the plane. Use vectors in real- life situations.
CSCE 441 Computer Graphics: 2D Transformations
Introduction to Transformations / Translations. By the end of this lesson, you will know… Transformations in general: A transformation is a change in.
Arithmetic and Geometric Transformations (Chapter 2) CS474/674 – Prof. Bebis.
Image warping/morphing Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/3/15 with slides by Richard Szeliski, Steve Seitz and Alexei Efros.
Image Morphing © Zooface Many slides from Alexei Efros, Berkeley.
2D preobrazba (morphing)
CS1315: Introduction to Media Computation
Jeremy Bolton, PhD Assistant Teaching Professor
Computational Photography Derek Hoiem, University of Illinois
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
CSCE 441: Computer Graphics Image Warping
2D transformations (a.k.a. warping)
Feature-Based Warping
Image Stitching Computer Vision CS 678
Morphing WU PO-HUNG.
Essential Question: What can I add to the words slide, flip and turn to more precisely define the rigid-motion transformations – translation, reflection.
Feature-Based Warping
Translate 5 squares left and 4 squares up.
Image Stitching Linda Shapiro ECE/CSE 576.
Computer Graphics: Image Warping/Morphing
Image Morphing using mesh warp and feature based warp
Computational Photography Derek Hoiem, University of Illinois
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

1 Computer Science 631 Lecture 2: Morphing Ramin Zabih Computer Science Department CORNELL UNIVERSITY

2 How does morphing work? n Overview Draw a ray on corresponding feature on I S and I D Make a video of I S changing its shape to be like I D (align the rays) Make a video of I D changing its shape be be like I S (align the rays) Play the first video forwards, the second video backwards, and blend them –Compute a (pixel-by-pixel) weighted average

3 Example ISIS IDID Forward video Backward video ID’ID’ IS’IS’

4 Resulting video n Blend the two videos (dissolve) Initially, 100% forward video At the end, 100% backward video In between, you can control the speed of the morph average of half-shrunk green and half-grown blue

5 Warping n We need to change the “shape” of the input image I S in a well-specified manner This is done by drawing a ray (oriented line segment) on I S and a corresponding ray on I D –Sometimes called “control lines” The way this feature changes between I S and I D controls the change in the shape of I S

6 Coordinate change n We need a function that turns points on the input image (u,v) into points on the output image (x,y)

7 Source scanning For each pixel at coordinates (u,v) x = x(u,v); y = y(u,v); dest[x,y] = source[u,v]; n One can also do this from destination to source (“destination scanning”)

8 What should our functions x,y be? n If x(u,v) = u+2 and y(u,v) = v+3, what do we do to the image? Translate by 2 left and 3 down? 2 right and 3 up? n We need at least allow translations and rotations

9 Affine transformations x = au + bv + c y = du + ev + f n This gives a combination of rotation, scaling and translation a = e = 1, b = d = 0 gives a translation by (c,f) a = e = cos , b = sin , d = - sin , c = f = 0 gives a rotation by  a = s, e = s, others 0 gives a scaling by s

10 Affine transformation properties n An affine transformation will map a square to a parallelogram More precisely, for every square and parallelogram, there is a corresponding affine transformation (and vice-versa) n There are 6 degrees of freedom

11 Projective transformations x = (au + bv + c)/(gu + hv + 1) y = (du + ey + f)/ (gu + hv + 1) n Affine is obviously a special case n Allows us to map any square into any quadrilateral n 8 degrees of freedom

12 Morphing transformations n The transformations used in morphing are different More intuitive, easier to control n Every ray defines a local coordinate system, so the motion of a ray (from source to destination) defines a transformation

13 Interpolate the motion of the rays n Red arrow in I S goes to yellow arrow in I D Easy to create two intermediate rays In general, we interpolate the motion of the endpoints of the ray

14 Ray-based coordinates n Compute the position of the pixel X w.r.t. an oriented ray PQ Coordinates are A (along PQ) and B (perpendicular to PQ)

15 Changing units n The problem is that A and B are in units of pixels Need them in percentages of the length of PQ

16 Putting it all together n Want to warp I S to create I2 The ray P’Q’ moved to the ray PQ X is the pixel in I2 whose intensity we want n Compute position of X w.r.t. PQ The intensity should come from the point in that position with respect to P’Q’ in I S

17 General formula Note that X’ (as well as X) is a point, not a pixel