Hard cases

Suppose you have followed the mask creation guidelines (see Good masks & bad masks) and chosen "reasonable" tracking settings (see How PatchMaker works?) but the patching quality is still not perfect. Check up if one or more of the items below apply to the clip you work with:

  1. The object moves fast. First, make sure the Estimation method is not set to Fastest. "Fast motion" in PatchMaker is a motion such that the frame-to-frame displacement of at least one object point exceeds 15 pixels — this is the default value of the Matching radius parameter. Increase the value of this parameter (it will slow down tracking). Just in case, increase the Max motion change as well.

  2. The picture is jerky. If the clip is shot with a hand-held camera or from a car, chaotic jerks may be added to the regular object motion. Make sure the Estimation method is set to Normal or even Intensive. Increase the value of the Max motion change parameter. This also applies to a footage the original frame rate of which was altered by replicating some frames.

  3. Low-contrast or noisy object image. Suppose the region to be tracked is deficient in color and luminosity gradients but, for some specific reason, this is exactly where your mask has to be created. Try using a coarser motion model by adjusting the Motion model parameter first from Affine to Rigid & Scale, then to Rigid, and finally, to Translation. One of them might work even with a "poor" image and the overlay will "stick" acceptably.

  4. Projective distortions. The tracked region in the scene undergos projective transformations and PatchMaker fails to track them accurately because it does not support the projective motion model. Projective transformations arise in motion of objects with strong perspective "distortions". That is when two lines parallel in the 3D scene are not at all parallel in the image (see figure below), and their angle varies from frame to frame.

  1. Foreign object inside the mask. Take care not to include in your mask a foreign object that moves differently than the object you are going to track. Suppose you are to track the motion of the "Toyota" billboard as shown below. The mask you have drawn covers a foreign object — a racing car in the background. Because the car motion is very much different from that of the billboard, the tracking result may be of poor quality.

  1. Changes in luminosity over time. Check up if the luminosity of the masked surface changes from frame to frame. Because a camera with an automatic exposure adjusts to the overall scene illumination, the absolute luminosity of a particular surface may vary significantly. This could be critical to the tracking algorithms as they compare images from consecutive frames. The farther the two frames are in time, the more likely the algorithm is to produce poor results under luminosity change. If this is the case, try decreasing the Reference frame pitch parameter value.

  2. The mask diminishes too much while following the object. For stable motion tracking, you need a mask that is not too small. Create a new segment with a larger mask for the range of frames where the tracking quality.

  3. If nothing else helps, try tracking with the Estimation method parameter set to Intensivе.