Detecting camera shake

49 Views Asked by At

I have a bunch of data captured from a worm tracker that consists of a B&W camera that stares down at a few dozen worms for an hour at a time. The tracker captures the outline of each worm ("blob"), and records it to a file, along with some other summary statistics like centroid, orientation, etc. for each frame of the recording (it runs at about 12 fps).

Worms tracked

What I want to do is detect if and when the camera was shaking, as this would appear as though all the worms were moving in the same direction at the same time; not very likely. My first thought was to just average all their centroid positions over time and run it through a high-pass filter looking for 'spikes', but that doesn't seem like a very rigorous method.

Is there some mathematical technique that would allow me to compare several time series looking for moments of correlation between all of them which would likely signify my camera shaking (as worms have not been observed to line dance)?