Pixel Mask File CImage:CreatePixelMaskLow

CImage:CreatePixelMaskHigh


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

Syntax

bSuccess = CImage:CreatePixelMaskHigh( sMask, vHigh, CRect=nil )

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 fragment makes a pixel mask containing the coordinates of pixel values above 2000. The entire image is sampled because the CRect R is not specified:

I = CImage:new()

-- Create a CImage

I:Open( sPath )

-- Open the image from sPath.

I:CreatePixelMaskHigh(sMaskFile,2000)

-- create the pixel mask

I:delete()

-- delete the CImage from memory

Related Topics

CreatePixelMaskLow, Pixel Mask File