MultiThreshold Method
Syntax
CWIMAQVision.MultiThreshold SourceImage, DestImage, ThresholdData
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Obsolete—Use MultiThreshold2 instead. Thresholds an image into multiple classes. The method classifies each pixel into the last threshold range of which it is a member. If a pixel is not a member of any of the given ranges, the method sets it to 0. For example, given two threshold ranges
the method operates as follows:
Replaces pixel values below 80 with 0.
Replaces pixel values from 80 to 120 with 10.
Does not change pixel values from 121 to 200.
Replaces pixel values above 200 with 0.
Remarks
Use this method with U8, I16, and SGL images.
The method completes threshold operations in the order that they appear in the ThresholdData report. The method takes each pixel in the source images into account only once, even if the pixel is included in the threshold range of two different elements of the ThresholdData report.
Parameters
SourceImage As CWIMAQImage
The image to process.
DestImage As CWIMAQImage
The resulting image.
ThresholdData As CWIMAQThresholdData
The threshold data required to perform the multithreshold.