CImage:FiltMax CImage:FiltRank

CImage:FiltMin


The FiltMin method applies a 0-th percentile rank selection filter to the image. This filter replaces each pixel with its neighborhood minimum value.

Syntax

bResult = CImage:FiltMin( cols, rows, CRect=nil )

    cols is the column length of the filter kernel.

    rows is the row length of the filter kernel.

    CRect is the rectangle defining the area to process. If omitted, it defaults to nil and the entire image is processed.

    On success, this method returns true.

    On failure, this method returns false.

Remarks

This method selects the neighborhood values having 0% rank surrounding each point of interest. This produces an image that maximally emphasizes all the local "holes" in the image.

Example

Suppose an image is displayed in a CImageView named V. The following script fragment applies a 7 x 7 minimum value filter to the [100:300, 400:800] pixel region:

I = V:GetImage()

-- attach the current displayed image

R = CRect:new(100,300,400,800)

-- setup the rectangle to process

I:FiltMin(7,7,R)

-- apply the filter

V:Update()

-- update the display after the scale

R:delete()

-- done with the CRect

Related Topics

CImage, FiltMedian, FiltMax