From: Zitao Xu (Zitao++at++Magic-Earth.com)
Date: 03/31/2003 07:51:39
Hi Vicente,
I am talking that you do the image morphing by your own code (not using
tools).
I don't know existing tools, but I did a few by myself.
Depending on your objective, there are a few ways for your reference.
1.
image sizes are the same, without a set of landmarks you want
to guide the morphing.
1.1.
you have more than 2 key images, you want to insert many images in each
pair.
For each pixel value in all images, using interpolating splines to calculate
pixel values in between. [e.g. if you have M (N X N) images, use (N X N)
spline
functions, each of which interpolates M values. thus, you can have as many
images in between as needed].
this can yield reasonable morphing for image features.
1.2
you have only 2 key images, then you can only do linear interpolation
between these 2 images.
2.
you have a set of landmarks to guide your image morphing.
(key images may have different sizes). This means you have
N landmarks (positions) in starting image, destination images, and
images in between, and you want the morphing is guided by these
set of landmarks - approximately or precisely.
N landmarks in middle images can be linearly interpolated from
starting and destination N landmarks.
2.1.
Approximate by least square transformation.
Define transformation from N landmarks in starting image to N landmarks
in middle image, by least square method. Usually bi-linear or bi-quadratic
would be enough. Thus, each pixel in start image will have a mapped pixel
in middle image.
I usually use the reverse map function, so that I can loop through every
pixel in middle image, and have a unique pixel to fetch from start
image. This way you transform the start image to middle image.
do the same from destination image to middle image.
Weighted merge these 2 images in the middle, to get final middle image.
2.2
Thin plate spline transformation.
This will precisely transform N landmarks from start image to N landmarks
in middle image, and warp the pixels surround each landmark in the
transform.
This is the same as 2.1, except having different transformation equation.
This is to resolve a Laplace differential equation system to get the map,
from both start & destination image, and merge them in the middle.
(use reverse map too). Require a little bit math background.
= = = = = = =
Above are what I have done, so hope this helps a bit while you decide
your method, if you do your own image morphing.
method 1.1 is straightforward, and perhaps is enough for many cases.
-Zitao,
Magic Earth,
Houston, TX
-----Original Message-----
From: Vicente de Miguel Soria [mailto:vde++at++glup.irobot.uv.es]
Sent: Monday, March 31, 2003 4:53 AM
To: info-performer++at++sgi.com
Subject: [info-performer] Texture morph
Hello everybody.
We are trying to implement a complete morphing between two models. The
morph among vertices, normals and texture coordinates is working but we
are having problems morphing the texture itself (the image data).
We are using the pfEngine and pfFlux nodes. Everything is fine with the
vertices, normals and texture coordinates data, but the image data
doesn't work the same way.
Have anyone tried this? Is it possible to do a morph between two
textures?
We really need help in this issue, so please feel free to share any idea
or experience.
Thanks in advance.
Best regards,
V&L
-----------------------------------------------------------------------
List Archives, Info, FAQ: http://www.sgi.com/software/performer/
Open Development Project: http://oss.sgi.com/projects/performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 08:02:14 PST