L_BlankPageDetectorBitmap

#include "l_bitmap.h"

L_LTIMGCOR_API L_INT EXT_FUNCTION L_BlankPageDetectorBitmap(pBitmap, pOptions, uFlags)

Determines whether the scanned image is a blank page.

Parameters

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle that references the image to be tested.

pBLANKPAGEDETECTOROPTIONS pOptions

Pointer to a BLANKPAGEDETECTOROPTIONS structure containing options for detecting whether an image is a blank page.

L_UINT uFlags

Reserved for future use.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Scanned images can contain blank (empty) pages. This function determines whether the scanned image is a blank page or not, detects noisy, bleed through, and lined blank pages with high precision and speed, and provides a percentage accuracy of the result. This function helps reduce the disk storage space required for scanned images.

This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.

This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

L_INT BlankPageDetectorBitmapExample(L_VOID) 
{ 
   L_INT nRet; 
   BITMAPHANDLE LeadBitmap;   /* Bitmap handle hold the loaded image. */ 
   /* Load the bitmap, keeping the bits per pixel of the file */ 
   nRet = L_LoadBitmap (MAKE_IMAGE_PATH("IMAGE1.CMP"), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   /* Check if the image is a blank page */ 
   BLANKPAGEDETECTOROPTIONS Options = { 0 }; 
   Options.uStructSize = sizeof BLANKPAGEDETECTOROPTIONS; 
   Options.bIsBlank = 1; 
   Options.uAccuracy = 0; 
 
   nRet = L_BlankPageDetectorBitmap(&LeadBitmap, &Options, 
      BLANK_DETECT_NOISY | BLANK_BLEED_THROUGH | BLANK_DEFAULT_MARGIN); 
 
   if (Options.bIsBlank) 
      OutputDebugString(L_TEXT("Image is blank.\n")); 
   else 
      OutputDebugString(L_TEXT("Image is not blank.\n")); 
 
   //free bitmap 
   L_FreeBitmap(&LeadBitmap); 
 
   return nRet; 
} 
Help Version 21.0.2021.8.4
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.