CImage:FiltLaplacian


The FiltLaplacian method applies a discrete Laplacian filter to an image. This is a simple form of edge finder that is independent of gradient direction and background slope.

Syntax

bResult = CImage:FiltLaplacian( type=1 )

bullet.gif    type is the Laplacian type, in the range 1 to 3. If omitted the default is type 1.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This method applies a discrete Laplacian filter to enhance edge features while removing gradients and background. Three different types of Laplacian are provided, based on the type of "connectedness" within the pixel neighborhood. These are types 1, 2, and 3. Each higher numbered type has a stronger effect. If the type argument is specified then the default is type=1.

Example

Suppose an image is displayed in a CImageView named V. The following script applies the default Laplacian type 1 filter to the image:

I = V:GetImage()

-- attach the current displayed image

I:FiltLaplacian()

-- apply the filter

V:Update()

-- update the display after the scale

Related Topics

CImage class, FiltSobel


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