CImage:FiltMax
The FiltMax method applies a 100-th percentile rank selection filter to the image. This filter replaces each pixel with its neighborhood maximum value.
bSuccess = CImage:FiltMax( cols, rows ) bSuccess = CImage:FiltMax( cols, rows, CRect ) where |
cols is the column length of the filter kernel.
rows is the row length of the filter kernel.
CRect is the rectangle defining the area to process. If omitted, it defaults to nil and the entire image is processed.
bSuccess is the returned success code. On success it is true, otherwise false.
This method selects the neighborhood values having 100% rank surrounding each point of interest. This produces an image that maximally emphasizes all the local "peaks" in the image.
Suppose an image is displayed in a CImageView named V. The following script applies a 7 x 7 maximum value filter to the [100:300, 400:800] pixel region:
|
-- attach the current displayed image |
|
-- setup the rectangle to process |
|
-- apply the filter |
|
-- update the display after the scale |
|
-- done with the CRect |