Macro-block vector analysis.

I took my test rig for a walk over this rug in the lounge (red-point siamese cats for scale):

Cat Mat

Cat Mat

I captured a single frame of macroblocks as I walked forwards across the rug:

Macroblock vectors

Macroblock vectors

This cluster of the vectors corresponds to the spikes in this graph of the SADs:

Vector SADs

Vector SADs

Critically, the X axis cluster also corresponds to the walking direction.

I need (and should be able) to get two things out of this:

  • a sense of scale: the cluster is around the (-12,-3) X.Y position.  The test was carried out with me carrying the rig about 1m off the ground, and walking about 1m/s.  Based on my previous speculative thoughts about the macro block units, this suggests the cluster X value of -12 should represent 0.43m i.e. (size of frame in meters) / (number of macro-blocks per frame) * macro-block vector:
    (2 * tan (48.8 / 2) * height) / (400 / 16) * -12 = -0.43m

    This is clearly wrong.  My guess is I was walking at about 1m/s and the video is running at 20fps, so the movement portrayed by this set of vectors should be about 0.05m.  Clearly there’s more digging required to understand difference between 0.43 and 0.05m.

  • how to filter out the good vectors from the bad.  A SAD biased average of all the vectors in this frame results in an overall vector of (-8.04,-2.78) compared to the visual on the cluster of about  (-12,-3); this isn’t bad, but I’m sure it could be made better by discarding some of the vectors based on their SAD values.  Again more digging required here.

Despite the further digging required in both cases, I’m pretty confident that things are going in the right direction.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.