#include "Ltimgcor.h"
L_LTIMGCOR_API L_INT L_BlurDetection(pBitmap, Blurred, BlurExtent)
pBITMAPHANDLE pBitmap; |
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. |
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 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.
Functions: |
L_GlareDetection, L_TextBlurDetector, L_SignalToNoiseRatio |
Topics: |
|
Processing an Image | |
|
This example loads a bitmap and applies Blur detection filter and find Blur Extent factor.
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
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;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET