CImage:FiltRect
The FiltRect method smooths an image by applying a filter kernel having equal weights in a rectangular shape.
bResult = CImage:FiltRect( cols, rows, CRect=nil ) |
This method smooths the image using a rectangle shaped filter kernel having equal weights. By comparison, FiltBinomial uses an elliptical shape with binomial coefficient weights. Both of these filters are elongated parallel to the x or y axis. Conversely, the FiltGaussian and FiltEllipse methods can be rotated to a specified angle.
Suppose an image is displayed in a CImageView named V. The following script fragment smooths the region [100:300, 400:800] using a 25x25 Rectangle filter:
|
-- attach the current displayed image |
|
-- setup the rectangle to process |
|
-- apply the filter |
|
-- update the display after the scale |
|
-- done with the CRect |