Detects an area of pixels using a specified threshold.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_IP_detect_area_with_threshold( HIGEAR hIGear, AT_INT xPos, AT_INT yPos, AT_DOUBLE nThreshold, LPAT_RECT lpRect, AT_NR_ROI_MASK* lpMask ); |
Arguments:
hIGear | Image to analyze. |
xPos | X coordinate of a point inside the area to be detected. |
yPos | Y coordinate of a point inside the area to be detected. |
nThreshold | Area threshold. |
lpRect | Rectangular area to apply the effect to, or NULL for whole image. |
lpMask | Returns the ROI mask. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional, except:
Indexed RGB – 1 bpp;
Indexed RGB with non-grayscale palette;
Grayscale – 1 bpp;
Images that have a Grayscale LUT attached to them.
Remarks:
The pixel is supposed to be in the area if the following condition is true for all pixel channels:
(pixel[i] >= initialPixel[i] - threshold) && (pixel[i] <= initialPixel[i] + threshold)
The area being detected is saved as the ROI of the page.