Advanced strategies to improve tracking results
Use the following advanced techniques to improve your tracking results.
Smooth a track curve in the Keyframe Editor
You can smooth a track with the Keyframe Thinning function. Before smoothing the curve, you might want to copy the behavior (as a backup) to the Library or duplicate the behavior in the project. (For information on saving items to the Library, see Save custom objects to the Library.
In the following graph, there’s a keyframe at every frame, and the curve is quite jagged. The following example shows how you can simplify and smooth this curve.
-
In the parameter list of the Keyframe Editor, click in the fifth column of the keyframed parameter to open the Animation menu, then choose Reduce Keyframes.
The Reduce Keyframes dialog appears.
The Reduce Keyframes dialog applies a thinning algorithm to the keyframes for the parameter, reducing the number of keyframes while attempting to maintain a similar curve shape. The thinning algorithm can be adjusted in two ways. Increasing the Error Tolerance results in fewer keyframes. Increasing the Smoothing (frames) makes smoother curves between keyframe values.
This example uses 5, which means that 5 track points centered on the evaluated point are used to compute the current point’s new, smoothed value. This is a standard Gaussian (bell-curve-type) filter. In other words, if you leave the Smoothing value at 5, when the value of frame 12 is computed, frames 10, 11, 12, 13, and 14 are considered. If Smoothing is set to 3, the algorithm uses frames 11, 12, and 13. The larger the Smoothing value, the more points are considered (and thus more calculations done) for every point in the curve.
-
Adjust the sliders to smooth the curve:
Error Tolerance: Drag right to reduce the number of keyframes used in the curve.
Smoothing (frames): Drag right to create smoother curves between keyframes.
The Smoothing control modifies the curve by calculating, for each track point, the average of its neighboring track points, then applying that new value to the evaluated track point. The value set in the Smoothing slider specifies how many neighboring track points to average. In other words, if you leave the Smoothing value at 5, when the value of frame 12 is computed, frames 10, 11, 12, 13, and 14 are averaged; and if Smoothing is set to 3, frames 11, 12, and 13 are averaged. The larger the Smoothing value, the more points are considered (and thus more calculations done) for every point in the curve.
As you adjust the sliders in the dialog, the curve is modified in the Keyframe Editor. There are now fewer keyframes on the curve, and the curve becomes smoother.
Click OK.
Apply an Average parameter behavior to a track curve
Another smoothing option is to apply the Average parameter behavior to a track curve in the Keyframe Editor. This behavior smooths the transition from one keyframe value to another. Averaged motion moves more fluidly.
-
In the parameter list of the Keyframe Editor, control-click the name of the keyframed parameter, then choose Average from the shortcut menu.
The track is averaged, and its curve is simplified in the Keyframe Editor.
For more information on using the Average parameter behavior, see Average.
Convert motion tracks to keyframes
Tracking data recorded or referenced by the Match Move, Stabilize, or Unstabilize behavior can be “baked” into keyframes on the transformed object. The tracking keyframes are applied to the tracked object, and the behavior is deleted. You can then modify the animation curves in the Keyframe Editor.
Because the Analyze Motion behavior does not transform the image, analyzed tracks cannot be converted into keyframes. However, a Match Move or Stabilize behavior that references data from an Analyze Motion behavior can be converted into keyframes.
Select the Match Move, Stabilize, or Unstabilize behavior to convert.
-
Choose Object > Convert to Keyframes (or press Command-K).
A dialog appears confirming the conversion.
-
Click Convert.
The behavior is converted into editable keyframes and the tracking behavior is deleted.
For more information on converting behaviors to keyframes, see Convert behaviors to keyframes. For more information on using the Keyframe Editor, see Keyframing overview.
Define look-ahead frames
When using the Analyze Motion behavior, you can direct a tracker where to look in a later frame for its reference pattern. This tool is ideal for the following types of clips:
Clips that contain fast-moving features
Clips with subjects moving in a relatively straight vector (with or without obstructions)
Clips with swish pans (you may need to reset the “look-ahead” tracker at each panning change)
Important: If your track fails and you reposition your tracker, you must also reset the look-ahead tracker in the Canvas to provide a new motion vector from the new reference point.
Apply an Analyze Motion behavior to a clip.
-
In the Canvas, position the tracker on a reference pattern.
In the following image, the tracker is positioned on a reference pattern on the front bumper of the car.
-
In the Behaviors Inspector, adjust the Look Ahead Frames slider to specify how many frames you want the tracker to look ahead.
Note: The maximum default for the Look Ahead Frames slider is 10 frames. However, you can enter a larger frame amount using the adjacent value slider.
-
While holding down the Command key, drag the tracker in the Canvas in the direction the reference pattern is moving in the clip.
As you Command-drag the track point, a magnified inset displays the frame specified in the Look Ahead Frames parameter.
-
When the look-ahead tracker is positioned on the reference pattern, release the mouse button.
When you click the Analyze button, the new reference point is used as the tracking pattern.
Note: Look Ahead Frames can be used when tracking in reverse. When the Reverse checkbox is selected in the tracking behavior’s parameters and you use the Look Ahead Frames parameter, you’re looking at previous frames rather than future frames. The Reverse checkbox is only available for the Analyze Motion, Track (in the Parameter behaviors category), and Track Points (in the Shape behaviors category) behaviors.
Manually coax a motion track using the Record button
For challenging tracks, you can manually insert track position keyframes to help guide the tracker toward a reference pattern. For example, if you have footage with significant motion blur or objects that partially obscure the tracking pattern, you can manually create tracker position keyframes to help guide the tracker.
Apply a Motion Tracking behavior to the clip, then press A to enable keyframe recording.
-
In the Canvas, position the tracker at the reference point you want to track.
A track position keyframe is created in the behavior (visible in the Keyframe Editor).
-
Navigate to the next frame where you want to create a keyframe.
Note: You can press Shift–Right Arrow key to jump forward ten frames, or press Shift–Left Arrow key to jump backward ten frames.
In the Canvas, position the tracker at the reference point you want to track.
Repeat steps 3 and 4 until you’ve completed the track.
In the Behaviors Inspector, click the disclosure triangle for the track you’ve manually adjusted, then choose Use Existing Keyframes from the Fail Behavior pop-up menu.
Press A again to turn off keyframe recording.
-
Go to the first frame of the clip, then click the Analyze button in the behavior HUD or Inspector.
Important: Even though keyframes are created, you must analyze the footage to obtain the tracking data.
Manually coax a motion track without enabling keyframe recording
Apply a Motion Tracking behavior to the clip.
In the Canvas, position the tracker at the reference point you want to track.
-
Choose Object > Add Position Keyframe.
This command is available for the Analyze Motion, Match Move, Stabilize (when you use manual trackers), Track Points, and Track behaviors.
Note: Keyframes cannot be created for automatically stabilized footage. Use the Track Region option for adjusting automatic stabilization, or convert the stabilized footage to keyframes. For more information on the Track Region parameter, see Stabilize a shaky clip. For more information on converting tracking data to keyframes, see “Convert tracks to keyframes” above.
Navigate to the next frame where you want to create a keyframe.
Repeat steps 2–4 until you’ve completed the track.
In the Behaviors Inspector, click the disclosure triangle for the track you’ve adjusted, then choose Use Existing Keyframes from the Fail Behavior pop-up menu.
-
Go to the first frame of the clip, then click the Analyze button in the Behaviors Inspector.
Note: You can also use the Tracker Preview in the Behaviors Inspector to reposition trackers in the Canvas.
Important: Even though keyframes are created, you must analyze the footage to obtain the tracking data.
Edit the analysis data
If none of the prior solutions helps, you can review the analysis data in the Keyframe Editor, then manually adjust or delete problem tracking point data.
Note: This technique is applicable only to trackers that you can adjust in the Canvas or Behaviors Inspector.
In the Layers list or Timeline, select an applied behavior.
In the Keyframe Editor, review the Confidence parameter for frames where the values are very low; if you see unusual spikes at the frames where the Confidence curve value is low, proceed to step 3.
-
Choose Object > Convert to Keyframes (or press Command-K).
A dialog appears confirming the conversion.
-
Click Confirm.
The behavior is converted into editable keyframes and the tracking behavior is deleted.
In the Layers list or Timeline, select the clip.
-
In the Keyframe Editor, modify or delete the points where the Confidence value is low.
For more information, see Add or delete keyframes or Modify keyframes.