Medit: The Morph Editor

This document describes how to use medit, and it is divided into five sections. These describe:

  1. command line flags and arguments.
  2. mouse interface commands.
  3. the upper panel: mode and sliders.
  4. the lower panel: parameters and linefile.
  5. miscellaneous (hints, bugs, empty promises).

Command Line Flags and Arguments

The medit command line syntax is as follows:

	Usage: medit [flags] <file1> <file2> [line_file]
	       flags: -h, -newcm, -gamma , or -gray.
	       [line_file] defaults to morph.lines

The <file1> and <file2> arguments are required. The files should be images the TIFF file format.

The [line_file] argument is optional. When the 'Save Lines File' button or 'Load Lines File' button is pressed, this is the file operated upon. During the run of the program, the "/tmp/morphtemp.seg" file is created and is the linefile passed as the argument to the designated morph executable when the 'Crunch' button is pressed.

The -newcm flag should give you a color image using all the 256 colors on an 8 bit machine. Normally, some colors are reserved for the window system, and so there a fewer number (around 200?) of available colors. In general, you probably wont notice much difference.

The "-gamma <gamma>" flag compensates for the gamma of the monitor. The default is gamma=1.7.

The -gray flag performs quantization on the image as though you would be using a grayscale monitor. This might make plotting line segments easier, and usually makes the image seem sharper.

The -h flag simply prints the usage screen.

Mouse Interface Commands

The Left and Right mouse buttons are used by medit to assist with the creation and editing of lines. Lines can be drawn in either the PictureA or PictureB window. Along with the two buttons, the ShiftKey is also used.

To create a line segment, PressAndHold the Left mouse button at some point in the desired window. While holding the button down, drag the mouse to a new location. You will see the line being drawn as you move the mouse. Once you reach the desired location, release the button.

To select a line segment, Click the Right button when you are near an endpoint of the line. The segment which is selected will be a different color than all the other segments.

To change the location of an endpoint in only one of the Picture windows, PressAndHold the Right button. This should select the line segment in question. Then, as you Drag the mouse around, the endpoint you indicated will be changed.

To simultaneously move the location of an endpoint in both Picture windows, hold the ShiftKey and follow the procedure in the above paragraph. The endpoint you selected, and its corresponding endpoint in the other Picture window, will both take on the value of the endpoint you selected. NOTE: The endpoints do not maintain any initial relative displacement.

To delete a line segment, you must first select the segment. Then you hold down the ShiftKey and Click the Left button. The line should vanish from your view.

Upper Panel: Mode and Sliders

medit has three modes. These are chosen by selecting one of the switches in the upper right corner. Initially, medit is in Morph Only mode. Both the warp and cross dissolve fractions are set by the warp fraction slider. If you choose Independent Slider Mode, both the warp and the cross dissolve sliders are displayed. The values of these two fractions can then be set. In Cross Dissolve Mode, only one slider is shown, and this sets the cross dissolve fraction.

The DoIt button will either perform a CrossDissolve, or fork a process to perform a morph with the current parameters. A CrossDissolve will be performed at the fraction indicated by the CrossDissolve Slider if the mode is Cross Dissolve Only. In Independent Slider Mode or Morph Only mode, a morph process will be forked.

The two sliders in the Upper Left of the Panel set the Warp and Cross Dissolve Fractions.

Lower Panel: Parameters and Linefile

The bottom half of the medit control panel contains essentially four items. The most obvious is the Quit button, which ends the program. Unless there is a bug, you should be warned each time you have not saved the lines file before quiting.

The A,B and P parameters used in the morph algorithm can also be set here. Make sure you hit return or tab in order for your change to take effect. These variables are saved into the segment file as the first three numbers.

For testing and debugging of your morph executable, a toggle exists between your morph version, "./morph" and the version in 15-463/pub/bin. The setting of this toggle determines which pathname is forked when the 'Crunch Away' button is pressed.

Finally, the line segment file can be saved or loaded. The friendly file name form lets you choose the file name of your choice.

Miscellaneous: Hints, Bugs, Promises

You can use the tab, space, enter, and arrow keys to move around the control panel. Exceeding some large number of line segment pairs will cause the system to fail. Resizing the picture windows is disallowed. The program does not work on monochrome monitors. The -newcm and -gray flags may not work...

Written by j.r.murphy for the 15-463 course offered S94, and later edited by Zoran Popovic for S95. Further changes and updates by Michael Garland for S96.

January 24, 1996