ImageGear for C and C++ on Windows v19.1 - Updated
IG_REC_image_blank_page_detect
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Image Preprocessing Functions > IG_REC_image_blank_page_detect

Detects whether or not the image is considered to be blank.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_image_blank_page_detect(
   HIG_REC_IMAGE hImage,
   LPAT_BOOL lpIsBlank
);

Arguments:

Name Type Description
hImage HIG_REC_IMAGE Image handle.
lpIsBlank LPAT_BOOL Buffer to return a value specifying whether or not the image is blank.

Return Value:

The number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

See IG_REC_image_import.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
AT_BOOL bIsBlank = FALSE;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_blank_page_detect(higRecImage, &bIsBlank);
ErrCount += IG_REC_image_recognize(higRecImage);

//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

Remarks:

This function will consider an image to be blank (all or mostly white) if there is only a small percentage of noise, especially noise around the edge of the image usually created as a result of scanning.

Beginning with ImageGear v18, the behavior of IG_REC_image_blank_page_detect was modified. In previous versions of ImageGear, the function considered thin solid black borders as noise. Now the function considers them as graphics. As a result, pages that only contain a thin black border at one or more edges may now be detected as non-empty.

See Also

HIG_REC_IMAGE