0

I want a help in python code that should show me if the images in a folder is blurry or not.

I find this article useful https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/ but in the output it shows a text on the top of the image with its blurry value.

But I want the result should generate a text file (output.txt) that shows the image path , it's blurry value and also states whther it is blurry or not. Rather than writing these things on the top of image.

I am using Anaonda 3 and install cv2, argparse and imutils explained in the article.

In output.txt it should be like this

kiran
  • 1
  • 1
    Welcome to Stack Overflow. Please take the **tour** (https://stackoverflow.com/tour) and read the information guides in the **help center** (https://stackoverflow.com/help), in particular, "How to Ask A Good Question" (https://stackoverflow.com/help/how-to-ask) and "How to create a Minimal, Reproducible Example" (https://stackoverflow.com/help/minimal-reproducible-example). – fmw42 Feb 12 '20 at 23:24
  • Well, it depends on which metric for "blurriness" you use. A common metric to compute is the Variance of the Laplacian. The Laplacian is used to calculate edges, so, in a blurry image, the edges are expected to be minimal. You can compare the variance to a threshold value to determine if the image is "blurry enough" or not. – stateMachine Feb 13 '20 at 01:36

0 Answers0