Picking a good reference pattern – Apple Shake 4 User Manual

Page 729

Advertising
background image

Chapter 25

Image Tracking, Stabilization, and SmoothCam

729

Picking a Good Reference Pattern

The ideal reference pattern is one that doesn’t change perspective, scale, or rotation,
and does not move offscreen or become obscured by other objects. The ideal pattern
also maintains overall brightness or color, is very high contrast, and is distinct from
other patterns in the same neighborhood. Meanwhile, in the real world, we have to
contend with all of these factors in our footage.

In the following example, two possible reference pattern candidates include the corner
at area A, or anywhere along the line near B. Area A is the better choice, since B can be
matched anywhere along the horizontal black line, and probably on the dark line that
is below B. One rule is to avoid similar horizontal or vertical patterns when selecting a
candidate pattern. If you can easily find similar patterns, so can the tracker.

Another potential candidate is a word in the sign. However, as the clip advances, the
text becomes an indecipherable blur. The A and B points also move closer together—
the clip has significant scaling on the X axis and some scaling in Y due to the
perspective shift. Although the overall brightness has dropped, contrast remains
relatively high at the A point. The A point is a good candidate for tracking with
referenceBehavior set to “update if below reference tolerance” or “update every frame.”

The reference sample should also be relatively constant and unique over time.
Flickering lights, for example, are not good reference patterns. If the lights were regular
enough, you could try to set the trackRange to match the flicker, that is, 1-5, 10-15, 20-
25, and so on. Granted, this is awkward. A better solution is to set your failureBehavior
to “predict location and don’t create key.”

Advertising