stabilize — tool for stabilizing shaking movies

download

I have video camera. Sometimes I record with a free hand, and then I have shaking movies. I could not find any good program to stabilize such movie. So i wrote this program.

This program compares each frames with previous frames and tries to find out which offset should it shift that frame to make the movie more stable.

This is very early alpha version. It gives quite good results, but works very slowly (even one minute per frame). Now I will try to make it work faster. If you can help me with it, thanks. The most problem is substracting frames with different offsets. To substract two RGB 640x480 frames with offsets ranging from -40 to +40 the program must substract 640*480*3*80*80=5898240000 numbers.

Basic usage is simple: see USAGE.txt.

More advanced usage need changing some #defines in sources (no command line options - well, I told it is alpha).

#define MAX_OFFSET_X 40
#define MAX_OFFSET_Y 40

This defines maximal offset between two consecutive frames.

#define FRAME_START 0
You can set here some number n and start stabilizing the movie from nth frame.

#define DIFFSTEP_X 4
#define DIFFSTEP_Y 4

You can set here some numbers n and m. Then when comparing two consecutive frames only every mth pixels in every nth row will be compared. This way the program will run faster, but will be less precise. The good choise is usually 4.

Do you still have any questions, comments? Don't hesitate to contact me

main()