#include "Ltimgcor.h"

L_LTIMGCOR_API L_INT L_BlurDetection(pBitmap, Blurred, BlurExtent)


pointer to the bitmap handle

L_BOOL* Blurred;

pointer to an L_BOOL variable that indicates whether the image is blurred

L_DOUBLE* BlurExtent;

The amount of blurring

Determines whether an image is blurred.

Parameter Description
pBitmap Pointer to the bitmap handle referencing the bitmap to be tested.
Blurred Address of a variable to be updated with a value indicating whether the image is blurred. Possible values are:
  Value Meaning
  TRUE The image is blurred.
  FALSE The image is not blurred.
BlurExtent The amount of blurring. Valid values range from 0 to 1.0.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


This function determines whether an image is blurred. If it is blurred, it calculates the amount of blurring.

The pBlurExtent parameter has no meaning unless the image is blurred.

This function can only process entire images. It does not support regions.

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

Required DLLs and Libraries


For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64, Linux.

See Also


L_GlareDetection, L_TextBlurDetectorL_SignalToNoiseRatio, L-BrightnessDetection 


Raster Image Functions: Image Analysis

Processing an Image


Removing Noise


This example loads a bitmap and applies Blur detection filter and find Blur Extent factor.

L_INT BlurDetectionExample(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("cannon.jpg")), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL); 
   if(nRet !=SUCCESS) 
      return nRet; 
   /* Apply a blur detector */ 
   L_BOOL Blurred ; 
   L_DOUBLE BlurExtent ; 
   nRet = L_BlurDetection(&LeadBitmap, &Blurred, &BlurExtent); 
   if(nRet !=SUCCESS) 
      return nRet; 
   //free bitmap  
   return SUCCESS; 

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

LEADTOOLS Raster Imaging C API Help