From what I have read on the web, one of the most efficient algorithms for image stabilization is to use Gray coded bit plane matching. However, I'm having trouble understanding it (Gray codes themselves are not that complex, it's the rest of it). Can anyone point me to a resource on this subject (or another good method of stabalization) that is a little below the level of most published papers? Sample code beats abstract generalized equations.
For my purpose, there will be no panning or zooming of the video and no moving objects in the frames.
I wrote a simple function that stabilizes three buffers of a video frame, one for Red, Green, and Blue. It's not the fastest, but for an NTSC DVD frame (720x480) it can run at about 1.7 frames per second on an E-machines t6412. All you have to do is pick a spot in the center of the image and compare it to the last frame by accumulating how many bits in each pixel match. In a nested loop offset the search area of the most recent frame by one pixel for each loop iteration. I tried analog FIR correlation but that didn't work nearly as good as picking the alignment offset with the most matching bits. And this algorithm also makes the output video fill the screen instead of waving black bars that follow the camera shake.
To use it, fill *redbuf with the red channel of the image, *greenbuf with the green channel, *bluebuf with the blue channel and call the digital_image_stabilization function. Once the function finishes the buffers will have the stabilized image. I used 96 for the search_len and 32 for the twiddle.
You can try some simple approaches first, I've suggested some recently here: Video Stabilization with OpenCV
In your case (no pan, no zoom, static scene), phase-correlation might be already sufficient and it's quite easy (see e.g. wikipedia on that). If I recall correctly, there are several video stabilization filters/plug-ins available for avisynth that use phase-correlation - you can try them out first.
For my needs, I've implemented a simple tool that goes the SURF/Homography route to align several images (aligns images, not videos). You might want to try that out to see if this suffices your needs as well: http://web.archive.org/web/20101004234404/http://ioctl.eu/wiki/applications/ImageAlign (Heh, I hope that code still runs...)