CImage:FiltEllipse
The FiltEllipse method smooths an image by applying a filter kernel having equal weights in an elliptical shape. The filter can be rotated.
bResult = CImage:FiltEllipse( cols, rows, angle, CRect=nil ) |
cols is the column length of the filter kernel.
rows is the row length of the filter kernel.
angle is the rotation angle in degrees.
CRect is the rectangle defining the area to process. If omitted, it defaults to nil and the entire image is processed.
On success, this method returns true.
On failure, this method returns false.
This method smooths the image using an elliptical shaped filter kernel having equal weights. By comparison, FiltBinomial uses an elliptical shape with binomial coefficient weights but cannot be rotated. The FiltGaussian method has similar properties of elongation and rotation but uses Gaussian weights rather than equal weights.
Suppose an image is displayed in a CImageView named V. The following script smooths the region [100:300, 400:800] using a 5x11 ellipse filter rotated 45 degrees:
|
-- attach the current displayed image |
|
-- setup the rectangle to process |
|
-- apply the filter |
|
-- update the display after the scale |
|
-- done with the CRect |
CImage class, FiltGaussian, FiltBinomial, FiltRect
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.