CImage:FiltMax


The FiltMax method applies a 100-th percentile rank selection filter to the image. This filter replaces each pixel with its neighborhood maximum value.

Syntax

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

bullet.gif    cols is the column length of the filter kernel.

bullet.gif    rows is the row length of the filter kernel.

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

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

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

Example

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

I = V:GetImage()

-- attach the current displayed image

R = new_rect(100,300,400,800)

-- setup the rectangle to process

I:FiltMax(7,7,R)

-- apply the filter

V:Update()

-- update the display after the scale

R:delete()

-- done with the CRect

Related Topics

CImage class, FiltMedian, FiltMin


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