#include "Ltimgcor.h"
L_LTIMGCOR_API L_INT L_BlurDetection(pBitmap, Blurred, BlurExtent)
Determines whether an image is blurred.
Pointer to the bitmap handle referencing the bitmap to be tested.
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. |
The amount of blurring. Valid values range from 0 to 1.0.
Value | Meaning |
---|---|
SUCCESS | 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 BlurExtent 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
Win32, x64, Linux.
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
if(LeadBitmap.Flags.Allocated)
L_FreeBitmap(&LeadBitmap);
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document