home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-05 | 45.5 KB | 1,436 lines |
- -------------------------------------------------------------------------
- ####### # # ##### ##### ####### # ##### ######
- # ## ## # # # # # # # # # #
- # # # # # # # # # # # # # #
- # # # # ####### # #### ####### # ####### #######
- # # # # # # # # # # # # #
- # # # # # # # # # # # # #
- ####### # # # # ##### ####### ####### # # ######
- -------------------------------------------------------------------------
-
- ImageLab V2.2
- Copyright 1989
- by Gary Milliorn
- All Rights Reserved
-
- Distribution for non-commercial purposes is ok, as long as the
- program and accompanying files remain unchanged.
-
- -------------------------------------------------------------------------
-
- 1.0 OVERVIEW
-
- ImageLab is a program which may be used to explore many common image
- processing operation, from simple averaging to Fast Fourier Transforms
- (FFT's). ImageLab makes use of the Amiga's blitter to perform fast
- operations where available.
-
- ImageLab is copyrighted, and is freely distributable for non-commercial
- purposes.
-
- ImageLab is: an evolving program. If you find it interesting, have
- suggestions, bug reports, etc. you can contact me at:
-
- mail: Gary Milliorn
- 5915 Shanghai Pierce Rd.
- Austin, Tx 78745
- bix: gmill
-
- I can't promise everything, but I do endeavor to make it as good as I can.
-
-
- 1.1 GENERAL
-
- ** Note: This is the most unusual aspect of ImageLab (V2.2):
-
- ImageLab opens a window on the WorkBench screen, which allows access
- to its menus even when the picture you use is 320 or less. The menu
- strip is also attached to any picture you load, but it may be difficult
- to use on small screens, since there are so many menus.
-
- The easiest way to use ImageLab in this manner is to position the
- screen partially down the screen and start functions from the exposed
- WorkBench window.
-
- An alternate method is to position the image screen at the top, move
- WorkBench to front, and drag it partially down. However, application
- programs cannot reposition the WorkBench window, so you must do this.
-
- A this possibility is to keep both screens at the top and flip between
- them using the AMIGA-N and AMIGA-M key.
-
-
- 1.1.1 COMMON FEATURES
-
- The following applies throughout ImageLab unless otherwise specified:
-
- ImageLab uses the ESCAPE key to terminate an operation in progress.
- Whenever lengthy operation are being performed, the pointer changes to
- a small spinning clock. When this is true, you can press ESC to stop
- whatever it is doing; however, this may leave your picture in a partially
- altered state.
-
- ImageLab uses the RETURN and ENTER keys to simulate the "Ok" gadget
- which appears in requester windows. Similarly, the ESCAPE key siumulates
- the cancel gadget.
-
- Function can be applied to the entire picture, or to a selected area.
- To select an area, use the mouse to "draw" a selection rectangle by
- pressing the left mouse button at one corner and dragging it (with the
- button still down) to the opposite corner. To cancel an area selection
- in progress, press the ESCAPE key or the MENU button.
-
- All menu items which call up a requester for additional information
- have '...' appended to them.
-
-
- 1.2 REQUIREMENTS
-
- * Amiga 500..2000
- * MC68000 or better.
- * 512K memory (the more, the better).
- * System V1.2 software or newer.
-
-
- 1.3 KNOWN LIMITATIONS
-
- ImageLab allocates some memory from the C-heap, instead of the system
- memory pool. This means you will probably need a large stack space to
- run extensive operations. If you experience problems, try setting the
- stack size to 25K or more.
-
- ImageLab's undo function is not very complete.
-
- ImageLab cannot take advantage of a MC68881 or MC68882, alas.
-
-
- 1.4 KNOWN BUGS
-
- * You cannot invoke the palette from the paint function.
-
- * Much of ImageLab is ready for V1.4: you can use fixed or
- proportional fonts, of any size. That is the intention.
- Some things don't adjust, so you will get best results if
- your font is 11 points or less.
-
- * ImageLab doesn't save "unknown" IFF objects, like DPPV and
- CRNG.
-
-
- 1.5 FUTURE ITEMS
-
- * Process images in HSI space.
- * Programmable convolution kernel sizes.
- * Super bitmap screens.
- * Multiple image screens.
- * Use menus on image screens exclusively. Pictures less than 640
- pixels wide will be 320
- * Use system memory allocation exclusively.
- * Better 'undo'.
- * ???
-
-
- 1.6 MISCELLANEOUS
-
- Copyright 1989 by Gary W. Milliorn
- All rights reserved.
-
- Developed using Manx C 3.4 (!), 32-bit mode.
-
-
- -----------------------------------------------------------------------------
- 2.0 INSTALLATION
-
- To install ImageLab in your system, you can use the install program
- to use the default installation procedure. Review the file first, and
- if it is acceptable to you, just enter "execute install" and it will
- run automatically.
-
- Otherwise, review the following paragraphs to install whatever
- portions you would like to have.
-
-
- 2.1 IMAGELAB PROGRAM
-
- The ImageLab program does not have any special requirements. By
- default, a directory is created on your SYS: directory, and ImageLab
- is placed in there. You can use the WorkBench or CLI to move it to
- a more suitable directory, if you like.
-
-
- 2.3 IMAGELAB FONTS
-
- ImageLab comes with two fonts, "tau" and "ceres". "Tau" is an
- 8-point font I run on my system (using the 1.3 command "FF"). The
- special feature of this font is the characters at positions $80 and
- $81 (hex), when printed sequentially, create an Amiga-style checkmark.
- Currently, application programs cannot specify the font used in menu
- titles, so it must be handled separately by specifying it as the
- default system font. If you don't like the appearance of "tau", you
- might consider changing those two characters to the checkmark, if only
- to help keep alive the old (better, IMHO) symbol of the Amiga.
-
- The second font is "ceres", and is a proportional, bold, 9-point
- font. ImageLab handles fonts of any style and size, up to a point.
- Using it is also strictly optional; if present, ImageLab uses it by
- default, or reverts to the system default font. You can also specify
- other fonts of your own choosing - see the startup section.
-
- Installing the fonts is strictly optional.
-
-
- 2.3 IMAGELAB HELP
-
- ImageLab can be provided with on-line help by storing the help file
- ("ImageLab.help") in the same location where the ImageLab program is
- stored (generally, "SYS:ImageLab/ImageLab.help"); alternately, it can
- be stored in the "S:" directory (ImageLab will locate it automatically).
-
- Installing the help file is strictly optional.
-
-
- -----------------------------------------------------------------------------
- 3.0 STARTING IMAGELAB
-
- ImageLab can be run via the CLI or via WorkBench. Operation is
- basically identical, except that some of the defaults are changed.
-
-
- 3.1 CLI STARTUP
-
- When started from the CLI, the ImageLab command line has the
- following format:
-
- ImageLab [-d dir] [-f file] [-r ram] [-v] [-F font] [-c] [-?]
-
- the options are:
-
- -? : summarize CLI usage.
-
- -b : enable the bell.
-
- -c : enable the checkmark character. If you are using
- the "tau" font, or have modified your own, setting
- this option changes the "Project" menu title to an
- Amiga checkmark.
-
- -d dir : set the file directory to 'dir'. Otherwise, the
- default is the directory ImageLab was 'run' from.
-
- -f file : load initial image from 'file' (in the specified
- directory).
-
- -F font : specify font. Fonts are specified as "name/size",
-
- -i : enable icon generation.
-
- -r ram : use 'ram' as a ram disk. If not specified, ImageLab
- uses 'RAM:'. This is only needed by the "Save/Choose"
- option.
-
- -v : verbose. If set, ImageLab prints debugging info.
- as in "Helvetica/9".
-
- Icon creation is disabled when ImageLab is started from the CLI. To
- enable it, you must specify the "-i" option.
-
-
- 3.2 WORKBENCH STARTUP
-
- ImageLab can be started up via the WorkBench. Its icon is a tool,
- which allows it to receive filenames by clicking on a Project icon
- such as ImageLab creates, or selecting both to open "alien" files,
- such as those created by Deluxe Paint, DigiView, etc.
-
- The ImageLab icon accepts the tool types listed below. To set
- them, use the WorkBench "Info" function.
-
- BELL=ON|OFF : if ON, create bells; otherwise, do not.
-
- CHECKMARK=ON|OFF : if ON, enable the checkmark character.
- If you are using the "tau" font, or have
- modified your own, setting this option
- changes the "Project" menu title to an
- Amiga checkmark.
-
- DIRECTORY=name : set the file directory to "name"
-
- FONT=name : set the ImageLab font to "name"
- Fonts are specified as "name/size",
-
- ICON=ON|OFF : if ON, create icons; otherwise, do not.
-
- RAM=name : use "name" as a ram disk. If not
- specified, ImageLab uses "RAM:" This
- is only needed by the "Save/Choose" option.
-
- WINDOW=CON:0/0/100/100 : create a message window of the specified size.
- Mostly just for debug support.
-
- VERBOSE=ON|OFF : if ON, ImageLab writes debugging information
- to its WorkBench window. Do NOT use without
- a "WINDOW..." specification.
-
- If you had also selected a PROJECT when ImageLab was started, it tries
- to open that file as an IFF image file. Only one file may be specified this
- way, however.
-
- Icon creation is enabled when ImageLab is started from the CLI. To
- disable it, you must specify the "ICON=OFF" option.
-
-
- -----------------------------------------------------------------------------
- 4.0 KEY REFERENCE
-
- The following table lists the keyboard keys which can be used in
- ImageLab:
-
- ESC - terminate an operation. Same as 'CANCEL'.
- RETURN - select an operation. Same as 'OK'.
- ENTER - same as return.
- HELP - invoke the help utility.
-
- SHIFT-UP - move the screen up 10 lines.
- SHIFT-DOWN - move the screen down 10 lines.
-
- AMIGA-A - Average.
- AMIGA-B - Color to black and white.
- AMIGA-C - Copy selected area.
- AMIGA-D - Display FFT.
- AMIGA-E - Edit/paint picture.
- AMIGA-F - FFT.
- AMIGA-G - Greyscale.
- AMIGA-H - Histogram.
- AMIGA-I - Inverse FFT.
- AMIGA-K - Close picture.
- AMIGA-L - Laplacian convolution.
- AMIGA-M - Move area.
- AMIGA-O - Open picture.
- AMIGA-P - Palette.
- AMIGA-R - Revert to old version.
- AMIGA-S - Save picture.
- AMIGA-X - Cut selected area.
- AMIGA-V - Paste selected area.
- AMIGA-Z - Undo last operation.
- AMIGA-- - Negative.
- AMIGA-_ - Vertical edge convolution.
- AMIGA-| - Horizontal edge convolution.
- AMIGA-, - Occupy all of screen.
- AMIGA-. - Occupy half of screen.
- AMIGA-/ - Occupy little of screen.
-
-
- -----------------------------------------------------------------------------
- 5.0 COMMAND REFERENCE
-
- The following sections describe the function of each menu item in
- detail. Each is listed in alphabetical order. In general, each item
- has its own paragraphs; however, simple items are grouped unter the
- parent menu.
-
-
- ABOUT
- -----
- The "About" menu item provides the requisite display of the program
- status (version number, etc.), a monitor of the free memory available
- (total), and access to the "help" system.
-
-
- AVERAGE
- -------
- The "Average" item performs area averaging of the picture or selected
- area. Averaging is performed by using a 3x3 control matrix to select
- points of interest surrounding each pixel in the pixture (or selected
- area). For each non-zero term in the matrix, the corresponding pixel
- value is added to a sum. Then the center pixel is replaced by the
- average value.
-
- The effect of averaging an area is to reduce noise by blurring the
- area, in a manner similar to (but faster) the 'Smooth' convolution
- kernel. The various averaging options select different severities of
- smoothing
-
- The available suboptions are:
-
- HORIZONTAL
- VERTICAL
- H & V
- DIAGONAL
- ALL (A)
- CUSTOM...
-
- "Horizontal" averages based upon a pixels two neighbors to the left and
- right, using the following 3x3 matrix:
-
- 0 0 0
- 1 1 1
- 0 0 0
-
- "Vertical" averages based upon the two neighbors above and below, using
- the following 3x3 matrix:
-
- 0 1 0
- 0 1 0
- 0 1 0
-
- The "H & V" average combines the previous two methods to base the average
- on those four pixels, using the following 3x3 matrix:
-
- 0 1 0
- 1 1 1
- 0 1 0
-
- The "Diagonal" average varies the previous one by using the four pixel
- at each corner, using the following 3x3 matrix:
-
- 1 0 1
- 0 1 0
- 1 0 1
-
- The "All" average (the usual one) averages each pixel based upon all
- surrounding pixels. This produces the best average. It is based upon
- the following 3x3 matrix:
-
- 1 1 1
- 1 1 1
- 1 1 1
-
- The "Custom..." option brings up a custom matrix editor. This window
- displays nine cells in a three by three format. You can select and
- edit the value in each of the cells. Enter a non-zero value to
- enable that location (pictorially speaking) to be used in the averaging,
- or leave it as zero to ignore that location.
-
- Options:
- If SHIFT is held when one of these options is selected, then
- the custom matrix editor is brought up with the contents of the
- selected averaging matrix. You can edit it to suit your needs.
- Note: the built-in matrices cannot be changed, they are fixed
- and will be reset each time you use them.
-
- If CTL is held while selecting an averaging option, then the
- sum of the selected pixels is always divided by 9 (the kernel size),
- instead of the number of pixels selected by the matrix. This has
- the effect of squashing the result into a darker image.
-
-
- BELL
- ----
- The "Bell" item controls whether ImageLab signals an alarm on the
- completion of any operation. The options are:
-
- ON
- OFF
-
- If ON, then the Amiga's alarm function is calle. This will simply
- flash the screen by default, but several public domain functions are
- available which intercept this call and substitute an audible bell or
- sampled sound.
-
- The primary use of the bell function is to alert you when some of
- the lengthier functions have completed. Some functions, especially
- the FFT function, can take several minutes to complete.
-
- The bell is off by default, since they tend to be annoying. They
- can be enabled by the options:
-
- -b (from the CLI)
- BELL=ON (from the WorkBench)
-
-
- BINARY...
- ---------
- The "Binary..." function replaces each pixel with black if it
- is less than a specified limit, or with white if it is greater than
- or equal to that limit. The limit is specified by a sliding bar,
- which allows you to specify the color index number (0..max).
-
- The effect of the "Binary" functions is much like orthographic
- film: the result is pure black and white. Of course, the resolution
- is cut off sharply.
-
-
- CLEAR
- -----
- The "Clear" operation sets the selected area to the background color.
-
- Options:
- If the SHIFT key is held, the area is set to the last color that
- was selected in the color palette.
-
- See: PALETTE
-
-
- CLOSE
- -----
- Close closes the current picture and frees all associated memory items,
- including any FFT computations. If the picture has been modified but
- not saved, a warning requester will be displayed first.
-
-
- COLOR TO B&W
- ------------
- The "Color to B&W" option converts a color picture to a black and
- white one (a grey scale, actually). This function is the primary tool
- used to allow ImageLab to process color IFF files (it is also known as
- the Un-Ted Turner function). "Color to B&W" uses the standard EIA
- weighting levels to obtains an evenly distributed grey scale. Note:
- if your picture has more than 16 colors, the greyscale will cause the
- picture to appear grainier -- this is a limitation of the Amiga DAC
- architecture.
-
-
- COLORS
- ------
- The "Colors" item provides access to the color map functions for
- this picture. The available options are:
-
- PALETTE
- GREYSCALE
- NEGATIVE
- SATURATE
- PSEUDOCOLOR
- COLOR to B&W
- LINEARIZE
- DELETE COLORS...
- MAP COLORS...
-
- For information on the color operations, refer to the individual
- command descriptions.
-
-
- CONVOLVE
- --------
- The "Convolve" item enables performing graphical convolution of
- the selected area. Convolution alters the center pixel by replacing
- it with the weighted pixel values in the surrounding area (usually
- including itself as well). The available convolve operations are:
-
- SMOOTH
- SHARPEN
- LAPLACIAN
- VERTICAL EDGE
- HORIZONTAL EDGE
- HIGH FREQUENCY
- LOW FREQUENCY
- CUSTOM...
-
- The "Custom..." option brings up a custom matrix editor. This
- window displays nine cells in a three by three format. You can select
- and edit the value in each of the cells. Each cells value will be
- multiplied by the corresponding pixel value, and the sum of all nine
- will be stored at the center pixel.
-
- For information on the other convolutions, refer to the individual
- command descriptions.
-
- Options:
- If SHIFT is held when one of these options is selected, then
- the custom matrix editor is brought up with the contents of the
- selected averaging matrix. You can edit it to suit your needs.
- Note: the built-in matrices cannot be changed, they are fixed
- and will be reset each time you use them.
-
-
- COPY
- ----
- The "Copy" operation copies the selected area to the clipboard.
-
-
- CUT
- ---
- The "Cut" operation copies the selected area to the clipboard,
- then clears the resulting area to the background color.
-
- Options:
- If the SHIFT key is held, the area is set to the last color that
- was selected in the color palette.
-
- See: CLEAR, PALETTE
-
-
- DELETE...
- ---------
- The "Delete..." item calls up the file requester. Selecting a
- file and then the OK gadget will delete the that file.
-
-
- DELETE COLORS...
- ----------------
- The "Delete Colors..." function beings up a requester which has
- a box for every possible color, numbered from 0..n. To delete a
- represented color, click on an open box and an 'X' will appear in
- it. When "OK" is selected, every marked color will be deleted from
- the picture. The remaining colors are then packed further down into
- the palette. "Delete Colors..." allows you to remap the color palette,
- possibly reducing the number of colors (and therefore, graphics bit
- planes) required.
-
-
- DISPLAY
- -------
- The "Display" function causes ImageLab to open a screen and display
- the two-dimensional representation of the FFT you have computed (you
- cannot select this function unless FFT data is present, whether created
- or loaded).
-
- The "Display" function is controlled by the two options:
- "Log Display" and "Normal Display".
-
- Note: you do not have to re-compute the FFT if you only change the
- display modes.
-
-
- DISTORT...
- ----------
- The "Distort..." function introduces distortion into the picture or
- selected area. Distortion is simulated by displacing the pixel in a
- random direction at random intervals (the distortion probability).
-
- A requester allows you to specify the approximate percentage
- probability that distortion will occur, from 0 (never) to 100 (always).
-
-
- EDIT PARAMETERS...
- ------------------
- The "Edit Parameter..." function allows you to change the size,
- depth, or modes of the current picture. When selected, a requester
- is brought up, as follows:
-
- +-------------------------------------+
- | Enter the new screen parameters: |
- | |
- | Width: 640 |
- | |
- | Height: 200 |
- | |
- | Depth: 5 |
- | |
- | [] HAM [] Interlace |
- | |
- | [] Extra-Half-Bright |
- | |
- | [ Ok ] [ Cancel ] |
- +-------------------------------------+
-
- To enable a screen mode (HAM, Interlace, or Extra-Half-Bright), click
- in the box until an 'X' is present. To disable that mode, click until
- the 'X' is not present. Size parameters can be changed by editing the
- displayed values.
-
- Options:
- If the SHIFT key is held while "Edit Parameters..." is selected,
- it will ignore the selected area and will use the total size of the
- picture as the default size instead.
-
- Note: FFT data is preserved across this function, although its
- applicability is highly questionable.
-
-
- FFT
- ---
- The "FFT" Menu provides access to the FFT operations. The available
- functions are:
-
- TRANSFORM
- INVERSE
- --------------
- TRANSLATION ON
- NO TRANSLATION
- --------------
- DISPLAY
- LOG DISPLAY
- NORMAL DISPLAY
- --------------
- FREE FFT
-
- For information on the FFT operations, refer to the individual
- command descriptions.
-
-
- FFT TOOLS
- ---------
- The "FFT Tools" menu performs operations on FFT data that has been
- generated. It has the following options:
-
- ZERO REAL
- ZERO IMAGINARY
- INVERT REAL
- PHASE RANDOMIZE
-
- The "Zero Real" option sets the real part of the complex FFT data to
- zero, while "Zero Imaginary" clears the imaginary part. "Invert Real"
- replaces the real part with its reciprocal. Phase randomize replaces
- the phase component of the FFT data with a random value (it must
- convert the data to polar form and back, so this can be slow).
-
-
- FILTER
- ------
- The "Filter" menu provides access to various image filter methods
- other than the Convolve and Average functions. The available filters
- are:
-
- SOBEL
- ROBERTS
- BINARY...
- THRESHOLD...
- PIXELIZE...
- MINIMUM
- MEDIAN
- MAXIMUM
- ------------
- DISTORT...
- NOISE...
-
- For information on the filter operations, refer to the individual
- command descriptions.
-
-
- FLIP
- ----
- The "Flip" item flips the selected area around an imaginary
- axis. The "Horizontal" options flips it around an vertical axis,
- producing a mirror image. The "Vertical" options flips it around
- a horizontal axis, producing an upside-down image.
-
-
- FREE FFT
- --------
- The "Free FFT" function releases all memory associated with an
- FFT. If you are pressed for space, this function will free up quite
- a bit, since 16 bytes are required for each pixel in the FFT area.
-
-
- GAMMA CORRECTION
- ----------------
- The "Gamma Correction" applies a series of corrective factors to
- the greyscale color map, based upon empirical values for the Amiga
- monitor. These factors vary quite a bit; to alter them, hold down
- the SHIFT key when selecting "Gamma Correction" and a requester will
- allow you to enter other values for gamma, c, and I0. The default
- values are:
-
- gamma = 0.5
- c = 1.75
- I0 = 1.00
-
-
- GREYSCALE
- ---------
- The "Greyscale" option sets the picture's color map to a linearly
- increasing range. This option automatically adjusts to different
- picture depths, but since the Amiga's video DAC's are only 4 bits
- wide, only 16-color pictures can make proper use of greyscale images.
- Pictures with more than 16 colors will have repeated grey colors,
- while those with less than 16 colors will have skipped values.
-
-
- HALFTONE...
- -----------
- The "Halftone..." function allows the conversion of the current
- screen to a halftoned image. A requester allows the selection of a
- two-cell or three-cell halftone (note that this implies that the
- resulting picture will be two or three times as large as the
- selected area).
-
-
- HAM CONVERSION
- --------------
- The "HAM Conversion" option is enabled only when the loaded
- picture is in HAM mode. Selecting this function converts the
- picture or selected area to a 4-plane greyscaled image.
-
- "HAM Conversion" correctly processes selected area that do not
- begin in the left-most column by scanning all pixels to the left of
- the selection area and tracking the resulting RGB values.
-
-
- HISTOGRAM
- ---------
- The "Histogram" function "Display" counts the number of each pixel
- value in the picture or selected area, and displays the totals. The
- "Equalize" function uses this information to "tweak" the color palette
- values to obtain a more uniform color distribution.
-
- The options for the Histogram Display function is:
-
- INCLUDE BLACK
- EXCLUDE BLACK
- BAR GRAPH
- LINE GRAPH
-
- The "Include Black" and "Exclude Black" options determine whether
- black colors are included in the display. Since the plot is
- automatically scaled to fit the main ImageLab display window, if your
- picture has a lot of black (as in a picture on a background), it will
- be hard to see the pixel distribution if the large number of black
- pixels flattens the curve. Normally, this is not a problem and black
- pixels are included.
-
- The "Bar Graph" and "Line Graph" options cause the histogram
- plot to be a bar graph or a line graph, as expected.
-
- Note: The Display options do not affect the Equalize function in
- any way.
-
-
- HORIZONTAL EDGE
- ---------------
- The "Horizontal Edge" operation uses graphical convolution to
- highlight horizontal edges (but not vertical ones). The kernel used is:
-
- -1 -1 -1
- 0 0 0
- 1 1 1
-
-
- ICONS
- -----
- The "Icons" item controls whether ImageLab creates an icon whenever
- a file is saved (via "Save" or "Save As..."). The options are:
-
- ON
- OFF
-
- If ON is selected, an icon is generated that resembles the Deluxe
- Paint (tm) icon, except that the default project is ImageLab.
-
- Icon generation defaults to off if ImageLab is run from the CLI,
- and to on if it is run from WorkBench. Icon generation can be
- controlled by the options:
-
- -b (from the CLI)
- ICON=OFF (from the WorkBench)
-
-
- INTENSITY
- ---------
- The "Intensity" item is used to alter the intensity of the picture
- or selected area. The first three options are:
-
- BRIGHTEN
- DARKEN
- OTHER...
-
- These functions incrementally add or subtract a value from the picture,
- causing the image to brighten or darken, respectively. The "Other..."
- option allows you to enter a step value other than one; to use it,
- enter the decimal step value you want, and click on the direction
- gadget (the 'delta' symbol to the left) to select the up direction
- ( /\ ) or the down direction ( \/ ).
-
- SCALE UP
- SCALE DOWN
- OTHER...
-
- These three function cause the intensity to be scaled more strongly
- than the previous three by using a multiplicative function. "Scale Up"
- scales each pixel value by 2 (overflow values are truncated at the
- maximum pixel intensity), while "Scale Down" halves its intensity.
- The "Other..." option works like the previously described requester,
- except that the value obtained from you is either multiplied or divided,
- depending upon the direction you select.
-
- ROOT
-
- The "Root" option dramatically scales down large intensity range by
- replacing each pixel by its square root.
-
-
- INVERSE
- -------
- The "Inverse" operation computes the complex conjugate of the FFT
- data. If the data has not been modified, you can use Display and your
- original picture will be regenerated. If it has been altered in some
- way, you source may substantially return, with some errors introduced.
- The "Merge/XOR" function can quickly highlight changed pixels.
-
- Note: if translation is enabled, you picture will return rotated 180
- degrees. You can use the "Flip" functions (both in sequence) to
- quickly correct this.
-
-
- LAPLACIAN
- ---------
- The "Laplacian" operation uses graphical convolution to highlight
- outline edges. The kernel used is:
-
- -1 -1 -1
- -1 8 -1
- -1 -1 -1
-
-
- LINEARIZE
- ---------
- The "Linearize" option converts the palette to a monotonically
- increasing palette. ImageLab requires such a palette for its
- image processing function to perform properly. For example, if your
- four color palette is:
-
- 000 555 fff aaa
-
- the "Linearize" function will re-order it as:
-
- 000 555 aaa fff
-
- Note that this function requires rewriting all pixels in the picture
- in order to avoid changing its appearance. This function will be
- required for some DigiView pictures which do not use a linearly
- increasing palette.
-
-
- LOG DISPLAY
- -----------
- If the "Log Display" option is enabled, the "Display" function will
- perform a logarithmic enhancement to the FFT data before displaying it.
- The dynamic range of the FFT falls off sharply along the axes from the
- DC component at zero.
-
-
- LOW FREQUENCY
- -------------
- The "Low Frequency" kernel highlights unchanging areas. The kernel
- used is:
-
- -1 -1 -1
- -1 1 -1
- -1 -1 -1
-
-
- MAP COLORS...
- -------------
- The "Map Colors..." function operates similarly to "Delete Colors",
- except that only two colors can be selected. When "Ok" is selected,
- those two colors are exchanged in both the color map and the picture.
-
- See: DELETE COLORS...
-
-
- MAXIMUM
- -------
- The "Maximum" function replaces each pixel with the maximum value
- found in the surrounding eight pixels.
-
-
- MEDIAN
- ------
- The "Median" function replaces each pixel with the median value
- found in the surrounding eight pixels. Since a sort is required to
- find a median, this function is slower than the corresponding "Minimum"
- or "Maximum" functions.
-
-
- MERGE...
- --------
- The "Merge" item is used to combine the current picture with
- another loaded from disk. The options available with merge are:
-
- OVERLAY
- ADD
- SUBTRACT
- AND
- OR
- XOR
- OTHER...
-
- The "Overlay" function copies all pixels in the merge picture onto
- the current one wherever the current one contains a zero pixel.
-
- The "Add" and "Subtract" functions perform arithmetic merges of the
- two pictures, paying attention to underflow/overflow issues.
-
- The "AND", "OR", "XOR", and "Other..." functions use the Amiga's
- blitter to perform the requested boolean operations. The "Other..."
- function allows custom blitter operations; to use, enter the blitter
- minterm as a decimal number (or i hex if you preceed it with '$').
-
- Refer to the Amiga Hardware Reference Manual for details on the
- blitter.
-
-
- MINIMUM
- -------
- The "Minimum" function replaces each pixel with the minimum value
- found in the surrounding eight pixels.
-
-
- MOVE
- ----
- The "Move" item moves the pixels from the currently selected area
- to a destination of your choosing. When "Move" is selected, a
- draggable box is positioned on the screen. Click down to begin
- positioning it, and release the button when you are over the target
- area.
-
- Note: the image is copied off-screen first, so overlapping images can
- be produced.
-
-
- NEGATIVE
- --------
- The "Negative" option reverses the order of the color map. If
- the picture currently has a greyscale color map, the picture will
- appear as a negative. This can make it easier to pick out features
- of the picture. Using this function on color pictures is...
- interesting -- you will generally want to convert it to black and
- white first.
-
-
- NO TRANSLATION
- --------------
- The "No Translation" function disables the displacement of the
- FFT function to the center of the FFT area. With this option
- enabled, the FFT data places the DC component at the lower left
- corner, with reflection in all the other corners.
-
- Note: if the translation options is changed, you must re-compute
- the FFT for it to have any effect.
-
-
- NOISE...
- ----------
- The "Noise..." function introduces impulse noise into the picture
- or selected area. Noise is generated by writing the brightest pixel
- (white) at random intervals (the noise probability).
-
- A requester allows you to specify the approximate percentage
- probability that noise will occur, from 0 (never) to 100 (always).
-
- Options:
- If SHIFT is held while making this selection, then the impulse
- noise generated will be the darkest color instead (black).
-
-
- NORMAL DISPLAY
- --------------
- If the "Normal Display" option is enabled, the "Display" function
- will not perform a logarithmic enhancement to the FFT data before
- displaying it. Unless you source picture is quite extraordinary,
- all you will probably get is a white pixel at the DC term location.
- Use the "Log Display" option to enhance the display.
-
-
- OPEN...
- -------
- The "Open..." item brings up a file requester (C. Heath's famous
- one). Select the IFF file you want to use, and select OK. ImageLab
- does not currently support SuperBitMap screens, so your picture must
- fit within the standard Intuition limits: about 720 x 500.
-
- If there is an image opened already, and it has been modified,
- then a requester will be displayed. Select "OK" to discard your
- changes, and proceed with loading the new image.
-
- Option:
- If SHIFT is held while making the "Open..." selection, then
- one bit plane will be stripped from the file while it is read in.
- This is useful to process Digi-View files (which have an extra bit
- plane in them) in ImageLab. This has the same effect as the
- "Restrict Palette" item, but conserves the memory that would otherwise
- be needed.
-
-
- PAINT
- -----
- The "Paint" item puts creates a toolbox on the picture and allows
- you to modify the pixels with the mouse. The toolbox contains
- gadgets for:
-
- DRAW
- XOR
- RANDOM
- TRACE
-
- The "Draw" option draws the last color selected with the palette.
- If FFT data is present, the real component is changed to the
- selected color value.
-
- The "Xor" option toggles the pixels on the screen using the
- exclusive-or operator. If FFT data is present, the real
- component is replaced by the reciprocal.
-
- The "Random" option draws a random color on the screen. If FFT
- data is present, the real component is changed to a floating
- point random value.
-
- The "Trace" option works like "Draw", except that intermediate
- pixels are connected. This produces smooth line drawing.
-
-
- PALETTE...
- ----------
- The "Palette..." option brings up a color palette on the screen.
- You can select a particular color from the block on the palette window,
- and alter its red, green, and blue components using the three sliders
- labelled R, G, and B.
-
- If you select "OK", the changes are added to your picture. If
- you select "Cancel", the old palette is restored.
-
-
- PASTE
- -----
- The "Paste" item copies the contents of the clipboard into the
- current picture, if it is an IFF image. It the clipboard is empty,
- you will receive an error message. Otherwise, a draggable rectangle
- will be placed on the picture, which you can position where desired.
- Click once to begin dragging it, then release it over the position
- you want, and the data will be inserted.
-
-
- PICTURE INFO
- ------------
- The "Picture Info" item opens a window and displays the following
- information about the picture file currently open:
-
- Name: .......... (name of the file)
- File Size: ..... (size in bytes)
- Size: .......... (size of the picture: L x W x H)
- Mode: .......... (picture modes: EHB, HAM, INTERLACE flags)
- Area: .......... (selected area, if any: location and size)
- FFT: ........... (number of bytes of FFT information available)
-
-
- POSITION
- --------
- The "Position" item has some functions used to position the picture.
- Since there are no front/back gadgets, and no drag bar, positioning the
- screen is somewhat more difficult. The options are:
-
- SCREEN TO FRONT
- SCREEN TO BACK
- OCCUPY ALL
- OCCUPY MIDDLE
- OCCUPY LOW
-
- The FRONT and BACK items can also be performed by the LEFT-AMIGA M and
- LEFT-AMIGA N keys, respectively, if no other screen are open. The ALL,
- MIDDLE, and LOW items position the screen to occupy all, half, or a small
- portion of the WorkBench screen. The menu keys for these three functions
- are LEFT-AMIGA- ',', '.', and '/', respectively (chosen for convenience,
- not for any mnemonic function).
-
-
- PSEUDOCOLOR
- -----------
- The "PsuedoColor" option converts the palette to values such that
- dark colors are tinted blue (i.e., "cold") and bright colors
- are tinted red (i.e., "hot"). Average colors are given a green hue.
- The effect is much like a thermograph, and tends to accentuate the
- difference between pixels. If the SHIFT key is held when the "Pseudo-
- Color" function is selected, the color map is randomized. This is
- mostly for fun.
-
-
- QUIT
- ----
- The "Quit" item closes the picture and leaves ImageLab. If the
- picture has been modified but not saved, a requester will be brought
- up to give you a chance to save it first.
-
-
- RESIZE
- ------
- The "Resize" item causes the selected item to be resized. The
- resizing options are:
-
- COPY
- INTERPOLATE
- HALVE
- DOUBLE
-
- The "Copy" and "Interpolate" items are operated identically: you
- drag the resizing rectangle to the desired size. When you release
- the mouse button, the selected area is scaled up or down to fit in
- the desired area (it is possible to scale up in one dimension and
- scale down in another at the same time).
-
- The difference between "Copy" and "Interpolate" arise when the
- area is expanded: "Copy" just copies the first pixel to fill the
- expanded area, while "Interpolate" employs bilinear interpolation
- to fill in the area. Interpolation produces a smoother picture,
- but is slower to operate.
-
- The "Halve" and "Double" options allow you to quickly resize the
- selected area to half or twice its original size, respectively. The
- "Double" operation employs interpolation for best results.
-
- Option:
- If SHIFT is held while selecting the target area, the selection
- box will be kept square.
-
-
- RESTRICT PALETTE
- ----------------
- The "Restrict Palette" function if primarily used to deal with
- image files which have a palette larger than is necessary to
- represent the picture (i.e., the picture has 16 colors, but the
- palette has 32 locations reserved). This occurs often with DigiView
- pictures, which creates an extra bit-plane for internal control
- functions. The options are:
-
- ON
- OFF
-
- If ON, then the palette is halved (regardless of the total number).
- This option is reset to OFF whenever a new picture is loaded (or
- reverted), or when the screen parameters are edited.
-
- See also: EDIT PARAMETERS, OPEN
-
-
- PIXELIZE...
- -----------
- The "Pixelize..." function replaces each pixel with <n> copies
- of itself, where <n> is from 2 to 10. This effect "computerizes"
- images, by craeting a blocky image of low resolution (i.e., IBM
- compatible).
-
-
- REVERT
- ------
- The "Revert" menu item is enabled when any changes have been made
- to your image, or to its color-map. Selecting "Revert" recalls the
- file from disk.
-
-
- ROBERTS
- -------
- The "Roberts" transform is a variation of the "Sobel" transform,
- both of which are effective at outline tracing. The Roberts transform
- uses the L->R, U->D, and diagonal gradients at each pixel location
- in the picture or selected area.
-
-
- SATURATE
- --------
- The "Saturate" function converts the palette to values such that
- all colors are saturated (i.e, if a color is mostly red, it becomes
- pure red).
-
- Option:
- If the SHIFT key is held while selecting this function, then
- the intensity level is also intensified; this forces each pixel to a
- primary color.
-
-
- SAVE
- ----
- The "Save" item allows writing to disk your current image file, and
- any changes that have been made to it. A user-settable option allows
- ImageLab to create icons and include ImageLab specific information in
- the IFF file.
-
- See Also: SAVE TYPE
-
-
- SAVE AS...
- ----------
- The "Save As..." item allows writing to disk your current imageo
- using a different file name. Selecting this item brings up a file
- requester, allowing you to alter the current filename or enter a new
- one. If OK is selected, then the file is saved as described in the
- "Save" function.
-
-
- SAVE TYPE
- ---------
- The "Save Type" item specifies how pictures will be saved. The
- first three items are:
-
- NO COMPRESSION
- COMPRESS RUNS
- CHOOSE
-
- which are mutually exclusive. The first two items can be selected to
- indicate what type of data compression to use in the IFF picture file.
- The default is to save in the mode that the currently open picture was
- originally saved (usually "COMPRESS RUNS").
-
- If the special item 'CHOOSE' is selected, ImageLab will write out
- the file using both methods, then bring up a requester showing the
- total file sizes using both methods. You can then elect to save the
- smallest one.
-
- The second set of Save options are:
-
- NO FFT DATA
- SAVE FFT DATA
-
- which control the saving of any FFT data generated by the FFT function.
- By default, this is disabled, since ImageLab uses a custom IFF id
- to do so (this *should* be transparent to picture display programs, but
- that is not always true).
-
-
- SHARPEN
- -------
- The "Sharpen" operation uses graphical convolution to accentuate
- the differences between the center pixel and the surrounding ones.
- The kernel used is:
-
- -1 -1 -1
- -1 9 -1
- -1 -1 -1
-
-
- SMOOTH
- ------
- The "Smooth" operation uses graphical convolution to smooth the
- area selected by using the smoothing kernel:
-
- 1 1 1
- 1 1 1
- 1 1 1
-
-
- SOBEL
- -----
- The "Sobel" transform is a highly effective outline tracing
- function, which examines the gradients present at each pixel
- location in the picture or selected area.
-
-
- THRESHOLD...
- ------------
- The "Threshold..." function reduces the range of a picture or
- selected area by clipping pixels which fall outside a user-defined
- range. Values outside this range are clipped to the minimum or
- maximum, as appropriate.
-
- To select a threshold, a requester is brought up which has two
- sliders on it: adjust the minimum and maximum values to your
- desired range. Note: the requester will reject attempts to set a
- minimum greater than a maximum.
-
-
- TRANSFORM
- ---------
- The "Transform" function invokes ImageLab's two-dimensional FFT
- routine. FFT's convert time domain information (a picture is a valid
- representation of this) to frequency domain information. Using the
- default settings, the transform of an image produces a strong DC
- component at the center (representing the uniform background) with
- sine circles radiating outwards (representing the edge frequencies
- of components in the picture).
-
- Refer to any good textbook for a better explanation of this.
-
- When the FFT has been computed, you can use the "Paint" functio
- to introduce errors in the transform, and use the "Inverse" function
- to try to recover your picture. For fun, try blotting out the strong
- DC term in the center of the picture.
-
- ImageLab uses an FFT instead of a DFT for speed; however, FFT's
- must be a power of two in both dimensions (2, 4, 8, etc.). If the
- picture or selected area is not a power of two in size, the FFT Size
- requestor is brought up first. This requester looks like:
-
- +--------------------------------------------------+
- | The selected FFT area must be a power of two in |
- | size. Adjust the desired size: |
- | |
- | +---------+---------------+ |
- | |@+--+@@@@| | |
- | |@+--+@@@@| | [] Overscan |
- | |---------+ | |
- | | | Size: /\ |
- | | | < > |
- | | | \/ |
- | +-------------------------+ |
- | Select: (77,18)..(140,33) Area: [64 x 16] |
- | Screen size: (320,200) |
- | FFT Max: (1024,1024) |
- | |
- | [ Ok ] [ Cancel ] |
- +--------------------------------------------------+
-
- To alter the size of the selected area, click on the arrow gadgets.
- The "up" and "left" arrow reduce the Y and X dimensions, respectively;
- the "down" and "right" arrows increase them. You can also use the
- arrow keys on the keyboards.
-
- To alter the origin of the selected area, use the arrow gadgets as
- described before, but hold the SHIFT key down while clicking on the
- gadgets or using the keyboard. This steps the origin by one in the
- selected direction; if the ALT key is also held, the origin shifts
- by ten.
-
- If the "Overscan" gadget is selected, you can perform FFT's of
- entire pictures (if you have enough memory). Selecting this gadget
- transforms the requester as shown:
-
- +--------------------------------------------------+
- | The selected FFT area must be a power of two in |
- | size. Adjust the desired size: |
- | |
- | +-------------------------+ |
- | | | |
- | | +-----------+ | [] Overscan |
- | | | @@@@@@@ | | |
- | | | @@@@@@@ | | Size: /\ |
- | | +-----------+ | < > |
- | | | \/ |
- | +-------------------------+ |
- | Select size: (512,256) |
- | Screen size: (320,200) |
- | FFT Max: (1024,1024) |
- | |
- | [ Ok ] [ Cancel ] |
- +--------------------------------------------------+
-
- The FFT Transform function pads the FFT data to fill in the
- unspecified areas when overscan is performed.
-
- When the FFT is properly set up, select OK to begin the transform.
- This can take some time for FFT's over about 32 by 32 (on a standard
- MC68000 Amiga). A bar chart tracks the FFT's progress in the ImageLab
- display window.
-
-
- Note: the only functions which can alter the associated FFT data is
- the "Paint" function.
-
- Options:
- If the SHIFT key is held while selecting "Transform", then the
- FFT Size requester is brought up regardless of the selected size.
-
-
- TRANSLATION ON
- --------------
- The "Translation On" function enables the displacement of the
- FFT function to the center of the FFT area. Without this option
- enabled, the FFT data places the DC component at the lower left
- corner, with reflection in all the other corners.
-
- Note: if the translation options is changed, you must re-compute
- the FFT for it to have any effect.
-
-
- UNDO
- ----
- The "Undo" operation attempts to undo the last operation that was
- done. Undo works well with color palette changes, but currently
- cannot undo changes to the picture itself; use the "Revert" command
- for that.
-
- Only one level of "undo" is supported.
-
-
- UNSELECT
- --------
- The "Unselect" operation clears the select rectangle from the
- picture, causing all ImageLab operations to be performed on the
- entire picture.
-
-
- VERTICAL EDGE
- -------------
- The "Vertical Edge" operation uses graphical convolution to highlight
- vertical edges (but not horizontal ones). The kernel used is:
-
- -1 0 1
- -1 0 1
- -1 0 1
-