home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
graphics
/
utilities
/
imagelab_452
/
imagelab.doc
< prev
next >
Wrap
Text File
|
1991-02-13
|
51KB
|
1,570 lines
-------------------------------------------------------------------------
####### # # ##### ##### ####### # ##### ######
# ## ## # # # # # # # # # #
# # # # # # # # # # # # # #
# # # # ####### # #### ####### # ####### #######
# # # # # # # # # # # # #
# # # # # # # # # # # # #
####### # # # # ##### ####### ####### # # ######
-------------------------------------------------------------------------
ImageLab V2.4
Copyright 1991
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 possible.
ImageLab is copyrighted, but is freely distributable for non-commercial
purposes. A shareware fee of $25 or so is suggested if you find it useful,
and would help encourage future additions. That, in fact, was the
motivation for me to produce V2.4.
ImageLab is an evolving program. If you find it interesting, have
a few suggestions, bug reports (gads!), etc. you can contact me at:
mail: Gary Milliorn
5915 Shanghai Pierce Rd.
Austin, Tx 78749-1927
bix: gmill
I can't promise everything, but I do endeavor to make it as good as I can.
1.1 GENERAL
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. There are command
keys for most of the important functions, so this may not be such a
onerous restriction.
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
manually.
A this possibility is to keep both screens at the top and flip between
them using the AMIGA-N and AMIGA-M key or the space bar.
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 simulates
the cancel gadget.
Functions 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.
Functions which have alternate operations (such as Open, Gamma, et. al.)
perform the alternate function when either ALT key is held (naturally).
All menu items which call up a requester for additional information
have '...' appended to them.
1.2 REQUIREMENTS
* Amiga 500..3500
* MC68000 or better.
* 512K memory (the more, the better).
* AmigaDos V1.2 software or newer.
* ARP Library version 39.1 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 FUTURE ITEMS
* HSI in color palette.
* HSI separation and merge.
* Programmable convolution kernel sizes.
* Multiple image screens.
* Better 'undo'.
* ???
1.6 MISCELLANEOUS
Copyright 1991 by Gary W. Milliorn
All rights reserved.
Developed using Manx C 5.0d, 32-bit mode.
-----------------------------------------------------------------------------
2.0 INSTALLATION
As of V2.3a, ImageLab requires the ARP library to work properly.
By now, most people know about ARP so I'll not cover it's installation.
ImageLab only requires that the "arp.library" exist in the LIBS: directory.
To install the ImageLab program in your system, you can use the install
shell script to perform the default installation procedure. Review the file
first, and if it is acceptable to you, just enter "execute install" at any
CLI and it will run automatically.
Otherwise, review the following paragraphs to manually install whatever
portions you would like to have.
2.1 IMAGELAB PROGRAM
Except for the ARP library, ImageLab does not require any of the other
files supplied with the distribution archive to be present. 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, such as "C:", "SYS:bin:", or wherever you prefer non-C-A programs
to reside.
2.2 IMAGELAB FONTS
ImageLab comes with a font, "ceres", a bold-faced, proportional, 9
point font that (I think) looks nice when used with menus. Its installation
is strictly optional, as ImageLab handles fonts of any style and size, up to
a reasonable point (Helvetica/50 is right out). Use your own favorite, if
you want.
If no particular font is specified when ImageLab is started, it first
tries to open this font, then tries Topaz/9, then reverts to the default
system font.
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 [-a str][-biv][-c #][-f font] [[dir/]file]
the options are:
-? : summarize CLI usage.
-a str : set IFF `ANNO' chunks to 'str' on write.
-b : enable the bell.
-c ## : set the clipboard unit to ## (default is 0).
-f font : specify font. Fonts are specified as
"name/size", as in "Helvetica/9".
-i : enable icon generation.
-v : verbose. If set, ImageLab prints debugging
info.
dir/file : load initial image from `file' (in the
specified directory). File requester
directory defaults to `dir'.
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.
ANNO=str : set IFF `ANNO' chunks to 'str' on write.
BELL=ON|OFF : if ON, create bells; otherwise, do not.
CLIP=## : set the clipboard unit to ## (default is 0).
FONT=name : set the ImageLab font to "name"
Fonts are specified as "name/size",
ICON=ON|OFF : if ON, create icons; otherwise, do not.
VERBOSE=ON|OFF : if ON, ImageLab writes debugging information
to its WorkBench window. Do NOT use without
a "WINDOW..." specification.
WINDOW=CON:etc.. : create a message window of the specified size.
Mostly just for debug support. Do NOT remove!
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.
NOTE: ImageLab *MUST* have a "WINDOW=" tooltype when it runs, even if you
don't use the VERBOSE option. If this annoys you, get ConMan and edit
it to be "WINDOW=CND:0/130/640/60/ImageLab Console" (a deferred open console)
and the window won't open unless any messages are written.
-----------------------------------------------------------------------------
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.
F1-F5 - reserved.
F6 - Disable Paint (enables Area Select tool).
F7 - Paint: Draw mode.
F8 - Paint: Trace (fill-in) mode.
F9 - Paint: XOR mode.
F10 - Paint: Random mode.
SPACE - bring ImageLab Menu window to front.
UP - scroll image up 1 line.
DOWN - scroll image down 1 line.
LEFT - scroll image left 1 line.
RIGHT - scroll image right 1 line.
SHIFT-UP - scroll image up 10 lines.
SHIFT-DOWN - scroll image down 10 lines.
SHIFT-LEFT - scroll image left 10 lines.
SHIFT-RIGHT - scroll image right 10 lines.
ALT-UP - scroll image up one screen.
ALT-DOWN - scroll image down one screen.
ALT-LEFT - scroll image left one screen.
ALT-RIGHT - scroll image right one screen.
CTRL-UP - position the screen up 10 lines.
CTRL-DOWN - position the screen down 10 lines.
AMIGA-0 - Clear Area.
AMIGA-1 - Smooth Convolution.
AMIGA-2 - Sharpen Convolution.
AMIGA-3 - Sobel Transform.
AMIGA-4 - Roberts Transform.
AMIGA-5 - Binary Transform.
AMIGA-6 - Threshold Transform.
AMIGA-7 - Flip Horizontal.
AMIGA-8 - Flip Vertical.
AMIGA-9 - Pseudo-Color Palette.
AMIGA-A - Average Area.
AMIGA-B - Convert Color to Black & White.
AMIGA-C - Copy selected area.
AMIGA-D - Display FFT Transform.
AMIGA-E - Edit/paint picture.
AMIGA-F - FFT Transform.
AMIGA-G - Greyscale Palette.
AMIGA-H - Histogram Function.
AMIGA-I - Inverse FFT Transform.
AMIGA-J - Invert Area.
AMIGA-K - Close Picture.
AMIGA-L - Laplacian Convolution.
AMIGA-M - Duplicate Area.
AMIGA-N - Noise Generation.
AMIGA-O - Open Picture.
AMIGA-P - Palette Edit.
AMIGA-Q - Quit ImageLab.
AMIGA-R - Revert Picture to Old Version.
AMIGA-S - Save Picture.
AMIGA-T - Distort.
AMIGA-U - Interpolated Copy Area.
AMIGA-V - Paste Area.
AMIGA-W - Double Area.
AMIGA-X - Cut Area.
AMIGA-Y - Copy Area.
AMIGA-Z - Undo last operation.
AMIGA-[ - Darken Image.
AMIGA-] - Brighten Image.
AMIGA-< - Scale Down Image.
AMIGA-> - Scale Up Image.
AMIGA-- - Negative Palette.
AMIGA-= - Histogram Palette Equalization.
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 subject is listed in the order it appears in the menus,
in left-to-right, top-to-bottom order. The heading for each subject
includes the names of the menus on the levels preceeding it, if any.
PROJECT ABOUT
The "About" menu item provides general information about ImageLab,
such as:
* Version number
* Shareware status.
* Where to contact me to register.
* Where to send suggestions and bug reports.
* How much free memory is available.
* Access to the "help" system.
Click on the "OK" gadget when you are done, or click on "Help" to get
further information.
PROJECT INFO
The "Info" item opens a window and displays the following information
about the picture file currently open:
+--------------------------------------+
| Name: "filename". | Name of the Image File.
| File Size: 12345 bytes. | Size of the Image File.
| Image Size: LLL x WWW x HH. | Total Size of the Image.
| Screen Size: LLL x WWW x HH. | Displayed Size of the Image.
| Pixel Range: 0..N. | Active pixel range.
| Mode: (none). | Screen Modes: EHB, HAM, HIRES, etc.
| Region: (0,0)..(8,8) Size: [9 x 9]. | Selected area: location and size.
| FFT: 1024 complexes. | Size of FFT retained information.
+--------------------------------------+
PROJECT OPEN...
The "Open..." item brings up the ARP file requester. Refer to the ARP
documentation for further details on the file requester, but it is fairly
straightforward.
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. Pressing either ALT key when beginning
"Open..." will cause any opened image to be discarded without asking
first.
Select the IFF file you want to use, and select OK to read in the image
or CANCEL to stop loading in a new picture. The file may be any standard
IFF image as long you have sufficent CHIP memory to load the image.
OPTIONS
ALT - if held down while making the "Open..." selection, then
ImageLab will close any open, edited picture without asking
you to verify that you want to discard the changes. All
changes will be lost.
SHIFT - if held down 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" option,
but conserves the memory that would otherwise be needed.
PROJECT REVERT
The "Revert" menu item re-opens the image using the contents of the
last file you opened or saved. This menu item is only enabled when any
changes have been made to your image, or to its color-map.
Revert recognizes the same options as the Open function (see PROJECT
OPEN).
PROJECT CLOSE
"Close" closes the current image and frees all associated memory
(including any FFT data). If the image has been modified but not saved,
a warning requester will be displayed first.
OPTIONS
ALT - if held down while making the "Close" selection, then
ImageLab will close any open, edited picture without asking
you to verify that you want to discard the changes. All
changes will be lost.
PROJECT SAVE
The "Save" item writes to disk your current image file, including
any changes that have been made to it. User-settable options allow
ImageLab to create icons and/or include ImageLab specific information in
the IFF file.
See Also: SAVE FFT
SAVE TYPE
ICONS
PROJECT SAVE AS...
The "Save As..." item allows you to save the current image under
a different name. Selecting this item brings up the ARP 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.
PROJECT QUIT
The "Quit" menu item closes the image and exits 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.
OPTIONS
ALT - if held down while making the "Close" selection, then
ImageLab will close any open, edited picture without asking
you to verify that you want to discard the changes. All
changes will be lost.
EDIT 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.
EDIT CUT
The "Cut" operation copies the selected area to the clipboard,
then clears the resulting area to the background color (color 0).
If either SHIFT key is held, the area is set to the foreground
color (the maximum pixel value, such as 15 for a 16 color screen).
EDIT COPY
The "Copy" operation copies the selected area to the clipboard.
EDIT PASTE
The "Paste" menu item copies the contents of the clipboard, if
there is any and it is an IFF ILBM FORM, into the image. If the
clipboard is empty, you will receive an error message.
To paste an area on the image, ImageLab brings the screen to the
foreground and puts a draggable rectangle (the size of the paste
area) on the screen. Position the area where desired, and click the
left mouse button to copy from the clipboard to that area.
Click the right mouse button or press the ESCAPE key to abandon
the attempt to paste the clipboard -- your image will remain unchanged.
EDIT CLEAR
The "Clear" operation sets the selected area to the background color
(color 0).
If either ALT key is held, the area is set to the foreground color
(the maximum pixel value, such as 15 for a 16 color screen).
EDIT UNSELECT
The "Unselect" operation clears the select rectangle from the
image, causing all ImageLab operations to be performed on the
entire image.
EDIT SCREEN
The "Edit Screen..." function allows you to change the size,
depth, or modes of the current image's screen (it does not affect
the image, which will be converted to a scrolling bitmap if the
screen shrinks). When selected, a requester is brought up, somewhat
like:
+-------------------------------------+
| Enter the new screen parameters: |
| |
| Width: [ 640 ] |
| |
| Height: [ 200 ] |
| |
| Depth: [ 5 ] |
| |
| ( ) HAM (/) LACE |
| |
| ( ) EHB ( ) HIRES |
| |
| [ Ok ] [ Cancel ] |
+-------------------------------------+
To enable a screen mode (HAM, Interlace, Hi-Res, or Extra-Half-Bright),
click in the box until it is selected with a check-mark (the current modes
are pre-selected). Size parameters can be changed by editing the displayed
values.
OPTIONS:
ALT - if held while "Edit Screen..." is selected, it will use the
size of the currently selected area as the default size
instead of the screen size.
EDIT IMAGE
The "Edit Image..." function allows you to change the size, or
depth of the current image. When selected, a requester is brought up,
somewhat like:
+-------------------------------------+
| Enter the new image parameters: |
| |
| Width: [ 640 ] |
| |
| Height: [ 200 ] |
| |
| Depth: [ 5 ] |
| |
| [ Ok ] [ Cancel ] |
+-------------------------------------+
NOTE: FFT data is preserved across this function, although its
applicability is highly questionable.
OPTIONS:
ALT - if held while "Edit Image..." is selected, it will use the
size of the currently selected area as the default size
instead of the total image size.
TRANSFORM DUPLICATE
The "Duplicate" item moves the pixels from the currently selected
area to a destination of your choosing. When "Duplicate" is selected, a
draggable box is positioned on the screen. Click the right mouse button
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.
TRANSFORM RESIZE
The "Resize" item causes the selected item to be resized, in a
variety of ways. When selected, the screen is brought to the front
(if needed) and the mouse drags to alter the size of the selected
area (the starting location cannot be changed). Select the approximate
area, and release the mouse button to begin resizing the area. Note
that it is possible to scale up in one dimension and scale down in
another at the same time.
TRANSFORM RESIZE COPY
The "Resize Copy" resizes an area by expanding or shrinking it
to fit the target area. When expansion is needed, pixels are
supplied by copying the last pixel encountered (the one immediately
above or to the left).
TRANSFORM RESIZE INTERPOLATE
The "Resize Interpolate" resizes an area by expanding or shrinking it
to fit the target area. When expansion is needed, pixels are supplied
by using bilinear interpolation to create reasonable pixels in the
intervening areas.
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.
TRANSFORM RESIZE HALVE
The "Halve" option allow you to quickly halve the selected area
to half its original size.
OPTIONS
ALT - if held while selecting the "Resize Halve" function, the
destination area will be kept square.
TRANSFORM RESIZE DOUBLE
The "Double" operation allows you to quickly double the size of
the selected area. "Double" employs interpolation for best results.
OPTIONS
ALT - if held while selecting the "Resize Halve" function, the
destination area will be kept square.
TRANSFORM FLIP HORIZONTAL
The "Flip Horizontal" item flips the selected area around an imaginary
vertical axis, producing a left-right mirror image.
TRANSFORM FLIP VERTICAL
The "Flip Vertical" item flips the selected area around an imaginary
horizontal axis, producing a top-bottom mirror image.
TRANSFORM INVERT
The "Invert" item inverts the selected area. This produces a negative-
like area for greyscale images.
TRANSFORM PAINT
The Paint functions are used to change what the mouse button does.
Normally, it is used to select areas, but if any of the paint functions
are selected, the mouse is used to change pixel values (and corresponding
FFT data points, if any).
TRANSFORM PAINT PAINT OFF
The "Paint Off" function is the default selected item. When checked,
the mouse is used to select areas of interest.
TRANSFORM PAINT DRAW
The "Draw" function is used to set pixels to the last selected color
(using the COLOR PALETTE function). FFT data is set to the real value
of the color index.
TRANSFORM PAINT XOR
The "XOR" function is used to toggle the pixels under the mouse.
FFT data is edited by complementing the sign of the imaginary component.
TRANSFORM PAINT RND
The "RND" function is used to replace the pixels under the mouse
and FFT real value with random values.
TRANSFORM PAINT TRACE
The "Trace" option works like "Draw", except that intermediate
pixels are connected. This produces smoothed lines; however, it
cannot be used to modify FFT data.
TRANSFORM FFT 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 function
is disabled. To select an FFT sized area, hold down the CONTROL key
while drag-selecting an area.
The Transform function can take some time for FFT's over about 32
by 64 (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.
TRANSFORM FFT 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, your source may substantially return, but with a few errors introduced.
The "Merge/XOR" function can quickly highlight changed pixels.
NOTE: if Translation is enabled (usually the case), your picture will
return rotated 180 degrees. You can use the "Flip Horizontal" and
"Flip Vertical" functions (both in sequence) to quickly correct this.
TRANSFORM FFT DISPLAY
The "Display" function causes ImageLab to replace a selected area
of the current screen with a two-dimensional representation of the FFT
data you have computed (you cannot select this function unless FFT data
is present, whether it was just created or loaded from a file).
When selected, the screen is popped forward, and you can use the
mouse to position a fixed-size rectangle on the screen. Click the
right mouse button over the desired area, and the FFT data will be
filled into that area.
NOTE: The "Display" function is controlled by the "Log Display"
option. You do not have to re-compute the FFT if you only change
the display modes.
TRANSFORM FFT TRANSLATION
The "Translation" function is a chcek-selected option that enables
the displacement (or offset) 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 reflections appearing in all
four corners, like so.
+-------------+ +-------------+
|*- -*| | |
|` `| | . |
| | | * |
| | | -*@*- |
| | | * |
|` `| | . |
|*- -*| | |
+-------------+ +-------------+
No Translation With Translation
NOTE: if the translation option is changed, you must re-compute
the FFT for it to have any effect.
TRANSFORM FFT LOG DISPLAY
If the "Log Display" option is checked, 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.
This option is automatically checked when you select the "Transform"
function, since that is the usual case. It is cleared when "Inverse"
is selected, for the same reason. If, for some reason, you don't want
this, you can override the settings before you select "Display".
Note that the FFT Transform data will be very black, possibly with
a singular white DC term at the center, unless you use the log enhancer.
TRANSFORM FFT ZERO REAL
The "Zero Real" option sets the real part of the complex FFT data to
zero.
TRANSFORM FFT ZERO IMAGINARY
The "Zero Imaginary" option sets the imaginary part of the complex
FFT data to zero.
TRANSFORM FFT INVERT REAL
The "Invert Real" function replaces the real part with its
reciprocal. The imaginary part remains unchanged.
TRANSFORM FFT PHASE RANDOMIZE
The "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).
TRANSFORM FFT 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.
TRANSFORM CONVOLVE
Convolution operations perform graphical convolution on the
selected area. Currently, all convolutions are 3x3 in size.
OPTIONS:
ALT - if held when any convolution function is selected, then
the custom matrix editor is brought up with the contents
of the selected convolution matrix. You can edit this
matrix to suit your needs.
NOTE: the built-in matrices cannot be changed, they are fixed
and will be reset each time you use them.
TRANSFORM CONVOLVE 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
"Smooth" rounds off rough edges of an image at a cost of clarity.
TRANSFORM CONVOLVE 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
"Sharpen" accentuates subtle changes of an image at a cost of
smoothness.
TRANSFORM CONVOLVE LAPLACIAN
The "Laplacian" operation uses graphical convolution to highlight
outline edges. The kernel used is:
-1 -1 -1
-1 8 -1
-1 -1 -1
TRANSFORM CONVOLVE LOW FREQUENCY
The "Low Frequency" kernel highlights unchanging areas. The kernel
used is:
-1 -1 -1
-1 1 -1
-1 -1 -1
TRANSFORM CONVOLVE VERTICAL EDGE
The "Vertical Edge" convolution operation uses the convolver to
highlight vertical edges, but not horizontal ones. The kernel used is:
-1 0 1
-1 0 1
-1 0 1
TRANSFORM CONVOLVE 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
TRANSFORM CONVOLVE 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.
TRANSFORM FILTER 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.
OPTIONS
ALT - if held when the "Roberts" function is selected, then the
resulting value is scaled down. With the limited resolution
of the Amiga display, this is typically never needed. However,
sharp edges could result in overflow, so if the result
appears corrupted, try again with the ALT key active.
TRANSFORM FILTER 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.
OPTIONS
ALT - if held when the "Roberts" function is selected, then the
resulting value is scaled down. With the limited resolution
of the Amiga display, this is typically never needed. However,
sharp edges could result in overflow, so if the result
appears corrupted, try again with the ALT key active.
TRANSFORM FILTER BINARY...
The "Binary..." function replaces each pixel with white (or the
color of the highest palette value, which is typically white) if it
is greater than or equal to that limit, or with black (color #0) if
it is less than a specified limit.
The limit is specified by a sliding bar, which allows you to specify
the color index number (0..max). The entire display's color-map updates
when you move the slider, but only the selected area will be changed
when you select "Ok."
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.
TRANSFORM FILTER 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. The entire display's color-map updates
when you move the slider, but only the selected area will be changed
when you select "Ok."
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 value greater
than a maximum value.
TRANSFORM FILTER 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).
TRANSFORM FILTER MINIMUM
The "Minimum" function replaces each pixel with the minimum value
found in the surrounding eight pixels.
TRANSFORM FILTER 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.
TRANSFORM FILTER MAXIMUM
The "Maximum" function replaces each pixel with the maximum value
found in the surrounding eight pixels.
TRANSFORM FILTER 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).
TRANSFORM FILTER NOISE...
The "Noise..." function introduces impulse noise into the picture
or selected area. Noise is generated by writing the highest index pixel
(typically white) at random intervals (controlled by the noise probability).
A requester is displayed which allows you to specify the approximate
percentage probability that noise will occur, from 0 (never) to
100 (always).
OPTIONS
ALT - if held while selecting the "Noise..." function, then the
impulse noise generated will be color #0 instead of the
maximum pixel value (typically, this is black instead of
white).
TRANSFORM AVERAGE
The "Average" functions perform area averaging of the picture or
of a selected area. Averaging is performed by using a 3x3 control
matrix to select points of interest surrounding each pixel in the
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 various submenus select different control matrices. See the
individual sections for details on the matrix used.
OPTIONS
ALT - if held when any of the average functions 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.
CTRL - if 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.
TRANSFORM AVERAGE HORIZONTAL
"Horizontal" averages are based upon the two pixels neighboring to the
left and right, using the following 3x3 matrix:
0 0 0
1 1 1
0 0 0
TRANSFORM AVERAGE VERTICAL
"Vertical" averages are based upon the two neighbors above and below,
using the following 3x3 matrix:
0 1 0
0 1 0
0 1 0
TRANSFORM AVERAGE H&V
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
TRANSFORM AVERAGE DIAGONAL
The "Diagonal" average varies the previous one by using the four pixels
at each corner, using the following 3x3 matrix:
1 0 1
0 1 0
1 0 1
TRANSFORM AVERAGE ALL
The "All" averaging control matrix (the default) averages each pixel
based upon all its surrounding pixels (this produces the best average.)
It is based upon the following 3x3 matrix:
1 1 1
1 1 1
1 1 1
TRANSFORM AVERAGE CUSTOM...
The "Custom..." average option brings up a custom matrix editor.
This editor displays nine cells in a three by three format, somewhat
like so:
+-------------------------+
| Enter Custom Matrix: |
| |
| [ 0 ][ 0 ][ 0 ] |
| [ 0 ][ 0 ][ 0 ] |
| [ 0 ][ 0 ][ 0 ] |
| |
| [ Ok ] [ Cancel ] |
+-------------------------+
You can select and edit the value in each of the cells. Enter a
non-zero value (typically one) to enable that location (pictorially
speaking) to be used in the averaging, or leave it as zero to ignore
that location. Enter a value greater than one to emphasize a particular
location.
TRANSFORM INTENSITY BRIGHTEN
The "Intensity Brighten" item is used to brighten the image, by
adding one to each pixel value (and limiting the maximum value).
TRANSFORM INTENSITY DARKEN
The "Intensity Darken" item is used to darken the image, by
subtracting one from each pixel value (and limiting the minimum value
to zero).
TRANSFORM INTENSITY OTHER...
The "Intensity Other..." item is used to brighten or darken the image,
by adding or subtracting a value from each pixel value (and limiting the
minimum and maximum values). A requester is brought up, allowing values
from -20..20 to be entered (zero has no effect).
TRANSFORM INTENSITY SCALE UP
The "Scale Up" function causes the intensity to be scaled (more
strongly than the "Intensity" functions) by using a multiplicative
function. "Scale Up" scales each pixel value by 2 (overflow values
are truncated at the maximum pixel intensity).
TRANSFORM INTENSITY SCALE DOWN
"Scale Down" halves the intensity of a selected area.
TRANSFORM INTENSITY SCALE OTHER...
The "Scale Other..." option works like the "Scale Up" and "Scale Down"
functions, by allows larger scalars to be entered. A requester is brought
up, allowing values from -20..20 to be entered (zero has no effect).
Negative values correspond to Scale Down values, while positive values
cause scaling up.
TRANSFORM INTENSITY ROOT
The "Root" option dramatically scales down large intensity range by
replacing each pixel by its square root.
TRANSFORM MERGE
The "Merge" function is used to combine the current picture with
another loaded from disk. The submenu selected controls the manner
in which the pictures are merged.
When any merge option is selected, a file requester is activated,
allowing you to specify the second picture. Typically, this should
be the original picture, or at least one with the same dimensions and
depth of the original source, but this is not required.
When "OK" is selected, a new screen containing the selected picture
is activated, and then the corresponding pictures are merged.
TRANSFORM MERGE OVERLAY
The "Merge Overlay" function copies all pixels in the merge picture
onto the original one wherever the original one contains a zero pixel.
This is somewhat like a genlock overlay.
TRANSFORM MERGE ADD
The "Add Overlay" function performs an arithmetic merge of the
two pictures, limiting the pixels to the maximum allowed value if
overflow occurs.
TRANSFORM MERGE SUBTRACT
The "Subtract Overlay" function performs an arithmetic merge of the
two pictures, subtracting the merge picture from the source picture.
Pixels are limited to the minimum allowed value if underflow occurs.
TRANSFORM MERGE AND
The "AND" function uses the Amiga's blitter to perform a logical
AND (source & merge -> source).
TRANSFORM MERGE OR
The "OR" function uses the Amiga's blitter to perform a logical
OR (source | merge -> source).
TRANSFORM MERGE XOR
The "XOR" function uses the Amiga's blitter to perform a logical
XOR (source ^ merge -> source).
TRANSFORM MERGE OTHER...
The "Other..." function allows custom blitter operations; to use,
enter the blitter minterm as a decimal number (or in hex if you preceed
it with '$'). Refer to the Amiga RKM's for details on blitter minterms.
PICTURE HISTOGRAM DISPLAY
The "Histogram Display" function counts the number of each pixel
values in the picture or selected area, and displays the totals. The
results are displayed as a graph in the main (WorkBench) window.
Histograms can be produced of HAM pictures, but the information
is scaled down from 4096 pixels to 256 pixels when the X axis is
plotted.
PICTURE HISTOGRAM EQUALIZE
The "Equalize" function uses the calculated histogram information
to adjust the color palette values to obtain a more uniform color
distribution.
PICTURE HISTOGRAM BAR GRAPH
The "Bar Graph" option, if checked, causes histograms plots to
be generated using bar graphs. If not selected, line graphs are
produced.
PICTURE COLORS 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.
PICTURE COLORS 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.
PICTURE COLORS 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; otherwise, it is just an interesting effect.
Negative values can sometimes make it easier to pick out features
and details of the picture.
Using this function on color pictures is... also interesting -- you
will generally want to convert it to black and white first.
SEE ALSO: PICTURE COLORS COLOR TO B&W
PICTURE GREYSCALE
PICTURE COLORS 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).
OPTIONS
ALT - if held while selecting this function, then the intensity
level is also intensified; this forces each pixel to a basic
primary color (red, green, blue, yellow, magenta, cyan, white
or black).
PICTURE COLORS PSEUDO-COLOR
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.
OPTIONS
ALT - if held when the "Pseudo-Color" function is selected, then
the color map is replaced with completely random values.
This is mostly for fun.
PICTURE COLORS 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.
PICTURE COLORS 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.
PICTURE COLORS DELETE COLORS...
The "Delete Colors..." function beings up a requester which has
a button for every possible color, numbered from 0..n. To delete a
represented color, click on an unselected button and it will be
highlightes. When "Ok" is selected, every selected 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.
See "Edit Screen" and "Edit Image" for related functions.
NOTE: since every pixel must be changed for this operation, it can
be lengthy.
PICTURE COLORS 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...
PICTURE 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 ALT 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
PICTURE HAM CONVERSION
The "HAM Conversion" option is enabled only when the loaded
image is a HAM picture. 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.
PICTURE 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).
The original screen is replaced with a 1 bit-plane deep screen
containing the half-toned image (in black and white).
OTHER POSITION SCREEN TO FRONT
Moves the image screen to the front.
OTHER POSITION SCREEN TO BACK
Moves the image screen to the back.
OTHER POSITION OCCUPY ALL
Positions the image screen to occupy all of the display. The menu
key for this function is LEFT-AMIGA- ','.
OTHER POSITION OCCUPY MIDDLE
Positions the image screen to occupy half of the display. The menu
key for this function is LEFT-AMIGA- '.'.
OTHER POSITION OCCUPY LITTLE
Positions the image screen to occupy a small part of the display.
The menu key for this function is LEFT-AMIGA- '.'.
OTHER AUTO FRONT
The "Auto Front" option, if checked, automtically flips the image
screen to the front and back after each ImageLab function is executed.
This should make it easier to access the menus without having to use
the screen position functions or Left-Amiga-M/N each time.
BUGS: it causes the screen to flip for trivial functions also, which
is very annoying.
OTHER SAVE TYPE COMPRESS PICTURE
The "Compress Picture" item specifies how pictures will be saved.
If the item is not checked, the file will be saved using no compression.
If checked, the standard byte-run compression will be used. The state
of this menu item is set each time an image is loaded, and reflects
the method of compression used in the file. This option is examined
when images are written out, so you can use this to change the compression
method, if needed.
OTHER SAVE TYPE SAVE FFT DATA
The "Save FFT Data" option allows ImageLab to write out any FFT
data with the image file. The data is saved in a FORM ILBM file
with the usual image data, and the FFT data stored in a "CFFT"
chuck.
By default, this is disabled, since "CFFT" is a custom, non-
registered IFF ID. This *should* be transparent to other picture
display programs, but, alas, that is not always true.
OTHER RESTRICT PALETTE
The "Restrict Palette" function is 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 some
DigiView pictures, which creates an extra bit-plane for internal
control functions.
If this option is checked, then the palette is halved (regardless
of the total number). The "Restrict Palette" option is reset (unchecked)
whenever a new picture is loaded (or "Revert"ed), or when the screen
parameters are edited.
See also: EDIT PARAMETERS
OPEN
REVERT
OTHER ICONS
The "Icons" item controls whether ImageLab creates an icon whenever
a file is saved (via "Save" or "Save As..."). If "Icons" is checked (sic),
an icon is generated that resembles the Deluxe Paint (tm) icon, except
that the default project is ImageLab.
Icon generation defaults to unchecked if ImageLab is run from a CLI,
and to checked if it is run from WorkBench. Icon generation can also be
initialized by the options:
-b (from the CLI)
ICON=OFF (from the WorkBench)
OTHER BELL
The "Bell" item controls whether ImageLab signals an alarm on the
completion of any operation. If the menu is checked, then the Amiga's
bell function is called. This will simply flash the screen by default,
but several public domain functions are available which will intercept
this call and substitute an audible bell or a 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, may take several minutes to complete.
The bell is off by default, since it would tend to be annoying for
trivial functions. It can be enabled by selecting the menu item until
the checkmark is present. The bell can be enabled by default by using
the options:
-b (from the CLI)
BELL=ON (from the WorkBench)