API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Image Preprocessing Functions > IG_REC_image_area_clear |
Clears a rectangular area of the hImage image in the recognition engine's memory space.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_image_area_clear( HIG_REC_IMAGE hImage, LPCRECT pRect ); |
Name | Type | Description |
---|---|---|
hImage | HIG_REC_IMAGE | Handle of the image to be modified. |
pRect | LPCRECT | Coordinates of the rectangular area to be cleared by setting all of its bits to zero (0). A NULL value means the entire image. |
This function does not process image pixels.
Copy Code
|
|
---|---|
AT_ERRCOUNT ErrCount = 0; HIGEAR higImage = 0; HIG_REC_IMAGE higRecImage = 0; AT_RECT Rect; Rect.left = 1; Rect.right = 101; Rect.top = 1; Rect.bottom = 101; ErrCount += IG_load_file("Image.tif", &higImage); ErrCount += IG_REC_image_import(higImage, &higRecImage); ErrCount += IG_REC_image_area_clear(higRecImage, &Rect); //... ErrCount += IG_REC_image_delete(higRecImage); ErrCount += IG_image_delete(higImage); |
With a bi-tonal image, setting all its bits to zero (0) results in an entirely white image. In other cases (but not for palette-color images), the resulting image is entirely black.