cs7496: Project 4 Instructor: Jarek Rossignac

Morph

by Florian Hecht



Florian Hecht
Florian.Hecht[at]gatech.edu

Project 4

To goal of this project was to create a system that could do 2D deformations and blends of images. The system is based on a mesh deformation. And the images get deformed because they are put as textures on top of a mesh.

The 'Turbo Warp' that was supplied by Jarek Rossignac (get it here) included the possiblity to drag single points of the mesh to new positions and then apply a bi-cubic smoothing filter to deform the mesh to interpolate the pinned points. The mesh smoothing was completely re-implemented to get a true understanding of the method and to try alternative smoothing filters. The bi-cubic filter turned out to give the best results over other filter kernels.

To get a desired deformation it is quite tedious to do that with pinned points and usually requires a lot of those points. Also a single pinned point would effect the deformation of the whole image and has not a limited influence on the image. Therefor we should try to use a local twist operator to have a faster and easier to control method for deformations, with a fall-off function to limit the effects. This implementation uses as the fall-off function a gaussian e^(-d*d/2*sigma*sigma) (d = distance between point and center, sigma = deviation).

A single point on the mesh is usually not influenced by just one twist, but by several twists. A naive weighting and interpolation scheme has the negative side effect that a point that is in the center of one twist might not be transformed to the end of that twist, but is 'pulled' in other directions. This destroys the control over a region and the locality of the twist. To fix this, the twists that affect a point are sorted by their influence on that point, and the strongest twist effects the point first and the other twists will only have a weight of up to what is left after the strongest twist. This makes sure that, if the first and strongest twist has an influence of 1, it will be the only twist to affect that point and that the point moves on the path specified by that twist alone.

Working with twists revealed that one often isn't using the rotational aspects of the twist and is just doing a translation. The addition of a pure translation operator made the control a bit easier and it is a improved substitute for the pinned points in the original warp application. It is improved because one can control the area of influence of the operator.

With these two operators one has enough control to create the deformations envisioned, but the points that aren't directly influenced by the operators aren't smoothly distributed and even can create overlapps and very stretched areas, where the texturing becomes very visible and distracting. To fix this the points in the centers of the operators are pinned as these are at their expected positions, then the bi-cubic filter is applied to smooth the surounding points. As the operators are not only moving the points they pin down at the end, but a bigger neighborhood, most of the points will be very near their final positions. Because of this only a few iterations of the smoothing filter are necessary. The Conjugate Gradient acceleration isn't necessary anymore to speed-up the smoothing.

To see what the system can do, take a look at the applet, which does an animation from a deformed version of the author (myself), to the undeformed version, then a morph and blending into the character Dr. Strangelove (mad German scientist :-) ) from the movie 'Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb' by Stanley Kubrick (one of my favorite movies); and a caricature of that image. DISCLAMER: Smoking is bad and I don't support it. It just happens that the character has a smoke in that image. Remember he's mad!

The applet with instructions can be found here (press 'b' to start the animation).





You can find the other projects of Jarek's Computer Animation course here.