- The "ING" clip

About this Tutorial

Now to some wire removal work! In this tutorial we will show you how mokey was used to remove the wires in this commercial for ING. It was produced by CCCP.be and finished at Condor Post Production in Brussels. We will remove the left wire and let you have a go at the right wire yourself!

Loading

When loading the clip, mask out the black borders of the clip using the following Mask settings: Left 2, Right 3, and Bottom 2.

Selections and Tracking

For this shot it is important to remember that the mokey tracker is a 2D plane tracker - not a 3D tracker and not a 2D point tracker!

So whatever we track needs to be a roughly planar surface in the scene - if we want it to be tracked accurately. Accurate tracking of the background is important if we are aiming to removing an object in front of it, as it is the motion information for the background that is used to reconstruct it by finding 'missing pixels' in other frames.

So in this shot we need to select multiple background planes: One for the building in the background and one for the wall immediately behind the boy.

ing_1

Image 8 - Selection made of background in the first frame

We then also immediately add a selection for the wire.

We now start tracking the selections. It is worth doing this a frame at a time for the first few frames just to make sure everything behaves as expected. It is important to note that the selections are completely independent from the tracking data in the sense that moving the selections manually does not affect the tracking data - the selections are purely there to define the garbage matte that tells the tracker what pixels to track. You can therefore stop the tracker and modify the selections at any time.

This becomes necessary on frame 4 - the tracker does not correctly track the wire, so we will manually reposition the selection to make sure it covers the wire.

ing_2

Image 9 - If tracking of foreground objects, such as thin wires, fails, then simply repositioned the selection manually such that it covers the wire

In frame 11 the head of the boy starts moving into the area selected as background - it is important to deal with this as the tracker otherwise will think that the head is part of the background and let the movement of the head influence the tracking of the background area. This would lead to artefacts in the removal, as the head is moving very differently to the background. So here we have two choices: Either we make the background selection smaller such that it does not include the head, or we add a selection for the boy, which will effectively act as a mask and ensure that the boy is treated as a separate layer.

ing_3

Image 10 - Selection added for the boy to mask him off. Otherwise the tracker would not track the background accurately when the head moves over the background

To show what effect this has, let's just have a quick look at the garbage matte for the selection of the wall in frame 13. You see that the mask for the boy has been subtracted from the background layer, such that mokey correctly disregards this area as it moves across the background.

ing_4

Image 11 - The garbage matte for the lower background selection in frame 13. Notice how selections on top of the selection subtract from the garbage matte of the selection

Whilst we are tracking we are also keeping an eye on the selections to make sure that they follow the layer they are tracking. If e.g. the wire slips outside its selection, we will reposition the selection. Also, at frame 20 you might suddenly realise that the selection of the wall in the background as slipped down slightly. This could be due to there not being a high contrast edge at the top of the area being tracked - if you made the selection a pixel or two under the edge of the wall. So let's go back to where this starts happening, say frame 10, extend the selection slightly upward and the re-track that selection. The re-tracking is done by selecting the selection to be re-tracked, then selecting Selected in the trackers Layers To Track group and then tracking the selection through the range of frames that you wish to re-track. Note that you can use the in- and outpoint to stop the tracker when it reaches a certain frame.

As the boy's head turns in frame 18-20 we also reposition the selection of the boy to ensure he remains within the area defined by the selection.

We will stop at frame 22, as the rest is more of the same! So now let's remove that wire…

Removal

Select the wire selection and go to the Remove tab. Click the Remove This button (the one with the arrow pointing downwards!) Now you might either see a perfectly replaced area where the wire originally was or have some artefacts - let's have a look at what they could be:

  1. Bits of the original wire left in the frame. This could either be because the background behind the wire was not visible anywhere in the tracked frames or you not having defined a background behind the part of the wire left in the shot. To solve the first problem you should either track more frames or, if this doesn't solve the problem, consider switching on Flood Fill or painting and importing one or more clean plates.
  2. Different bits of wires appear in the area replaced. This could happen if in another frame the wire has slipped outside the selection, as the pixels that are outside the wire then will be treated as belonging to the background and 'copied' into the other frames. So make sure the wire is masked correctly in all frames!
  3. All or part of the area replaced is darker or brighter than the area around it - this happens if the brightness of the background area changes over time. Use the Illumination Model setting to compensate for these changes. In this example it is necessary to use the Linear model to get the best result.
  4. The pixels replaced do not align with the pixels outside the area being replaced. This would happen if the background area were not tracked properly. The best way to evaluate the tracking is to stabilize the region tracked - if the result is a completely stabilized area the tracking data is solid and should give a good replacement. If there is drift or jitter the background selection should be re-tracked. Re-tracking the background a second time often helps, as the tracker now is aware of layers obscuring the background layers and can ignore these on the re-track.

ing_5

Image 12 - If some of the background has not yet been seen in the shot, part the foreground object may be left in the frame. Try using Flood Fill if the background is a uniform color

ing_6

Image 13 - If a piece of a foreground object from another frame appears it is most likely because the object was not masked properly in the other frames

ing_7

Image 14 - If there are small differences in lighting between the frames, Illumination Modeling should be switched on to avoid artifacts like this

ing_8

Image 15 - If the background was not tracked properly, misalignments like this may occur. Try re-tracking the background with a higher Min % Pixels setting

Depending how accurately you made your selections there may still be small stubs of wire left in the shot. You will encounter situation where it is not cost effective to finish the job entirely in mokey - experience will teach you when you should stop using mokey and fire up your paint program. There are no hard rules, but we do have a few tips:

Customers

Quotes