CImage:FiltGradient
The FiltGradient method applies a directional gradient filter to the image. This filter selects features aligned along specific directions and may also be used to produce the effect of low-angle illumination.
bResult = CImage:FiltGradient( angle )
angle is the rotation angle in degrees.
On success, this method returns true.
On failure, this method returns false.
This method constructs a 3x3 gradient mask using the specified rotation angle and applies it to the image. This is a discrete form of the mathematical directional gradient operator. The visual effect is to change the image into a false relief map with illumination shining from the direction specified by the rotation angle.
Suppose an image is displayed in a CImageView named V. The following script applies a 45 degree gradient operator to the displayed image:
|
-- attach the current displayed image |
|
-- apply the filter |
|
-- update the display after the scale |
CImage class, FiltLine , FiltPrewitt
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.