Performs a convolution filter on the currently-selected image, or the selected screen region. The original image should be backed up before filtering it, in case you don't like the results.
For images greater than 8 bits/pixel, only the selected color planes are filtered. Color planes can be selected in the ``Config'' dialog box. Indexed-color images are temporarily converted to 24 bits/pixel before filtering, then converted back using the quantization method selected in the "Configure..." dialog.
In general, the kernel size should be close to the size of the features of interest. In particular, with Laplace edge enhancement, if the features are larger than 3 pixels across, a 3x3 or 9x9 kernel may actually make the image appear fuzzier, while a 5x5 kernel might dramatically sharpen the image. The amount of filtering can be adjusted from 1 to 100.
High-pass filter (Sharpening)
Extracts only the highest spatial frequencies in the image. More low frequency components are saved if a larger 'kernel' is selected. If the image contains few high-frequency components, and too much sharpening was selected, the result may appear dark or black. This can be corrected by increasing the contrast of the image after filtering it.
Low-pass filtering
Low-pass filtering eliminates sharp edges from the image, causing a blurring effect. The total intensity is unchanged, but is spread throughout the neighboring pixels.
Background subtract
This is similar to high-pass filtering except it removes only the lowest frequencies. This has the effect of removing uneven background in the image. As with high-pass filtering, it can make the image appear darker. Selecting a larger kernel removes less of the low frequencies, but will require much more processing time. A preferred method is to use the ``kernel multiplier''. Selecting a multiplier of 5 with a 3x3 kernel produces results similar to using a multiplier of 1 with a 15x15 kernel, but is many times faster. For this reason, it is recommended to set the kernel to 3x3 for background subtract.
It is possible to specify whether ``black'' or ``white'' pixels should be considered as the background. If it is set to ``white'', the image will generally get lighter in regions of unvarying pixel intensity. If the background value is ``black'', the image will get darker wherever the pixel intensity does not vary. This can be compensated for by increasing the contrast.
Background subtraction will also trash any text in the image.
See also Background flatten, remove low frequencies, and Rank leveling.
Background Flatten (de-trending)
This filter removes the largest-scale gradients from the image or selected region by measuring the average pixel value in each corner and then adding or subtracting a value to equalize the overall intensity. This could also be done manually, by creating a gradient region on the screen and adding the image to it (see Gradient fill ). However, the manual method is not 2-dimensional.
In contrast to Background Subtraction, this filter does not trash text. It differs from remove low frequencies in that it only removes large-scale gradients from the image.
See also Background subtract, remove low frequencies, Force background, Rank leveling, and unsharp mask.
Force background to fixed value
This filter is similar to the ``Remove low frequencies'' filter, except that instead of adding and subtracting values to remove gradients in the image, it multiplies dark and light areas by some factor to make the low-frequency background constant. This constant value can be adjusted by clicking on the ``Background value'' box.
The difference between this filter and removing low frequencies is that, with this filter, the intensity of any information hidden in a dark area will be more accurately preserved. This filter can be thought of as a cross between the ``maximize local contrast'' and ``Remove low frequencies'' filters.
Forcing the background to the 50% intensity value (e.g., 128 for 8-bit images) gives the best retention of the original intensity variation. Setting it to 100% (i.e., 255) would be useful if the high-frequency features (such as grains or spots) were of interest.
See also Background subtract, remove low frequencies, and Rank leveling.
Comparison of different methods of compensating for uneven background.
A Original image
B Conventional contrast increase.
C Background subtract (bkg=white).
D Background flattening
E Remove low frequencies
F Maximize local contrast
G Force background to fixed value (191).
Noise filtering (median filtering)
Median filtering removes extraneous pixels from the image.
This is useful if the image contains noise which consists
of little dots that are clearly outside the range of the other
pixels. If a given pixel varies by more than a certain amount
from the pixels around it, median filtering substitutes the
median of the neighboring pixels, thereby eliminating noise from
the image. The image is otherwise unaffected. The range in
pixel value units, outside of which a value is to be considered noise,
can be changed. A higher value results in less noise removal.
Excessive noise filtering can make an image appear posterized.
A setting of 0 will create a smoothing effect.
Laplace edge enhancement
This filter finds any edges in the image whose length is equal or greater than the kernel size. The edges are then increased in intensity while non-edge regions are eliminated. The effect on text is to create an outline of the text.
Sobel edge enhancement
This filter is similar to Laplace edge enhancement except that the effects are gentler. A Sobel filter enhances the color or intensity gradient in a symmetrical fashion, so that areas of constant color become black. Note:The Sobel function here is slightly different from some other implementations, hence the term `Sobel' may not be strictly accurate.
Edge detect | , -
Detects and enhances edges in the image preferentially in the horizontal or vertical direction.
Sharpen | / -
Sharpens the selected region or image preferentially in the indicated direction, creating a `freeze-fracture' 3-D effect. This is particularly useful for images of biological specimens that have low contrast, since it highlights the overall shape of the cells.
Remove low frequencies
This filter uses a combination of operations to subtract a blurred copy of the image from itself, thereby making the background perfectly flat. The effect is about halfway between Background Subtract, which only removes the very low spatial frequencies, and High Pass, which enhances the high frequencies. Selecting a 3x3 kernel removes all but the highest frequencies, while a 15x15 kernel has a less harsh effect. The effect can be made even more gentle by specifying a kernel multiplier of 2 or more.
See also Background flatten, Background subtract, Force background, and Rank leveling.
Background subtraction by rank leveling
Rank leveling subtracts background gradients rapidly by assuming that
the features of interest are small in size (less than 10
10 pixels).
Subtracting nearby background pixels from the feature pixels achieves
a very localized background flattening. Features larger than 10x10
will also be attenuated.
``Background level'' must be set correctly, otherwise the result will be garbage. For example, if the features are dark on a light background, background level must be set to ``white''.
This filter only works for grayscale images. Other settings including kernel size, range, and amount of filtering, are ignored.
As with ``background subtract'', it is usually necessary to adjust the contrast after filtering with rank level filter, because the image will get lighter or darker depending on the setting of ``background level''.
See also Background flatten, Background subtract, Force background, and Remove Low Frequencies.
This filter is similar to the old-style unsharp mask filter used in photography. A temporary copy of the image is blurred and subtracted from the original. A constant value is added to each pixel to prevent pixel values from going to zero or becoming negative. This can be adjusted by changing the ``Background value'' setting. The amount of blurring done to the copy is set by the ``Kernel'' and the ``Kernel multiplier'' settings. Setting the kernel multiplier causes the blurring filter to be applied to the copy more than once. The percentage of the blurred copy that is subtracted can be adjusted by changing the ``Amount of filtering''.
Unsharp mask filtering flattens the background and also sharpens the image. However, it is less efficient for sharpening than the convolution sharpening filter. For sharpening images, use the ``sharpen'' convolution filter instead.
User-defined
Performs a convolution filtering using a user-defined filter. This filter should be a text file with the folowing characteristics:
Example This 5
5 filter will enhance vertical edges.
| 5 | ||||
| -1 | -1 | 0 | 1 | 1 |
| -1 | -1 | 0 | 1 | 1 |
| -1 | -1 | 1 | 1 | 1 |
| -1 | -1 | 0 | 1 | 1 |
| -1 | -1 | 0 | 1 | 1 |
Engrave
Filters the image by converting edges to shadows so that the image resembles an engraved outline. Uses a threshold value to determine the pixel intensity value at which the outline is to be drawn.
Spatial difference
Filters image using a spatial differencing filter. This has the effect of separating closely-spaced objects so that there is a clear boundary between them. This is useful in preprocessing images before performing densitometry or grain counting. Uses a `size' parameter which determines the area over which the differencing will be performed for each pixel. A larger size will accentuate larger objects, and will have more noise immunity, but takes more processing time. Currently only works on monochrome images.
Multiplicative Sobel
This experimental filter is similar to the Sobel filter (Sec.8.1) except that the differences are multiplied to each pixel rather than added. It produces a strongly non-linear effect of enhancing details in the image. Only works on monochrome images.
Maximize local contrast
This filter increases the contrast at each point in the image to the maximum possible value with respect to its neighbors. This is useful for images in which details are obscured in large dark or light areas. Increasing the contrast in the overall image would make these faint features visible, but at the expense of washing out all detail in other areas. Maximizing the contrast locally allows details in both light and dark areas to be viewed simultaneously. See Sec.
For example, in the mammogram shown below, in the left panel (A), some of the details in the mammogram are visible, while others are obscured in a dark area. After maximizing the local contrast, the details of the vascularization are easily discernable, and even the subtle gradations in the white background area are also clearly visible (B).
Maximizing local contrast.
The degree of contrast enhancement can be selected in the clickbox labeled ``Local contrast scale''. This value is the area over which the contrast will be measured for each pixel. A smaller value gives greater enhancement of fine details, while a large value only removes gentle background gradients. An excessively large value, however, can create artifacts. See sec. 9.12 for another example.
Adaptive maximize local contrast
This filter is similar to the ``Maximize local contrast'' filter, except that the contrast factor is calculated ``adaptively''. This makes it much faster. However, the results are sometimes not as good. The adaptation or ``decay factor'' can be adjusted.
Adjustable parameters
Kernel
The kernel is the number of pixels used in calculating a pixel in the new image. The processing time needed increases with the square of the kernel size.
Kernel multiply factor
A kernel multiply factor permits arbitrarily large kernel without an increase in computation time. This is possible because usually only a small sample of the surrounding pixels are really needed to calculate the new pixel value. For most types of filters, a 3x3 kernel with a kernel multiplier of 3 gives the same results as a 9x9 kernel, but is 3 times faster. For sharpening and blurring, this doesn't work, and the factor is automatically set to 1.
Amount of filtering
The amount of filtering applied to the image, from 1 to 100 (maximal filtering).
Effect of some different filters. The original is an image of the Horsehead Nebula.
A. Original
B. Background subtract, background level=white
C. Background flatten
D. Sobel edge detection
E. Background subtract, background level=black
F. Sharpen