CImage:FiltRotGrad


The FiltRotGrad method computes a special kind or gradient which enhances features emanating from a point.

Syntax

bResult = CImage:FiltRotGrad( x, y, nShift, ShiftAngle, DitherAngle )

bullet.gif    x, y is the coordinate at the center of rotation.

bullet.gif    nShift is the pixel displacement of the rotated image from the original image.

bullet.gif    ShiftAngle is the direction of the shift, in degrees.

bullet.gif    DitherAngle is the angle used to create the rotational gradient, typically 5 to 10 degrees.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This filter uses a combination of rotational jogging and positional jogging (the "dither") to enhance features that radiate from a point, or radiate but are biased along a favored direction (the "shift"). This enhances features akin to the spokes of a wheel which may be difficult to see in the original image. This method is a rotational equivalent of a linear gradient filter like the FiltGradient method.

Example

Suppose an image is displayed in a CImageView named V. The following script applies a rotational gradient filter at point 235.2,90.5 using a shift of 2 pixels along a 34 degree vector and using +-5 degree dithering to create the rotational gradient.

I = V:GetImage()

-- attach the current displayed image

x = 235.2 ; y = 90.5

-- center of rotation

I:FiltRotGrad(x,y,2,34,5)

-- apply the filter

V:Update()

-- update the display after the scale

Related Topics

CImage class, FiltGradient


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.