0

I tried to search for an existing answer, but couldn't find one that satisfies me (or maybe I just don't get it).

A person asked a similarity question. But I am not see the answer Smoothing motion parameters, and I cant comment on this topic.

I have been working on video stabilization for quite a few weeks now. The algorithm I'm following basically involves 3 steps :

  1. FAST feature detection and Matching between two consecutvie frames

  2. Calculating affine transformation (scale + rotation + translation x + translation y ) from matched keypoints.

  3. Smooth motion parameters using cubic spline or b-spline.

I calculated affine transform. But I am stuck at smoothing motion parameters.

I have been unable to evaluate spline function to smooth the three parameters in real time processing.

How to get smoothing motion parameters.

For example:

I calculate the motion parameters between 2nd frame and 3rd frame, T2 (r2 : rotation, x2, y2: translation in horizontal and vertical) and then using B-spline to smooth 3 values. But I cannot imagine that how to smoothed them and obtain 3 smoothed values. (assume degree p = 30)

Please help me. Thank you so much

enter image description here

Community
  • 1
  • 1
user2745692
  • 89
  • 1
  • 9
  • What do those data points on the graph represent? You talk about having 3 points but the graph has 19. – Mark Ransom Oct 24 '14 at 15:38
  • The points on the graph is one of motion parameters. The motion parameter is scale, rotation and translation. In the graph, the points is translation, for example. The translation parameter will obtained from between two consecutive frames. And then, it will smoothed by b-spline curve. But I cant imagine that how to smooth it. And 19 points on the graph. They are translation parameter of two consecutive frames in video. For example, T1: between frame 1 and frame 2, T2: between frame 2 and frame 3.... – user2745692 Oct 24 '14 at 17:18
  • Here is all formulas you need to compute the spline: http://mathworld.wolfram.com/B-Spline.html – Andrey Smorodov Oct 25 '14 at 10:25
  • Yes. I know. But in my case, i dont know how to apply B-spline to it. – user2745692 Oct 25 '14 at 11:42
  • Get your N knots (depends on spline degree) compute spline basis functions, then take your point t and substitute it to your spline formula with computed parameters. Or just take ready library here (spline): https://github.com/Smorodov/jburkardt-cpp – Andrey Smorodov Oct 25 '14 at 13:39
  • I see. But I am so confused. For example, given Fi, i = 0,1,2,...n-1 frames is the number of frame in video. At the beginning, I estimate 3 motion parameters (scale, rotation, translation). And then I want to smooth them by using b-spline curve. After smoothing, I want to obtain those 3 smoothed parameters. Assume to apply to translation value x, degree = 30. So What should I do?. – user2745692 Oct 29 '14 at 14:08

0 Answers0