code Mapping opencv Tracking video vision

Simplest 20-lines OpenCV video stabilizer [w/ code]

A simple and short video stabilizer with OpenCV.

Just sharing a simple recipe for a video stabilizer in OpenCV based on goodFeaturesToTrack() and calcOpticalFlowPyrLK().
Well… it’s a bit more than 20 lines, but it is short. And it doesn’t work for every kind of video (although the results are funny anyway! :).


The original video is from Vimeo:
Under Creative Commons license, attribution goes to: Anton Withagen

One reply on “Simplest 20-lines OpenCV video stabilizer [w/ code]”

Thank you for the code. I ran it on Visual Studio and it stops at a point where it detects only the features. Only the original window opens and is still. No movement. Tried it with different video formats. Your help is appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *