See also:

Multiple
tracking
segments

Tracking with a static mask

To start motion analysis in PatchMaker, a region of interest must first be selected on the object by drawing a mask. PatchMaker tracks the selected region through the frames by keeping the mask glued to the object and moving (warping) it accordingly. This tracking mode, however, is not always convenient: in some cases the mask will rapidly gets outside the frame boundary, requiring creation of a new short segment with a new mask, and so on.

This is exactly what happens in a clip giving a panoramic view of a long building. At any given moment, only a portion of the whole building is visible in the clip, but the camera motion remains the same.

To make tracking easier in such cases, PatchMaker has an option that allows motion analysis to be limited to a region fixed relative to the frame boundary (static mask). If the Original mask in all frames parameter is on, the mask will remain the same in all frames rather than follow the tracked region. As a result, it will cover different object parts in different frames.

One should remember, however, that, for correct motion detection, the regions covered by the mask in all frame must have significant color or luminosity gradients in different directions.

Example of static mask usage

Consider the following source footage of a tennis tournament. The player comes out to the net, the camera follows him, and the stands are scanned in a fast and sliding manner:

Our task is to place a big ad on the stands:

The overlay we use is a still image much larger in size than the original frames (it was created for the last shot frame shown above):

 

 

Next we draw a static mask:

No need to worry about uniform regions under the mask as the stands are populated by variegated public. However, the settings of the Matching radius and Max motion change have to be increased as the motion is fast and irregular.

The mask cannot stretch out too close to the frame margins because, with Reference frame pitch equal to 4, a large portion of the masked image in the reference frame would crop out of the shot in subsequent frames. We cannot make the mask much smaller either because of instability in determining the rotation parameter value (caused by poor video quality).