ftp.nice.ch/pub/next/graphics/movie/Morph2a.README

This is the README for Morph2a.s.tar.gz [Download] [Browse] [Up]

Morph2
_______________________________________________________________________________

Morph2 is a simple application for calculating images or movies where one image transforms into another.

Morph2 runs on Apple Rhapsody and Apple YellowBox for Windows.

Usage
Drag two images into the First Image and Last Image are. Most image formats should work.

Draw control lines to identify similar regions in the images. The lines are drawn, sized and moved by dragging and clicking as in a drawing application. They can be deleted by first selecting them and then pressing backspace.

At the bottom of the window a preview of the Morph can be viewed. Click the calc button to update.

There is an inspector for the lines that can be brought forward by selecting Inspector from the Edit menu. The lines movement in the morph can be controlled as well as when and at what speed nearby points should change color.

Calculate the Morph images by selecting Save Morph Frames... from the file menu.

FAQ
Who owns Morph2?
- Morph2 is Freeware. The application and source is owned by me, Martin Wennerberg, but you may use it freely and distribute it to anyone. That goes for both binaries and source.

Can I use the Morph2 sources in my nuclear missile control system?
- Sure. Just don't blame me if the earth is blown to peaces.

May I improve the sources and then pass them on.
- Yes, but I would prefer it if you sent the changes to me since I'd like to stay in control of this little project.

What's with this .xmovie format?
- Awaiting some nice frameworks to create quicktime movies I decided to go for the simplest possible format. It's just a folder with images inside.

How does it work
The idea is: For a point X in the destination image (the one were trying to calculate), find the point X' to sample in the source image. 

Lets first look at a simple case where there is only one line. First we get the lines position in the destination image. This is just a weighted average of the line's position in the first and last image. Then calculate the transformation that is done to make the destination line into the source. This transformation is made up by a rotation, translation and a scaling of the line. If you've read some algebra you know that this is effectively specified as a transformation matrix M. It's now easy to get the X' point using this simple formula
	X' = MX

If you have more then one line you do the above calculation for each line and get points X1' X2' X3' and so on. Now calculate the distance from the X point to each line and use that as a weight wi = 1 / (distance * distance). Find the weighted average X' of the Xi' points and sample that point.  Repeat all this for all points in the destination image.

Version information
1.0	Morph for Nextstep.
2.0a	Rewrote for OpenStep.

Known bugs
Only 8 bit per color images works.

Contact information
Please let me know if you redistribute the app or sources or use it for something interesting.

Martin Wennerberg
Ektorpsv. 41, 131 47 Nacka, SWEDEN
martin@rat.se

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.