[FFmpeg-devel] [PATCH / RFC] Deshake / stabilize filter

Daniel G. Taylor dan
Mon Apr 12 18:49:47 CEST 2010


Hey,

Attached is a filter I wrote over the weekend for fun to stabilize an 
input video by shifting frames horizontally and vertically. It's fast 
(uses MMX/SSE/etc) and fairly accurate.

I am just learning about block matching, motion searches, and various 
other concepts and this is an algorithm I came up with reading various 
things online and in some free papers. The algorithm is described in the 
comments of the patch in plain English. There are still a few things I'm 
confused about / working on but here are some quick results from my Vado 
HD pocket camera in a real world scenario:

http://programmer-art.org/dropbox/deshake_dog_orig.mp4
http://programmer-art.org/dropbox/deshake_dog_32.mp4

And here is an unrealistic example to show the strengths and weaknesses 
of the filter in its current state (e.g. no rotation support):

http://programmer-art.org/dropbox/deshake_table_orig.mp4
http://programemr-art.org/dropbox/deshake_table_32.mp4

The filter is licensed under the LGPL and I'd like to:

   1. Ask for comments, suggestions, etc to make it better
   2. Get it into FFmpeg trunk

I also found this while searching and realized it uses a very similar 
algorithm but does a full matrix transform and detects rotation which 
seems works really well but is significantly slower and GPL:

http://public.hronopik.de/vid.stab/features.php?lang=en

Take care,
-- 
Daniel G. Taylor
http://programmer-art.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deshake.diff
Type: text/x-diff
Size: 20511 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100412/d911d984/attachment.diff>



More information about the ffmpeg-devel mailing list