About PCMD's (user processing modules) PCMD files are extrernally compiled image processing modules which can be executed from within PrismView. Place the files in the System Folder before running PrismView, and the first 30 modules (alphabetically) will appear in the PCMD submenu under "Process". The routines all support arbitrary regions of interest. The modules in this folder are: Octag.5x5.Nbrhood: This function combines several neighborhood and ranking routines that operate on an octagonal 5x5 neighborhood (21 pixels). The dialog permits you to select max (brightest, or grey scale dilation), median or min (darkest, or grey scale erosion) rank filters, the range or difference (maximum-minimum), the variance, or the standard deviation (square root of variance). The median filter is generally preferred for noise removal. Max and min filters may be useful to remove bright or dark noise or features to produce a background image. The range filter can be used as a texture filter or edge enhancer. The variance and standard deviation are good for delineating edges. Truncated Median: The median filter is an excellent noise removing filter, and it is sometimes applied many times to "posterize" the image and sharpen edges since it will not blur them as smoothing with a kernel would. However, for edge sharpening, what is actually desired is a "mode filter" since by definition the mode of a distribution is the most likely value. In a small neighborhood, the distribution is too small to reliably detect the mode. As a substitute, this truncated median filter uses the median of the 7 values from the 9 in a 3x3 region which lie nearest to the mean, discarding the two which are farthest away. Since, for any asymmetric distribution, the mean is always on the opposite side of the median from the mode, this moves the values in the proper direction. For more information on the truncated median filter, see E. R. Davies (1988) "On the noise suppression and image enhancement characteristics of the median, truncated median and mode filters" Pattern Recogn. Lett. 7:87-97. Hybrid Median: Another problem with the classic median filter is that is can remove narrow lines and round corners. The larger the filter neighborhood, the greater the effect. One solution to this is the "edge-preserving" or hybrid median filter, also called the bidirectional linear median filter or "2LH+". This is a three step filter. Operating in a 5x5 pixel neighborhood, the filter first determines the median value for the 9 pixels comprising the X pattern of diagonal pixels, then the median value for the 9 pixels comprising the + pattern of pixels. Note that the central pixel is included in both groups. Then the median value of these two medians and the central pixel is determined, and that brightness used in the final image. For more information, see A. Nieminen, P. Heinonen, Y. Nuevo (1987) "A new class of detail-preserving filters for image processing" IEEE Trans. Patt. Anal. Mach. Intell. 9:74-90. TopHat: The Top Hat filter is a rank filter with two different neighborhood sizes. If the brightest value in the smaller region is greater than that in the larger by some user-entered threshold, then the point remains, otherwise it is erased. This allows finding points on nonuniform backgrounds. This version compares the five central pixels (the pixel and its four edge-touching neighbors) to the 16 outer pixels making up a 5 pixel wide octagon. Either pixels which are brighter or darker than their local neighborhood can be selected. If this operator is used to eliminate extreme pixels instead of select them, it is called a Rolling Ball filter. For more information on the Top Hat filter, see D. S. Bright, E. B. Steel (1987) "Two-dimensional top-hat filter for extracting spots and spheres from digital images" Journal of Microscopy 146 #2, 191-200 Frei & Chen: This is an advanced edge-locating algorithm that is not often used in small computer systems, but does a superior job of locating boundaries. It is described in detail in W. Frei, C. C. Chen (1977) "Fast boundary detection: a generalization and a new algorithm" IEEE Trans. Comput. 26 #2, 988-998. It computes nine "basis functions" using 3x3 kernels applied to each point of the image, and then calculates the projection of the image at each point onto those functions which define edgeness as opposed to those which do not. The angle between the vector formed by the image basis functions and the edge subspace is calculated at each point, and becomes the brightness for each pixel. The edge image is quite noise free and shows much smoother and more continuous edges than most other methods, such as the Sobel. Thresholded Derivative: This routine determines the maximum directional first derivative in each of four directions using a 5x5 neighborhood, compares the resultant value to a threshold selected by the user (the steps selectable in the dialog vary from 512 to 16 in factors of two), and if the value exceeds the threshold, calculates the second derivative in that direction based on a 3x3 neighborhood and adds the result to the current image value. This is useful to selectively sharpen edges in noisy or highly textured images. A high threshold setting will enhance ("sharpen") only the most contrasty edges present in the image, while lower settings will apply the local contrast increase to progressively smaller variations. This method is based on the approach of E. Oho et al. (1990) "A new non-linear pseudo-Laplacian filter for enhancement of secondary electron images" J. Microscopy 159, 33-41. Haralick Ä1: This routine calculates the Angular Second Moment of the image, a texture operator defined in R. M. Haralick et al. (1973) "Textural Features for Image Classification" IEEE Trans. Syst. Man, Cybern. SMC-3, 610-621. The value for each pixel is the sum of squares of the number of neighbor pairs of pixels within a 5x5 region having the same brightness difference. This produces very large values (dark pixels) when the neighborhood consists of pixels with the same brightness level, and conversely. It is intended to produce an image containing texture information which can subsequently be processed (usually smoothed or median filtered) and thresholded to select regions of interest. Local Equalization: This routines works on a circle with 11 pixel diameter. The 89 pixel values in each neighborhood region are used to construct a histogram. The original value of the central pixel is then converted to the histogram- equalized value for that histogram, calculated as 255/89 times the number of darker pixels in the region. Only the central pixel is changed. This operation is performed for every pixel in the image. The method enhances visibility in bright or dark regions with little contrast. ReduceImageResn: This function allows you to reduce the original grey scale image resolution in terms of either the number of grey values, the number of discrete pixels, or both. Select in the dialog the number of grey levels (any power of 2, corresponding to the number of bits), and the resulting image will be redrawn with the values rounded down to the nearest values which remain. Select the number of pixels to average together, and the image will be subdivided into square blocks (up to16x16 original pixels) whose brightness will be averaged. Contours: This function draws multiple contour lines for a grey scale image. Each line is identical to the result obtained with the contour option under thresholding. The number of (equally spaced) lines can be entered from 1 to 16. They are drawn in the corresponding color or grey values, but can be converted to black lines afterwards using "Select all features", and/or copied and overlaid on a copy of the original if desired. Blend: This function combines two images by adding a user-specified percentage of the second (checked) image to the primary image. It may be especially useful for adding various processed image results to the original for cosmetic purposes. These modules are all Copyright © 1990-1992 J. C. & J. C. Russ. They may be distributed without charge provided that the copyright notice accompanies the file. John C. & J. Christian Russ 213 Merwin Road Raleigh, NC 27606 fax: 919-851-8117 email