- The "Coffee" clip
About this Tutorial
This tutorial will show you how to
- Repair large holes and scratches and other defects in specific frames by replacing them with the correct regions in other frames.
- Stabilize the repaired frames to remove jumps between frames, without leaving any blank borders around the image.
Look at frames 12 and 13, which have large cuts in the frame causing the whole of the lower left corner of the frame to be misaligned relative to the rest of the frame. The frames themselves are misaligned with the surrounding frames. We need to restore the corners of the frames around the cuts, and realign all the frames using the stabilizer. Thus we will use the mokey object removal module to repair the defects, and feed the repaired images to the mokey stabilization module.
Loading
When you load this clip, set the frame Offset to 1. Set the Mask settings to: Left 28 pixels, Top 1 pixel, and Bottom 1 pixel. This will prevent the black borders from affecting the mokey tracker.
Selections, Tracking and Removal
Select the whole of the first frame for the background. We shall add the selections for the defects as we go along.

Image 43 - Background selection in frame 1
Increase the Min % Pixels Used to 25% for the background selection to reduce the possibility of tracking error. Track the background selection until frame 11. In frame 11, adjust the background selection so that it doesn't include the cut region in the bottom left corner of frame 12. This will ensure that the tracking into frame 12 is not affected by the defect.

Image 44 - Adjusted background selection in frame 1
Now track the background into frame 12. Readjust the background
to include the bottom left corner again (this can be done in frame
11 with the Link All contour editing tool
to adjust the
contour in frames 11 and 12 simultaneously). Select the bottom
corner in frame 12, including the cut region, as a foreground
object to be replaced. Label it Cut 1. Add selections for the dark
horizontal line defects near the top and bottom of the image.

Image 45 - Selections in frame 12
Now select the foreground Cut 1 selection and remove it. This will take the corresponding pixels in the background in frame 11, apply background motion compensation and fill the selected region with background. Repeat for the line selections. This should clean up the major image defects:

Image 46 - Restored frame 12
Frame 13 has a similar cut in the top right corner. So adjust the background selection in frame 12 to remove this region as before and track the Background selection into frame 13 (select it and use Track Selected). Adjust the background again in frames 12 and 13 to cover the whole frame. Make a selection for the cut region including the corner, and call this Cut 2. Remove the defect in frame 13. This will take the background pixels from frame 12.

Image 47 - Restored frame 13
Now continue tracking the background selection to the end of the clip. Next make new selections for and remove any remaining defects, for instance the dark line on frame 10 and the smudge on frame 25.
Stabilization
Now we can stabilize the clip to remove the jumps between the frames. Click on the Stabilize tab, select Painted as the input clip, and select the background as the selection to stabilize. Best results will probably be obtained by specifying to smooth All Motion, i.e. remove all the apparent background motion. Selecting Auto Fill will fill the borders of the image as far as possible, which would otherwise be blanked off by the motion compensation. The result will be a restored and stabilized clip.
|
Image 48 - Frame 1 |
Image 49 - Frame 12 |
Image 50 - Frame 26 |






