Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove distortion due to motion, from an image

I am trying to track motion of a toy car. I have recorded few videos and now trying to calculate rotation.

My problem is extracting features from object surface is quit challenging due to motion blur. Below image shows a cropped image from a video frame. The distortion happen in horizontal lines. The distortion seen in this image happens when object is moving. When the object is not moving there is no distortion.

Image shows distorted image of the car when its moving forward in a diagonal path cross the image frame.

enter image description here

I tried a wiener filter, based on median and variance but it didn't do much improvement. It only gave me a smoothed image as if Gaussian blur was applied on it.

What type of enhancements should I do to get a better image?

video - 720 x 576 frames - 25fps

like image 212
Niroshan Avatar asked Aug 07 '11 09:08

Niroshan


2 Answers

from the picture provided it looks like you need to de-interlace the video rather than just trying to filter what's there; i remember doing this by just taking every other scan line and then doing a resize to put it back in perspective.

i found a pretty cool site that talks about deinterlacing in case you'd like to see if you might have other possibilities:

http://www.100fps.com/

(oh, and i have not inspected the image very closely so it's possible that there is some other interlacing scheme going on than just every other line; in which case my first answer wouldn't work properly. and it does imply that you will lose some resolution but that's just the nature of interlaced video...)

like image 64
shelleybutterfly Avatar answered Oct 04 '22 04:10

shelleybutterfly


Given that your camera outputs interlaced video, you are better off using one field of the video. Either only use the even lines of the image or only the odd lines. The image will be squashed but you won't be mixing two images together.

like image 39
koan Avatar answered Oct 04 '22 04:10

koan