Answer the question
In order to leave comments, you need to log in
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
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.
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 =)
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question