Course Home
Lecture Notes

Comments? Idea?

Motion Blur Detection

Final project by

Keren Damari & Ben Simandoyev


They say a picture capture a moment in time, but this is not accurate. A picture is a set of pixels, each contain an average value of light caught in time of exposure - the
time frame. When the subject does not move during the time frame (and is in focus), it will appear frozen in the image and we will get sharper edges. Blur occur when
a cell (or pixel) catch light from more than one point at the scene. Blur is very common in pictures.

When taking picture with blur, a lot of information lost. Detecting blur in images and then reconstruct the blurred areas could restore some of this information. This is the
motivation for detecting motion blur in images.

Out of focus images created when the subject captured is not in the depth of field of the lance making the image or part of it blurred. Blur can also appears when the shutter
is open causing each pixel capture light from more the one direction. Motion blur is usually created in an image when the time of exposure is long relatively to the velocity
of movement. Our goal is to identify motion in blurred pictures.

We will try to identify motion in the scene which was caused by relative motion between the camera and the entire scene, and also a local blur that appears in the image
caused by motion of one or more objects in the scene or motion of the background (relative to the camera). Meaning, we could expect part of the scene to be sharp.

Examples of motion blur:

Examples of other types of blur:

Approach and Method

Typically, motion blur creates smoothness in the image on the direction of movement, and many edges in the vertical direction. Those edges usually are not very prominent, but there are
many of them.

Thus, given an image, we can determine whether it is blurred by motion, by detecting areas where there is smoothness in one main direction and more significant difference of values
in the vertical direction. If we found that motion blur, we can compute its direction of motion relatively to the camera. In order to do that, we used edge detection with high
sensitivity (low threshold) to locate the edges. In motion blurred images, we expected to find large amount of parallel lines in the direction of movement and very few lines
in other directions.

The next step was to find those lines in the edge map. In order to do that we used Hough transform for lines. After finding the dominant direction in the edge map, we identified edges
as motion in case there was high relation between the votes to lines in the dominant direction and the votes to other directions.

Since part of the picture may be sharp and since some pictures shows movement in more the one direction, we divided the image matrix into grids, and looked for motion in each one of them.
The result is a matrix represents the direction of blur detected in each part, we used the value -1 in case motion blur was not found. By a simple analysis of the matrix, it is easy
to spot the motion direction of the image, or parts of it.


We tested results for three types of images: motion blurred, out of focus blurred and images without blur. Here is some of the typical results we came with:

Better results can be achieved by different grid sizes, depending on the pictures size, the size of the object in motion and the motion direction change rate.
Division to 36 grids in the left picrute, 64 grids in the right:

Results for pictures with out of focus blur:

Results for sharp pictures:

Counter examples - some pictures might be recognized as scene with motion although the human vision will contradict it, false positive. This will happens in pictures which fit to the two
factors we checked - high frequency of edges with the same direction and smoothness in the orthogonal direction. Here is one example:


Recognition of motion blurred images is pretty good. Few pictures require lower threshold, more sensitive edge detector.
In some pictures the edge detector find false edges at the ends, therefore motion recognition is more likely to fail in those areas and give false result.
The majority of images with motion blur are recognized, but there is considerable amount of images without blur that are recognized as images with motion blur. Our suggestion is to
run an algorithm to identify blurred areas prior to our algorithm, and try to detect motion only in those areas.
When the algorithm successfully finds motions in a grid, the returned direction is a pretty good estimation of the real motion direction in that grid.
Very dark or very bright areas of motion are more difficult to identify and requires lower threshold of edge detecting.
Future work: when the direction of movement is known, finding the amount of movement in that direction could help with restoration of images with motion blur.

Additional Information


Joseph Simmons, Benjamin Topper, Avi Wolfson, "Fourier Filtering for Removing Motion Blur in Images", 5/4/2007

Shin'ichi Satoh, Frank Nack, Minoru Etoh, "Advances in Multimedia Modeling", 14th International multimedia conference, MMM 2008, Kyoto' Japan' January 2008.

Renting Liu,Zhaorong Li,Jiaya Jia, "Image Partial Blur Detection and Classification", Department of Computer Science and Engineering, The Chinese University of Hong Kong.

Neel Joshi, Richard Szeliski, David J. Kriegman, "PSF Estimation using Sharp Edge Prediction", University of California, San Diego, Microsoft Research