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:
Name | Type | Description |
hIGear | HIGEAR | Image to analyze. |
xPos | AT_INT | X coordinate of a point inside the area to be detected. |
yPos | AT_INT | Y coordinate of a point inside the area to be detected. |
nThreshold | AT_DOUBLE | Area threshold. |
lpRect | LPAT_RECT | Rectangular area to apply the effect to, or NULL for whole image. |
lpMask | AT_NR_ROI_MASK* | 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.