V
V
Vitaly Rybchenko2018-05-27 14:56:23
Images
Vitaly Rybchenko, 2018-05-27 14:56:23

How (with the help of what) to determine the clarity of the photo and "black" photos?

Hello!
How in C# at the time of saving the file to the server, you can check it for clarity (the image is not blurry) that it is an image at all, and not a black, white or red photo (for example, the camera is closed with a finger)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2018-05-28
@sergiks

Black photos are just the average brightness of all pixels to estimate.
Clarity - go through the highpass filter and evaluate the number of values ​​far from the middle. Choose the radius relative to the size of the photo: 1/50, 1/100 - what size should clear details be in the picture?

D
Deerenaros, 2018-05-31
@Deerenaros

Monochromatic images are simply eliminated by the root mean square.
Clarity depends on many factors. However, there is a variant with gradients: they "should" have a distribution with shallow boundaries. You can google something like that, like it was even on Habré. EMNIP, this method is extremely effective, but there is a simpler way - a banal Fourier transform. In the case of a blurry image, it should be smoother and have a low signal at high frequencies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question