Morph v1.0 sdiverdi 2002 ^^^^^^^^^^^^^^^^^^^^^^^^ Last Updated: 9/17/2002 Morph is a small program that performs feature-based metamorphosis between two images with user-defined features. It provides both an interactive mode to place features on the images, and a noninteractive mode to produce a number of intermediate images for turning into a movie. Command Line Interface ^^^^^^^^^^^^^^^^^^^^^^ usage: ./morph -s source -d destination To start a new script (term used to mean a .mph file), a source and destination image must be specified with the -s and -d options. They can be either ASCII PPM or uncompressed 24-bit 3-channel BMP format. The images must have the same height and width. This invocation will open two windows, one for each image, ready for new features to be placed. usage: ./morph -m script To open an existing script, specify it with the -m option. The script should be a .mph file generated by morph. This is an undocumented format - play with it at your own risk. This invocation will open the two images specified in the script and display all the saved features on them. The script contains paths to the two images, relative to the script file, so if the two images were originally in the same directory as the script file, then so long as all three are moved together, the script will continue to work. usage: ./morph -m script -f frames [ -o outdir ] [ -a nearest | bilinear | bicubic ] To batch process an existing script for movie creation, specify the script with the -m option, and the number of frames to render with the -f option. morph will run non-interactively, generating a series of images as specified. To change where the files are written, specify an output directory with the -o option. To change the sampling method, use the -a option followed by nearest, bilinear or bicubic. Nearest is fast but poor quality, bicubic is slow but excellent quality, and bilinear is a good compromise. OpenGL Interface ^^^^^^^^^^^^^^^^ When morph runs interactively, the two images and features are displayed in two separate windows. Unselected features are drawn in grey with small points. When selected, they become yellow. When a point is selected for dragging around, it becomes larger and red. When a point is the current edit point for a feature, it's large and green. To create a new feature, use the middle mouse button. When nothing is selected, a single middle click places a point. To add more points to the feature, middle click elsewhere in the image. The new points are added after the feature's current edit point (the point that appears in green). To stop editing the feature, double click (this will add another point), or hit the 'E' key. If you'd like to add points to a feature that was previously finished, press 'E' again and the edit point will become green again. Any subsequent middle clicks will add more points. To make a chain become a closed loop, hit the 'C' key (this toggles the state - press 'C' again to open the chain). Features can be moved around all at once, or each point can be moved individually. To move an entire feature, left click and drag on any of its lines, _not_ on a point (currently the feature drag doesn't work quite as you might expect - experiment a bit and see). To move an individual point, left click and drag on that particular point of a feature. It will become large and red, to show that it's selected. To delete a feature, select it and press the backspace key. To quit morph, press the 'Q' key. You will be prompted to confirm if you'd really like to quit (trust me, that's a good thing). The right mouse button access a GLUT style popup menu that provides the rest of morph's functionality. Images can be zoomed into and out of via the popup menu, to aid in feature placement. Image files and scripts can be saved from the popup menu as well. The Morph menu allows you to do single morphs (or warps) to test your feature placement before doing a batch render. Selecting Do Morph will warp both the source and destination images and then interpolate between them, generating a frame at the currently selected percentage. Three new windows will be opened - the warped source, the warped destination, and the morph result. To change the current percentage, use the Percent menu. 0% is entirely the source image, 100% is entirely the destination image, and values inbetween are a combination. If you'd like to just see one of the images warped instead, select Do Warp Only from that image's popup menu. This will open one new window with that image warped appropriately for the currently selected percentage. Documentation ^^^^^^^^^^^^^ This file is the primary documentation for morph. The doc/ directory also contains information about compilation and porting and a todo list. Example ^^^^^^^ The example/ directory contains two input images, a script for them, and a they produced. It shows a very simple case of morph's functionality.