Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify/check blur image?

How can we identify that a given image is blur or how much percent is it blur in C#? Is there any API available for that? Or any algorithm that can be helpful in that?

Thanks!

like image 985
Zaheer Avatar asked Nov 05 '09 14:11

Zaheer


People also ask

Is there a way to detect if an image is blurry?

In images, high frequency is edges and texture. In a blurry image, the energy in this high frequency content is weak. The easiest way to detect if an image is blurry or not is to look at the strength of the high frequency content. This can be done with a simple gradient of gaussian filter or a laplacian filter.

How do you detect motion blur?

Thus, given an image, we can determine whether it is blurred by motion, by detecting areas where there is smoothness in one main direction and more significant difference of values in the vertical direction. If we found that motion blur, we can compute its direction of motion relatively to the camera.

How do you read blurry pictures in text?

You can easily fix blurry text in an image with Fotor's online image deblurrer. Using artificial intelligence (AI), it automatically detects and fixes blurry text pictures and jagged edges in your photos. You can also use its image sharpening tool to sharpen text in your image to make them more readable.


1 Answers

You could perform a 2D-FFT and search the frequency coefficients for a value over a certain threshold (to elimate false-positives from rounding/edge errors). A blurred image will never have high frequency coefficients (large X/Y values in frequency-space).

If you want to compare with a certain blurring algorithm, run a single pixel through a 2D-FFT and check further images to see if they have frequency components outside the range of the reference FFT. This means you can use the same algorithm regardless of what type of blurring algorithm is used (box blur, gaussian, etc)

like image 102
matja Avatar answered Oct 31 '22 11:10

matja