1. The ColorEdit Command
A full-color sampled image is a rectangular array of pixels, each containing 3 samples to describe a color in some color space. ColorEdit currently only understand RGB, and requires its input in the form of three AIS files with names of the form "Foo-red.ais", "Foo-green.ais", "Foo-blue.ais". (It also allows, -grn and -blu.) The command to begin such an editing session is
% ColorEdit fileroot
The first time this command is run, a ColorEditTool will be created in the right column, and can be used for all global ColorEdit viewers. The ColorEdit viewer for the image will be created in the color column (if available) or in the left column. The icon will attempt to render the image in a crude fashion.
When first run, the ColorEditPackage will also register the command "MakeColorEditTool" which can be used to recreate the ColorEditTool should it be destroyed.
2. ColorEdit'ing
General Notes
The basic paradigm which ColorEdit uses is to have the user select some part of the image, and to select some transformation to apply to the color in that selection (but not necessarily in that order), and then to apply the transformation to the selection and repeat. There are various ways to select the active region, and in the glorious future, there will be various types of transformation which could be applied.
The underlying image is 3 8-bit separations for R, G, and B. The only transformation which can currently be applied is a tone reproduction curve which is applied to all 3 separations independently. This transformation has to commend itself the fact that dynamic updates to the TRC be easily be reflected with virtually no computation on the color monitor, when using a Dorado with DispM and DispY boards. It has little else, and will change in the glorious future.
The active region is described by a rectangular array of booleans of the same size and shape as the separations. A bit turned on means that the corresponding pixel is active, and that if the transformation is Apply'd, it will be modified. Many features in ColorEdit modify this mask.
ColorEdit always considered the display to be nothing more than the user's window on the image. It is possible to view an image at various resolutions, from subsampling the image to display it on the screen, down to viewing individual pixels with 10 or 20 screen pixels.
Scroll Bars
Scroll bars provide the basic mechanism for changing the portion and the magnification of the region at which the user is looking. Some attempt has been made to make them operate like Tioga. The discussion below describes the use of the vertical scroll bar (but the horizonatal is similar).
LEFT scrolls the selected location to the top (or left) of the screen.
RIGHT scrolls the top (or left) of the screen to the selected location.
MIDDLE thumbs down (across) the image to approximately that location in the image.
SHIFT-, when combined with one of above, will perform that operation (LEFT, MIDDLE, or RIGHT), but also increase the magnification by a factor of 2.
CTRL-, when combined with one of above, will perform that operation (LEFT, MIDDLE, or RIGHT), but also increase the magnification by a factor of 5.
CTRL-SHIFT-, when combined with one of above (LEFT, MIDDLE, or RIGHT), will ignore that operation and scale the image to fit when displayed on a 640 by 480 display.
Left Mouse Button — Select
The left mouse button is used to change the selection mask. It is modal, however, and the action taken when clicked is dependent on which option the user has selected. See "SELECT" below for more information.
Middle Mouse Button — Menu
The middle mouse button is used to bring up a pop-up menu which can be used to change editing parameters or perform various editing functions. There are actually 4 different menus: "SELECT", "EDIT", "DESTINATION", and "OPTIONS". Each menu, however, gives options to change to any of the other menus. Clicking outside the menu will get rid of it. Each of these four menus, and the choices underneath them, are discussed in greater detail below.
SELECT menu
All but the last two entries in this menu are used to select which function will be active when the left mouse button is pressed. For each selection type there is a distinctive cursor, as feedback to the user. Some of the actions may change their character when double-clicked, or SHIFT'ed or CTRL'ed, and these will be noted below. Some are also sensitive to the "DESTINATION" settings, or to parameters in the ColorEdit Tool.
Rectangle
Square cursor with center dot. CLICK-DRAG-RELEASE will select the rectangle whose corners are the CLICK and RELEASE locations. DOUBLE-CLICK deselects. Sensitive to "DESTINATION". May be aborted before RELEASE by selecting multiple mouse buttons.
Hue Match
Diamond cursor with center dot. CLICK will try to select pixels contiguously emanating from the CLICK location with almost the same hue as the CLICK'ed pixel. The algorithm used tries to ignore shadows by ignoring changes in luminance. The color distance to be within can be set in the ColorEdit Tool.
Color Brush
Circular cursor with center dot and gray shading just inside the circle. CLICK will select all the pixels in a square region surrounding the CLICK location where the manhatten color distance is less than some given value from the CLICK'ed color. DRAG will select all the pixels in a square region surrounding the DRAG location, but not in the last square CLICK'ed or DRAG'ed, where the manhatten color distance is less than some given value from the DRAG'ed color. (Thus, DRAG can give anomolous effects if a user crosses an edge.) The color distance allowed and the size of the square can be set with the ColorEditTool. Note that the Color Brush, unlike Hue Match, does not ignore the luminance component.
For convenience, double-CLICK'ing will perform a Fill (see "Filling" below).
Edge Brush
Circular cursor with center dot and less gray shading just inside the circle. CTRL-CLICK or SHIFT-CLICK will select a color to ``avoid''.
CLICK will select all the pixels in a square region surrounding the CLICK location where the manhatten color distance is less to the CLICK'ed color than the manhatten color distance to the color to avoid. DRAG will select all the pixels in a square region surrounding the DRAG location, but not in the last square CLICK'ed or DRAG'ed, where the manhatten color distance is less to the DRAG'ed color than the manhatten color distance to the color to avoid. (Thus, DRAG can give anomolous effects if a user crosses an edge.) The size of the square can be set with the ColorEditTool.
For convenience, double-CLICK'ing will perform a Fill (see "Filling" below).
Filling
Cloverleaf cursor. CLICK will try to select pixels contiguously emanating from the CLICK location which are not already selected.
Brush
Small square cursor. Select 16 pixels in 4 by 4 square. Double-CLICK will deselect. Sensitive to "DESTINATION". DRAG same as CLICK.
Pixel
Cross-hair cursor. CLICK will select the CLICK'ed pixel. DRAG will interpolate a line from the previous CLICK or DRAG location. Thus, the pixel brush guarantees a continious edge from CLICK through RELEASE. Double-CLICK will deselect. Sensitive to "DESTINATION".
Select All
Does not change type of selection active of left mouse button. Immediately selects entire mask.
Clear All
Does not change type of selection active of left mouse button. Immediately deselects entire mask.
EDIT menu
Provides various functions for editing, most of which are related to disk files.
Apply
Apply the transformation current in the ColorEdit Tool to the masked portion of the image.
Save
Create a new version of each separation of the AIS file with the changes which have been applied.
Save Mask
Save in fileroot-mask.extent a run-length encoded copy of the current mask. Useful for carefully crafting a single mask across several edit sessions. This operation can require patience for long, intricate masks.
Load Mask
Restore the mask from fileroot-mask.extent.
Save Log
Save to fileroot.changeLog a log of all applied changes to the image since the edit began. Each change consists of a mask (run-length encoded) and the transformation applied.
Recover Log
Apply to the current image the changes found in fileroot.changeLog.
DESTINATION menu
Typically a user wishes to select things into the active mask. Occasionally, however, it is desirable to be able to deselect many things without having to double-CLICK each operation, or to be able to flip bits in some region. Only the Rectangle, Brush, and Pixel selectors can use these features currently, but they are still useful at times.
To Foreground
The default. CLICK select things into the active mask.
To Background
CLICK deselects things out of the active mask.
To Opposite
CLICK selects deselected pixels and deselects selected pixels.
OPTIONS menu
A catch-all menu.
Undo
Not currently useful.
White cursor
Make the color cursor white instead of black. Useful for editing dark images.
Black cursor
Make the color cursor black instead of white. Useful for editing light images.