Search code examples
pythonopencvvideodeconvolutionmotion-blur

Remove motion blur with real time performance on camera input


I have drawn simple pattern of geometrical shapes on a paper and placed it one a object as marker. I'm able to detect and analyze pattern successfully. However when object moves a little faster the motion blur is introduced which can be rotational or linear. This way detected regions overlap e.g. a strip of arrows moving in direction of arrows, is detected as a single line after introduction of motion blur. Therefore I need to fix it somehow. So I can detect individual arrows and analyze them. Below are images of markers with and without motion blur.

enter image description here

enter image description here

Is there any python module or open source implementation that can be used to solve it? Motion can be in any direction at any speed so PSF is not known and required for Wiener, Lucy-Richardson methods. Also it is a realtime tracking problem so I need something that executes fast.

P.S. I'm using Python 2.7 and Opencv 3


Solution

  • This problem can be solved by limiting the exposure time of your camera. This can be done using opencv by using: cap.set(cv2.CAP_PROP_EXPOSURE,40) or using the v4l2-ctl command line utility.