imaqAutoThreshold
Usage
ThresholdData* imaqAutoThreshold(Image* dest, Image* source, int numClasses, ThresholdMethod method);
Purpose
Automatically thresholds an image into multiple classes.
![]() |
Note This function is obsolete. The replacement function is imaqAutoThreshold2(), which incorporates the functionality of imaqAutoThreshold() but has a mask parameter that enables you to control which pixels the function thresholds. |
Image Types Supported
IMAQ_IMAGE_U8
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | Image* | The image to threshold. |
numClasses | int | The number of classes into which to threshold the image. Valid values range from 2 to 256. |
method | ThresholdMethod | The method for binary thresholding. If numClasses is 2 (a binary threshold), method specifies how to calculate the classes. If numClasses is not 2, the function ignores this parameter. |
Return Value
Type |
Description |
---|---|
ThresholdData* | On success, this function returns an array of structures providing information about the threshold ranges that the function applied. The array contains a number of ThresholdData structures equal to numClasses. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose(). |