|morphedit.tcl [-w width] [-n height] picA.pix picB.pix linesfile|
morphedit allows the user to set up line segment correspondences to be used by the utility pixmorph.
First, the program displays the two images and presents a dialog box in which the user can enter values for a, b, and p (see pixmorph(1) for details on these constants.) [Note: after replacing these values, the user must press <Enter> for the new values to be recorded.]
The user is now editing the lines file linesfile. The purpose of writing a lines file is to set up correspondences between the two images to improve the quality of morphed images produced by utilities such as pixmorph. To set up a correspondence, the user must create a (directed) line segment for each image that specifies which feature of the first image corresponds to which feature of the second. These directed line segments are created in the following fashion.
To create the first endpoint of a new line segment, the user presses the left mouse button at the desired location in either image. The point appears at the same location in the other image. While the mouse button is held down, the endpoint may be dragged to any location (including off of the image...please do not misplace endpoints in this fashion -- they are very difficult to recover.) Releasing the mouse button deposits the endpoint at that location.
To specify the second endpoint, the user presses the left mouse button at a location in the image currently unoccupied by endpoints. The line segment is drawn between the first and second endpoints; and, as before, this endpoint may be dragged to any location.
Endpoints may be created in pairs in this fashion. Additionally, endpoints and line segments can be selected (by pressing the left mouse button while in the vicinity of the point or segment) and moved (by moving the mouse while the button is held) in either image as desired.
To display the orientation of a line segment, the user moves the mouse cursor until it is over the line segment in question. The first endpoints of the segments of both images appear white, and the second endpoints of the segments of both images appear black. Specifying the wrong orientation of a line segment usually results in a poor -- albeit somewhat psychedelic -- morphed image, so users are encouraged to take advantage of this feature to verify that their line segment correspondences make sense.
The "Save" button writes the currently displayed line segment correspondence set, along with the constants a, b, and p, to the file linesfile. The "Quit" button closes all associated windows and terminates the program.
The "Preview" button, with corresponding fraction entry box, spawns a process to display the morph specified by the given fraction and the last *saved* version of linesfile. (Note: this currently uses the utilities pixmorph and pix-fb. If the "Preview" button fails, verify that the paths to these utilities (specified in the first few lines of morphedit.tcl) are correct.
Note: morphedit.tcl uses bwish instead of the standard Tcl/Tk wish, since bwish supports pix images while wish does not. If you have difficulty running morphedit.tcl, make sure the first line of morphedit.tcl (giving the path to bwish) is correct.
morphedit.tcl face1.pix face2.pix lf
brlcad(1), pixmorph(1), pix(5)
At this time, line segments cannot be deleted. Unwanted correspondences should be recycled elsewhere.
This software is Copyright (c) 1996-2013 by the United States Government as represented by U.S. Army Research Laboratory.
Reports of bugs or problems should be submitted via electronic mail to <firstname.lastname@example.org>.