BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.25k stars 4.61k forks source link

Camera stabilization #1546

Open ethanjdiamond opened 10 years ago

ethanjdiamond commented 10 years ago

Anyone have any ideas on how to go about implementing a frame stabilizing filter?

I've tried combining a transform filter with the motion detecting filter, but it seems to have too much noise. I've tried using harris corner detection and trying to determine from corner movement how much the frame has changed, but it's hard to match up corners frame by frame.

If anyone's implemented this and could help I'd be very grateful.

eighteight commented 10 years ago

Have you considered using accelerometer?

ethanjdiamond commented 10 years ago

That seems obvious now that you say it. Will report results.

rued commented 10 years ago

We are working on a similar problem where we are testing a combination of CoreMotion and simple feature matching.

With CoreMotion we can positively detect pitch and roll, but yaw is too unstable due to the imprecise magnetometer.

So we use the full 3D transform, but correct the yaw error, by comparing the current captured frame with a reference frame, and see if we should offset left/right to compensate for the drift. Basically a 1D OTA implementation: http://www.ece.cmu.edu/~ee899/project/deepak_mid.htm