CImage:CreatePixelMaskHigh
The CreatePixelMaskHigh method creates a pixel mask file containing the coordinates of pixels having values above a threshold value.
bSuccess = CImage:CreatePixelMaskHigh( sMask, vHigh, CRect=nil ) |
sMask is the name of the text file where the pixel mask will be saved.
vHigh is the high threshold value.
CRect is the target rectangle; if nil, then the entire image is searched.
On success, this method returns true.
On failure, false is returned.
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.
The following script makes a pixel mask containing the coordinates of pixel values above 2000. The entire image is sampled because the CRect R is not specified:
|
-- Create a CImage |
|
-- Open the image from sPath. |
|
-- create the pixel mask |
|
-- delete the CImage from memory |
CreatePixelMaskLow, Pixel Mask File
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.