K
K
Kindman2011-06-15 14:04:47
Image processing
Kindman, 2011-06-15 14:04:47

How to automatically find blurry photos?

Hocus pocus When processing a large number of digital photographs obtained as a result of photographing paper documents (A4, A3 formats, as well as large-format drawings ), you have to look at the received images with your eyes in order to select the part of them that have a loss of focus (and, accordingly, the text which cannot be read).
Autofocus In fact, most cameras have an Autofocus function that adaptively changes the focal length based on comparison of several intermediate images, choosing the sharpest ones.
Out of sight We need a way to automatically cull photos with blurry images of objects (with the help of a computer) (without the need for visual review).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
Ocelot, 2011-06-15
@Ocelot

You can try frequency algorithms. For example, take an array of pixel brightness values ​​in the square of interest to us, pass it through the Fourier transform, and analyze the resulting spectrum. The absence of higher frequencies in the spectrum will indicate the absence of sharp transitions and fine details in the image => it means defocusing.
As far as I know, a similar mechanism (implemented in hardware) was used in analog video cameras.

A
Anatoly, 2011-06-15
@taliban

As far as I understand autofocus, the simplest autofocus is a contrast check.
Given that you have text, this method should work well. Alas, that's all I can say =)

N
niko83, 2011-06-16
@niko83

you need to make 2 copies of the original image, blur one, and sharpen the other. Save with the same compression in JPEG, if the sizes do not differ much, then the source is blurry. If it is strong, the source is clear. The threshold value is chosen experimentally

I
impass, 2011-06-16
@impass

Image partial blur detection and classification
Blur detection for digital images using wavelet transform
Image blur detection via Hough transform (with sample code)
StackOverflow: Get the most accurate image using OpenCV

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question