Tracking the Scale of an Object

 
 
 

In some cases, you may want the object to remain stationary and track only changes in scale. For example, assume that a camera is looking down a straight road at a car approaching. You need to track the license plate as the car approaches.

The Tracker requires two tracker boxes to measure scaling. The changing distance between the centers of the two reference boxes determines the scale.

In our example, you want to lock a new license plate to the old one. You would position one reference box over one corner of the license plate and the other reference box over the diagonally opposite corner.

The license plate is a layer. It assumes you have a Reaction node with two layers—the background layer and the source layer. In this example, the background is the car footage and the source is the license plate footage or object.

Note

You can also use the 2D Transform, and the scale parameter controls of the Garbage Mask, Remove Dust and Warp2D tools.

To track changes in scale only:

  1. Determine a good reference frame and position the background footage at that frame.
  2. Select the Tracker Analyzer tool from the Tools tab and drag it to the Schematic. You do not need to attach it directly to the dependency graph as it is not going to be modifying the image but rather, you will be using data associated with that tracker.
  3. Attach the composition to the input of the tracker.
  4. Add a second Tracker Analyzer.
  5. Resize and reposition each Tracker, so that they track the scaling change. (In this example, the Trackers are placed over the upper-right and lower-left corners of the license plate.)
  6. Adjust the settings for each Tracker.
  7. Select the first analyzer from the File browser and click Analyze to start the analysis.
  8. Return to the first frame.
  9. Select the second analyzer from the File browser and click Analyze to start the analysis.
  10. Drag a Reaction tool from the Tools tab and place it in the dependency graph between the footage node and the Output node.
  11. With the cursor over the Reaction node, right-click and select Add Source.
  12. At the bottom of the Layer Editor, select Bilinear and click Create.

    A new layer is created.

  13. Attach the second composition (or object) as source 1.
  14. Go back to the first frame.
  15. Click the Reaction tab.
  16. Right-click Scale and select Track Scale.
  17. Select both Tracker Analyzers using Ctrl + click, and click Link.

    An expression is automatically created linking the tracking data to the scaling of the new license plate.

  18. Play the footage to view the result.
Note

When tracking data needs to be applied to more than one layer in a composition, add an extra axis node to the dependency graph and connect it to the appropriate layers. Linking the axis to several layers facilitates panning multiple objects inside a reaction. In this case you would then click the axis node instead of the Layers node at step 15, and right-click the Scale label and continue the procedure.

(a) Axis node connected to two layers inside Reaction.