- The "Blue Coat" clip

About this Tutorial

This tutorial will show you how to compute mattes. For best results we will use the mokey edge-tracking feature, which offers close control of the edge of foreground objects whilst tracking them, greatly simplifying the task of matte extraction. As usual the first step is to replace the foreground object with the background behind it. This is then used as a clean plate for matte extraction, a process akin to difference matting. We will also show how mattes can also be extracted using the Flood Fill feature when the clean plate cannot be produced in the normal way.

mokey's tracker operates on planar scene objects, so if you are tracking an object that is not a flat surface, it's important to sub-divide the object into roughly planar elements. The exception to this rule is when the camera motion is a pure pan. With pure camera pan you can select the whole background as one selection, but you will probably have to select the Perspective tracking model to track the motion correctly.

Loading

When loading the clip use the following mask settings: Left 3, Right 3, and Bottom 1. This will avoid the black borders in the image affecting the background tracking. Use a frame Offset of 1.

Selections

Play back the clip. Create two background selections: Hills and Ground. These are roughly planar layers in the scene, and move in different ways.

Extend the background selections beyond the left edge of the frame, because the motion over the clip will pull the background selections to the right. This can also be fixed afterwards by editing the contours with the Actions affect all frames linking tool.

Build the Hills selection, then the Ground selection, attaching it to the lower two points of the Hills. This constrains the two selections together (can be fixed up afterwards if necessary with Attach Selections tool).

Convert both selections to linear polygonal contours by dragging one of the weight control points on each selection outwards.

Draw the Man selection quite close to the edge, 3-4 pixels away. This is required if we want to use the edge tracker. We are going to use the edge tracker to help create a matte. If we were merely trying to remove him we would make the selection a lot looser.

bluecoat_1

Image 18 - Tracking the man with EdgeTrack

Tracking

Set the Motion Model for both background selections to "Perspective", because of the perspective distortion across the clip. If this is not done then the background tracking will be inaccurate (try it and you will see that the selections to not follow the actual motion in the images).

Switch on EdgeTrack for the Man selection to track the non-rigid motion. This will display a dashed contour, indicating the inner limit of the tracked edge region.

Zoom in on the Man selection to make it easier to edit the contour. Track a frame at a time. You may need to adjust one or more points on the Man selection in each frame. Make sure the control points are positioned in a consistent way across the tracked frames, and stay close to the edge of the man. Add points as necessary. e.g. around the ears of the man as they become visible (press "i" or the Insert key to switch on contour point insertion). Note that the background trackers follow the perspective distortion. At the end of the clip the horizontal boundaries of the background selections will diverge much more than at the beginning.

Removal

Remove the Man selection. You will need to switch on Flood Fill to remove him completely from the first few frames. The pixels near the bottom are not available in the Ground background selection in any frame.

bluecoat_2

Image 19 - Frame 1 after removal

bluecoat_3

Image 20 - Frame 15 after removal

Mattes

Pull mattes for the whole clip. The results for the early frames should be quite good. In later frames there will be holes because the colour of parts of the Man and background selections are very similar, which gives rise to these pixels being incorrectly labelled as background pixels.

bluecoat_4

Image 21 - In frame 15 the matte has some holes

Switch on usage of Edge Width and set the edge width to the minimum value such that the edge of the Man is between the inner dashed contour and the outer contour (e.g. 6 pixels). Pull the mattes again. This will remove the large holes in the mattes.

bluecoat_5

Image 22 - Frame 15, using the Edge Width to remove the holes

Now you can see what you would do if you wanted to pull mattes but were not able to produce a clean plate. To simulate this situation, go to the first frame, select the Man, go to the Remove tab, set the Reference Range to 1 - 1, make sure Flood Fill is switched on, and remove the man. This will produce a smooth but not accurate fill of the Man selection without attempting to take any background pixels from other frames.

bluecoat_6

Image 23 - Flood Fill was used to remove object in frame 1

Now pull a matte. This will probably produce a noisier result, because where the flood fill is different from the original pixels the pixels will be incorrectly labelled as foreground (i.e. belonging to the man).

bluecoat_7

Image 24 - Matte for frame 1 based on Flood Fill removal result

Events

Customers

Quotes