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 fragment applies a 45 degree gradient operator to the displayed image:
I = V:GetImage() |
-- attach the current displayed image |
I:FiltGradient( 45 ) |
-- apply the filter |
V:Update() |
-- update the display after the scale |