BLURDETECTIONOPTIONS

Summary

The BLURDETECTIONOPTIONS structure provides options to be used in detecting obstruction on the bitmap including blur, glare and reflection.

Syntax

typedef struct BLURDETECTIONOPTIONS 
{ 
   L_UINT uStructSize; 
   L_RECT rcROI; 
   L_FLOAT fResizeFactor; 
   L_DOUBLE dGlobalBlurExtent; 
   L_DOUBLE dBlurThreshold; 
   L_FLOAT fLettersStretchThreshold; 
   L_INT LettersCount; 
   LETTERBLUREXTENT * pLettersBlurExtent; 
   GLAREDETECTIONOPTIONS GlareOptions; 
   REFLECTIONOPTIONS ReflectionOptions; 
   L_BOOL bBypassBlurDetection; 
   L_FLOAT fDeskewAngle; 
   L_FLOAT fLettersStretchFactor; 
   L_INT nAverageCharsHeight; 
} BLURDETECTIONOPTIONS, * pBLURDETECTIONOPTIONS; 

Members

uStructSize

Size of this structure in bytes, for versioning. Use the sizeof() operator to calculate this value.

rcROI

The region of interest on the bitmap to perform the blur detection. This will not affect the ReflectionOptions or the GlareOptions members.

fResizeFactor

The factor to resize the bitmap before detection is performed. This will cause the mask bitmaps within the ReflectionOptions and GlareOptions to be resized.

A value of 0.5 will run the detection on an image that is half the size of the original bitmap.

dGlobalBlurExtent

The median blur value of all the LETTERBLUREXTENTs.

dBlurThreshold

A user defined threshold for determining if the overall image is blurry. If the dGlobalBlurExtent is less than this value, the reflection and glare detection will not be performed.

The values for this should range 0.0-1.0. A good starting threshold is 0.6.

fLettersStretchThreshold

Indicates the stretching amount of the letters in the image. The value 1.0 means the aspect ratio of the letters in an image is correct.

LettersCount

The number of letters reported in the detection.

pLettersBlurExtent

The pointer to the buffer of letters resulting from the detection.

GlareOptions

The GLAREDETECTIONOPTIONS structure containing the glare mask.

ReflectionOptions

The REFLECTIONOPTIONS structure containing the reflection mask.

bBypassBlurDetection

A boolean flag that indicates whether to bypass the blur detection. Possible values are:

Value Meaning
TRUE Bypass the blur detection.
FALSE Perform the blur detection.

Default value is FALSE.

Note: L_BlurDetectionExt still performs the glare and reflection detection.

fDeskewAngle

A float value that measures the angle of the objects (typically text) contained in the image to determine if there was any error after performing the deskew.

A good range for this is [-2:2]. Anything higher may indicate that there was an issue with the deskew.

fLettersStretchFactor

A float value that measures the stretching amount if the letter is stretched in either Horizontal or vertical direction and not in both directions.

nAverageCharsHeight

The average characters height measured in pixels unit.

Comments

pBLURDETECTIONOPTIONS is a pointer to an BLURDETECTIONOPTIONS structure. Where the function parameter type is pBLURDETECTIONOPTIONS, you can declare an BLURDETECTIONOPTIONS variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBLURDETECTIONOPTIONS variable is necessary only if your program requires a pointer.

For the best results, have the object centered in the frame to reduce any errors associated with background blur/noise.

Usage

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

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.