CImage:FiltPrewitt


The FiltPrewitt method applies a Prewitt directional gradient mask to an image. Masks are available in 45 degree rotation steps.

Syntax

bResult = CImage:FiltPrewitt( step )

bullet.gif    step is the 45 degree increment, numbered 1 through 8, beginning with step 1 for 0 degrees.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This method applies a Prewitt mask to the entire image to enhance gradient structures aligned in 45 degree increments. In comparison, the FiltGradient filter can be rotated to any angle but is slower in performance.

Example

Suppose an image is displayed in a CImageView named V. The following script applies a step 4 Prewitt mask (135 degree angle) to the displayed image:

I = V:GetImage()

-- attach the current displayed image

I:FiltPrewitt( 4 )

-- apply the filter

V:Update()

-- update the display after the scale

Related Topics

CImage class, FiltGradient, FiltLine


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