3 Answers
3

The Discrete wavelet transform is a useful tool in such detection. Here is a paper from Carnegie Mellon School of Computer Science on detecting and quantifying blur in images by using the DWT. For a binary decision, you threshold the amount to a desired level and everything above that has blur.

This is handy, but the paper explicitly says "It is effective for both Out-of-focus blur and Linear-motion blur", which means it's not much use for detecting motion blur in particular...
–
Josh Bleecher SnyderApr 19 '12 at 16:55

1

@JoshBleecherSnyder Out-of-focus blur is not directional, whereas linear-motion blur is. You can run a Principal Component Analysis to obtain the eigenvalues of the blur's characteristic edge points' direction vectors and assess the strength of the predominant one. If it's beyond a certain threshold, you can conclude that the blur is directional, thus linear motion blur.
–
luvieereApr 20 '12 at 5:38

There are multiple ways to do this, maybe one of the imaging gurus here has a much better answer. Anyways...

My first shot would be to have a frequency analysis of the image (read: 2d fourier transform). Then define a threshold for the high frequencies (i.e. fast changes from one pixel to the next) for true/false. Motion blur filters the high frequencies out. Your mileage may vary, e.g. a completely black picture will have no high frequencies although it is not blurred. Depending on the lens and aperture used, parts of the image may be blurry because they are in the background. I don't think there's a one-size-fits-all solution here.

You can also use the Richardson-Lucy Algorithm. It's mostly used for blind de-convolution, but as you know that it's motion blur you need to remove, the RL Algorithms should take fewer iterations to compute a workable reconstruction.