Wednesday, February 25, 2009

Revisiting Stabilization

In order to test the algorithm I proposed in the last post I need more video samples. This has forced me to revisit stabilization.

I plan to implement a crude stabilization using KLT to get feature points and then use a variation of the trajectory conditioning algorithm presented by Rabaud and Belongie (Counting Crowded Moving Objects).

The conditioning algorithm is used in a model assuming several small pixel subsets exhibit the same translative behavior. I can simplify this by assuming there is one large subset of pixels in the video frame that exhibit the same translation. This large subset of pixels is the ship in the video sequence.

I propose a method to generate several KLT points which should be "stuck" on the ship. I then calculate the centroid of the points. The next frame I track the KLT features and compute the new centroid. The translation motion is then estimated by taking the difference of centroids.

This doesn't account for loss of features during the KLT tracking process. I am considering using a method of penalizing the translation vector estimate if features are lost. I do this by calculating the variance of the feature points in each frame. If the variance decreases, then I want the translation to be minimized.

Let's consider a 1 dimensional case.

Each horizontal line is a 1 dimensional real line where a feature point may lie at time Fx. The features are indicated by red crosses.
The blue diamond is the calculated centroid of the feature points at time Fx. The green circle is the "true" centroid of the hidden object the feature points are attached.
A solid line indicates the correct translation vector and the dashed line is the false trajectory.
The translation from F1 to F2 is correct with no variance change in the feature points.
F2 to F3 has a loss in a feature causing the variance to decrease. This causes a false trajectory estimate.
F3 to F4 also has a false trajectory due to a loss of a feature point. Note the variance decreases.
F3 to F4 has a correct trajectory estimate with the variance not changing.

From this scenario I will induce a weight term on the trajectory shown in equation (1).
(1)
is the centroid of the feature points at frame z
is the variance of the feature points at frame z
is the estimate translation

0 comments: