asked 2019-05-09 06:41:50 -0500

Rakshita gravatar image


I am working on video stabilization from last few days. I succeeded in stabilizing the video when the degree of shakiness is less. As the frequency of shakiness increases the algorithm fail to work. Can anyone suggest what i am doing wrong.

My algorithm:- 1) Find the transformation from previous to current frame using good feature to track and optical flow for all frames. 2) Accumulate the transformations to get the “trajectory” for x, y, angle, at each frame. 3) Smooth out the trajectory using a sliding average window. 4) Create a new transformation such that new_transformation = transformation + (smoothed_trajectory – trajectory). 5) Apply the new transformation to the video.

Thanks & Regards, Rakshita

edit retag flag offensive close merge delete


OpenCV can't be a magician, if in the video there is too much shaking you can't expect a fully stabilized video due to motion blur and other failure case. In such situation the stabilization need to be done from the source, using mechanical stabilization. What have you used for tracking good feature, Kanade method? I suggest you to take a look around papers, and also, sometimes, in special scenario, some assumption can be done to optimize the process.

HYPEREGO gravatar imageHYPEREGO ( 2019-05-10 04:27:58 -0500 )edit

Thanks for the reply. Agree to what you say , but using the same algorithm of openCV people have achieved quite a stable video (as per my online research). I tried the algorithm with the same video they are using but stability is not that as they are receiving.I am not concerned about motion blur but my concern is to lower the shakiness of the video. I am not getting what could be the possible error I am making as this subject is quite new to me. If you could suggest me something that will be very helpful. Are there any specific algorithm or libraries for stabilization?

Rakshita gravatar imageRakshita ( 2019-05-13 01:11:22 -0500 )edit

There are several tutorial, probably you already take a look at it, some:

It is a research topic that have been exploited many times, here two papers:

Matthias Grundmann, Vivek Kwatra, and Irfan Essa. Auto-directed video stabilization with robust l1 optimal camera paths. 

Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, and Heung-Yeung Shum. Full-frame video stabilization with motion inpainting.
HYPEREGO gravatar imageHYPEREGO ( 2019-05-13 02:24:11 -0500 )edit

Hi Rakshita, are you able to find the solution for your problem if so how did you find it

sistla gravatar imagesistla ( 2020-11-16 23:24:33 -0500 )edit
sturkmen gravatar imagesturkmen ( 2020-11-17 00:00:33 -0500 )edit