CImage:FiltRotGrad CImage:FiltSobel

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 )

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

    On success, this method returns true.

    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 fragment 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, FiltSobel