L_MICRDetection

#include "Ltimgcor.h"

L_LTIMGCOR_API L_INT L_MICRDetection(pBitmap, Inrc, Outrc, Flags)

Automatically detects Magnetic Ink Character Recognition (MICR) zones in a document image.

Parameters

BITMAPHANDLE* pBitmap

Pointer to the bitmap handle that contains the MICR code.

L_RECT Inrc

Represents the area to be searched.

L_RECT* Outrc

Represents the location of the MICR zone that was detected.

L_UINT Flags

Reserved for future use.

Returns

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

Comments

This function searches a given L_RECT zone in a document image for a MICR zone.

This function processes only the region specified by the InRect parameter. It does not support regions.

This function supports 8-, 12-, and 16-bit grayscale images and 24- and 32-bit color images.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

This example loads a bitmap and applies MICR detection filter.

L_INT MICRDetectionFilterBitmapExample(L_VOID) 
{ 
   L_INT nRet; 
   BITMAPHANDLE LeadBitmap;   /* Bitmap handle to hold the loaded image. */ 
   /* Load the bitmap, keeping the bits per pixel of the file */ 
   nRet = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("MICR_SAMPLE.tif")), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   /* Apply a MICR detection filter and return the location of the MICR code in Outrc rect*/ 
   L_RECT Inrc  = { 0, 0, 0, 0 } ; 
   L_RECT Outrc = { 0, 0, 0, 0 } ; 
 
   nRet = L_MICRDetection(&LeadBitmap, Inrc, &Outrc, 0); 
 
   //free bitmap 
   if(LeadBitmap.Flags.Allocated)   
      L_FreeBitmap(&LeadBitmap); 
 
   return nRet; 
} 

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help