0

I am currently using opencv, image and pygame for capturing frames from a hd webcam. What I want to achieve is to check if the captured frames are focused or not. This is aka focus testing but I couldn't come up with a solution in Python. IMHO problem can be reduced to determining the blurness percentage of each pixel and come up with a decision. What is the name of this algorithm I am seeking for ? Does anyone have any experience implementing similar algorithms in Python ?

I would appreciate any guidance.

y33t
  • 649
  • 4
  • 14
  • 23
  • You could apply a Gaussian filter to the image, take difference, the smaller the more blurry the image is, the greater the less it is ... – Samy Vilar Jun 16 '12 at 22:13
  • 1
    You can't rally determine how blurry a pixel is only an image or a segment of the image, check out http://www.scipy.org/SciPyPackages/Ndimage their pretty fast implementatios. – Samy Vilar Jun 16 '12 at 22:29

1 Answers1

1

If you want to check if an image is blurry this Is there a way to detect if an image is blurry? might be able to help you, pretty interesting.

Community
  • 1
  • 1
Samy Vilar
  • 10,800
  • 2
  • 39
  • 34