CImage:CreatePixelMaskLow


The CreatePixelMaskLow method creates a pixel mask file containing the coordinates of pixels having values below a threshold value.

Syntax

bSuccess = CImage:CreatePixelMaskLow( sMask, vLow, CRect=nil )

bullet.gif    sMask is the name of the text file where the pixel mask will be saved.

bullet.gif    vLow is the low threshold value.

bullet.gif    CRect is the target rectangle; if nil, then the entire image is searched.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, false is returned.

Remarks

This method produces a text file consisting of pixel coordinate pairs, one per line, in the form column, row. This format is described in the topic Pixel Mask File.

Example

The following script makes a pixel mask containing the coordinates of pixel values below -32000. The entire image is sampled because the CRect R is not specified:

I = new_image()

-- Create a CImage

I:Open( sPath )

-- Open the image from sPath.

I:CreatePixelMaskLow(sMaskFile,-32000)

-- create the pixel mask

I:delete()

-- delete the CImage from memory

Related Topics

CreatePixelMaskHigh, Pixel Mask File


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