![]() ![]() ![]() |
Process Menu
Filtering Functions (Smooth, Sharpen, etc.)These filters, with the exception of Reduce Noise and Dither, are implemented using 3 x 3 spatial convolutions, where the value of each pixel in the selection is replaced with the weighted average of its 3 x 3 neighborhood. They are not limited to rectangular selections. The entire image is filtered if no selection is active. They do not work correctly with 8-bit true color images. They can be aborted by typing command-period.The 3 x 3 tables shown below are the coefficients (weighting factors) for the filters. The popularity of plus and minus one in these tables is due to the fact that multiplication by one is very efficient, i.e., it is unnecessary.
1 1 1 1 1 1 (If option key down)
1 4 1 1 1 1
1 1 1 1 1 1
Sharpen - Increases contrast and accentuates detail in the selection, but may also accentuate noise. To minimize this problem, you can Smooth and/or Reduce Noise before using Sharpen. Hold the option key down for increased sharpening.
-1 -1 -1 -1 -1 -1 (If option key down)
-1 12 -1 -1 9 -1
-1 -1 -1 -1 -1 -1
Shadow - Produces a shadow effect, with the light appearing to come from a direction specified in a dialog box. Three of the kernels used are shown below.
West North West North
1 0 -1 2 1 0 1 2 1
2 1 -2 1 1 -1 0 1 0
1 0 -1 0 -1 -2 -1 -2 -1
Find Edges - Performs a Sobel edge detection operation. Two convolutions are done using the kernels shown below, generating vertical and horizontal derivatives. The results are then combined by using the square root of the sum of the squares of the two derivatives.
1 2 1 1 0 -1
0 0 0 2 0 -2
-1 -2 -1 1 0 -1
Rank FiltersThese filters rank (sort) the nine pixels in each 3 x 3 neighborhood and replace the center pixel with the median, minimum (lightest), or maximum (darkest) value. Use the Median filter to reduces noise. The Minimum filter erodes (shrinks) objects in grayscale images similar to the way binary erosion shrinks objects in binary images. The Maximum filter dilates (expands) objects in grayscale images similar to the way binary dilation expands objects in binary images.
Select Median and each pixel will be replaced with the median value in its 3 x 3 neighborhood. This is a time consuming operation because, for each pixel in the selection, the nine pixels in the 3x3 neighborhood must be sorted and the center pixel replaced with the median value (the fifth). To demonstrate the effectiveness of median filtering, try removing random spot noise generated using the spray can tool with the diameter set to 50 or greater. Select Minimum and each pixel is replaced with the minimum value in the 3 x 3 neighborhood. With binary images, this produces the same result as the Binary/Erode filter with count set to one. Select Maximum and each pixel is replaced with the maximum value in the 3 x 3 neighborhood. With binary images, this produces the same result as the Binary/Dilate filter with count set to one. Select Opening and Iterations erosion operations are performed, followed by Iterations dilations. Select Closing and Iterations dilation operations are performed, followed by Iterations erosions. DitherUses the Floyd-Steinberg error diffusion algorithm to convert the current selection to a binary (black and white only) image. Dithering can be useful for exporting pictures to applications such as MacPaint or MacDraw that can only accept binary images. Dithering can also be used for printing on the ImageWriter, or other non-PostScript printers. The quality of dithered images can frequently be improved by increasing contrast using the controls in the Map window before doing the dithering. True color images should be converted to grayscale by using the Convert to Grayscale variation of the Apply LUT command before being dithered.ConvolveDoes spatial convolutions using kernels read from a text file or text window. Kernels can be up to 63 x 63 in size. Output pixel values are clipped to 8-bits unless Scale Convolutions is checked in the Preferences dialog box. Use Image 's built-in text editor to create or examine these kernels.As an example, use the New command to open a blank text window, enter (or paste) the following kernel, then use the Convolve command to try it out.
0 0 0 -1 -1 -1 0 0 0
0 -1 -1 -3 -3 -3 -1 -1 0
0 -1 -3 -3 -1 -3 -3 -1 0
-1 -3 -3 6 13 6 -3 -3 -1
-1 -3 -1 13 24 13 -1 -3 -1
-1 -3 -3 6 13 6 -3 -3 -1
0 -1 -3 -3 -1 -3 -3 -1 0
0 -1 -1 -3 -3 -3 -1 -1 0
0 0 0 -1 -1 -1 0 0 0
This is a 9 x 9 "Mexican hat" filter which will do both smoothing and edge detection in one operation. Each line should be terminated with a carriage return, and the coefficients should be separated by one or more spaces, or a tab. Note that kernels, such as this one, can be opened and displayed as an image using the Import (Text) command, scaled to a reasonable size using Scale and Rotate, and plotted using the Surface Plot command. Plug-in FiltersUse this sub-menu to run Photoshop compatible filter plug-ins. The plug-ins must be stored in a folder named "Plug-ins" located either in the same folder as Image or in the System Folder.BinaryThe commands in this sub-menu are used to convert grayscale images to binary (i.e. black and white only), and to process these binary images. Note that Erode and Dilate do not perform erosion and dilation with structuring elements as described in the literature of classical mathematical morphological. However, several of the Mac image processing programs listed in Appendix D, such as "Alice", do support mathematical morphology.Make Binary - Converts the current grayscale image to binary by setting pixels that have been highlighted by either density slicing or by thresholding to black (255), and all other pixels to white (0). ArithmeticThe commands in this sub-menu add (subtract, multiply, etc.) a constant to each pixel in the current rectangular selection, or if there is no selection, the entire image. If Real Result is checked in the dialog box, calibrated
pixel values are used and the result is stored, in a new window, as both
32-bit real and scaled 8-bit images. The 8-bit image is calibrated using
a linear calibration function so that commands in Image that only "see"
the 8-bit image (currently everything accept Arithmetic, Image Math and
FFT) will use approximations of the real pixel values. Add - Adds a constant to each pixel in the selection. Results greater than 255 are set to 255. Image MathPerforms arithmetic and logical operations between two images selected from pop-up menus. The operation to be performed is also selected from a pop-up menu.
For each pixel, the arithmetic operation is performed, the result is multiplied by the scale factor, the offset value is added, and the final result is clipped to 8-bits (0-255). The operations are carried out in the upper left corner of each image using the largest common rectangle. If Real Result is checked, the calibrated pixel values for the two input images are used and the result is stored, in the same window, as both 32-bit real and scaled 8-bit images. The 8-bit image is calibrated using a linear calibration function so that commands in Image that only "see" the 8-bit image (currently everything accept Arithmetic, Image Math and FFT) will use approximations of the real pixel values. Notice that the name in the result window's title bar is enclosed in angle brackets to indicate that the it contains a real image. Also note the white diamond, indicating that the scaled 8-bit result is density calibrated. FFTThe commands in this submenu support frequency domain display, editing and processing. They use a real, 2D Fast Hartley Transform (FHT) routine contributed by Arlo Reeves, the author of ImageFFT. For more information about the FHT and ImageFFT, see the ImageFFT documentation, example images, and Arlo's thesis, available from the nih-image_spinoffs directory on zippy.nimh.nih.gov.Note that FFTs and inverse FFTs require extensive floating-point calculations and are therefore very slow on 68000 Macs. FFT - Computes the Fourier transform and displays the power spectrum. Requires a square, power of two size image or selection. The transformed frequency domain image is stored in a 32-bit real buffer attached to the window displaying the power spectrum. The only commands in Image that currently recognize this real image are "Inverse FFT", "Redisplay Power Spectrum" and "Image Math". All other commands "see" only the 8-bit power spectrum. The transformed frequency domain images created by the FFT command are stored as 32-bit real images. The name in the window's title bar is enclosed in angle brackets (e.g., "<<FFT 2>>") to indicate that the window includes a real image. Note that frequency domain images require 5 times as much memory as normal 8-bit images - 4 bytes/pixel for the real image and 1 byte/pixel for the power spectrum image. The only commands in Image that currently recognize real images are "Arithmetic", "FFT", "Inverse FFT", "Redisplay Power Spectrum" and "Image Math". All other commands "see" only the 8-bit power spectrum. The Image Math command supports arithmetic operations on the real images created by the FFT command. You can use it for multiplication (convolution), division (deconvolution) and conjugate multiplication (crosscorrelation and autocorrelation) of frequency domain images. There are macros in the "FFT Macros" file for doing autocorrelation. See the ImageFFT documentation and "The Image Processing Handbook" by John Russ for examples of how these operations can be used to analyze images. Subtract BackgroundThe commands in this sub-menu remove smooth continuous backgrounds from gels and other images. The rolling ball and rolling disk algorithms used by these routines were inspired by Stanley Sternberg's article, "Biomedical Image Processing", IEEE Computer, January 1983. The routines were written by Michael Castle and Janice Keller of the University of Michigan Mental Health Research Institute.1D Horizontal - Rolls an arc (rolling arc) horizontally under each row (shrunk 2 or 4 times) of the image in order to remove the background. Apply LUTApplies the current look-up table function to each pixel in the current selection (or the entire image if there is no current selection) and restores the default look-up table (the identity function). This modifies the gray values so that when the image is viewed using the default grayscale look-up table it will look the same as it did before. It also makes any brightness and contrast changes permanent. It can be used to posterize (reduce the number of gray values) an image by loading and applying, for example, a LUT consisting of four shades of gray. It can also be used to convert color images to grayscale, and to convert a thresholded image to binary.
If density slicing is in effect, the above dialog box is displayed, allowing you to process highlighted pixels in one way, and all other pixels another way. Enhance ContrastEnhances the contrast of the currently active image. A new look-up table function is generated by doing a linear histogram stretch of the current selection. Use the Apply LUT command to make the contrast change permanent. Enhance Contrast does not work with true color images.EqualizePerforms histogram equalization based on the density histogram of the current selection. A new look-up table function is generated that more evenly distributes the gray values of the image. The newly created function is displayed in the Map window. Use Apply LUT to make the contrast change permanent. Equalization does not work with true color images.Fix ColorsAttempts to correct color anomalies by mapping pixels with values of either 0 or 255 to the nearest matching color in the other 254 LUT entries. This usually corrects pseudo-color problems due to the way Image "hard wires" entries 0 and 255 to white and black respectively.
[Next] [Contents] [Home]
|
||||