Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > VirtualDub Filters and Filter Development > Slanted Camera Corrected By Deshaker


Posted by: Ivan_Grozny Dec 21 2007, 03:58 PM
If you don't hold your video camera vertical enough, it produces film with agonizingly slanted horizons. I corrected this afterwards with help of the great deshaker plugin of Gunnar Thalin. You first have to get acquaintanced with this plugin, but then it is easy. As a bonus your film is deshaken as well.
The deshaker logfile created after the first pass contains columns with the correction factors for pan, tilt, rotation and zoom, with the ascending frame numbers in vertical order. Copy the columns to an excel spreadsheet and add a constantly increasing amount to the figures of the rotation column (e.g. from top to bottom add 10, 20, 30 etc), the size of the amount you need depends on how much correction you need but also on the motion smoothness setting of the second pass. Use negative numbers to correct in clockwise direction. When I use rotation smoothness 2, an increment of +20 rotates the picture over -7 degrees. Increments are needed due to the integrator of the deshaker algorithm but you can vary the increment if needed. If you don't want simultaneous deshaking replace all original log file figures by zeros. Paste the edited columns back into the log file and save.
Configure the filter parameter form for Pass 2 with low rotation smoothness to obtain immediate and constant correction (from the 1st or 2nd frame onwards), but use high values in combination with high increments if you like special effects (try yourself). Now do the second pass.
In another instance of VirtualDub, open the "deshaken" file, view the resulting video, if necessary re-iterate with the first instance of VirtualDub.
Thanks to Gunnar for making this possible!

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)