Remove Dust Tool

 
 
 

Use the Remove Dust tool to remove dust, dirt, hair, and scratch artifacts from sequences of images. Dust removal, encompassing what is sometimes called dust-busting, dust repair, scratch removal and scratch repair, is traditionally a time-consuming task, requiring visual inspection and manual correction steps for each frame of film or video. This tool provides you with a means to automate this task as much as possible, and to easily tweak the results manually. The tool automatically detects dust and scratches, and automatically repairs them. You can view the results of the detection phase and easily correct anything using a simple mouse stroke.

The Remove Dust tool detects dust in images and removes the dust from the images. The tool has a primary color image input and outputs two images, the repaired color image and a mono-channel defect matte. An optional second input can be used to specify the defect matte as a mono-channel image, and any dust detected by the tool is added to the dust supplied by the defect matte. If the defect matte input is not present, the tool initializes the defect matte to empty. Optional third and fourth inputs supply forward and/or backward motion vectors to the tool which it can use for the detection and/or the correction phase.

Dust Removal Workflow

The dust removal workflow can be divided into three steps:

Global Detection and Repair

The Global Detection UI has the following parameter controls:

Use: To:
Calculate Motion calculate forward and backward motion vectors.
Quality control the quality of the motion vectors by applying the motion analysis only to lower-resolution versions of the input image, up to the resolution specified by the quality parameter.
Tolerance determine how many pixels are classified as dust. If the Tolerance is set to 0, then no dust is detected, effectively disabling the dust detection. If a dust channel from a film scanner is applied, the Tolerance can be set to 0 to avoid dust detection. Otherwise, the dust channel will be the union of the scanner matte and the detected matte. If the Tolerance is set to 100, then all pixels are dust. A value of 100 might be used with a shape to label all pixels within a small region as dust.
Size Tolerance control into which regions the dust is expanded. A value less than or equal to Tolerance means do not expand.
Size control how expanded the detected dust is expanded. A value of 0 means do not expand.
Detection Radius control the smoothing effect on the first step of dust detection where every pixel is assigned a likelihood of being dust.
Motion Threshold remove false dust in areas of motion, as its value is raised.

The Global Correction UI has the following parameter controls:

Use: To:
Repair Method select either the Temporal or Spatial repair method. The default method is temporal repair. This means to replace a dust pixel with the average of the corresponding pixels in the previous 2 and next 2 frames. If motion vectors are supplied on the 3rd or 4th input, they will be used to define the correspondence; otherwise, the corresponding pixel on another frame is just the pixel at the same position as the dust pixel. Spatial repair is used in areas where the motion vectors are incorrect or the previous and next frames do not contain the corresponding pixel needed (due to occlusion or intensity changes). In this case, the dust is filled using texture infilling and copies reasonable pixels from other places within the same frame. Note that there are no parameters for the Temporal repair method. When the Temporal repair method is selected, the Radius, Distance and Smoothing parameters will be grayed out.
Spatial Radius set how large a texture patch to use for matching areas around the dust.
Spatial Distance set how far to search from the dust to find a pixel to put in place of the dust.
Spatial Smoothing set how smooth to make the infilling of the dust.

Per-Shape Detection and Repair

Occasionally there will be parts of the image where some of the Global (automatic) parameters need to be changed locally to improve the dust detection and repair. For this, you can use a shape drawing facility based on the Garbage Mask tool. The UI is very similar to the Garbage Mask but does not have the mask list user settings or edge gradients, however all Garbage Mask hot keys affecting control points are the same—see Masking. The objects that are drawn are non-animated and appear only on one frame of the composition. You can select and edit the objects only by direct manipulation on the image wireframe overlays.

When in creation mode (either Rectangle, Ellipse, or Spline is selected) you can set the Detection and Correction values that will apply only within the shape to be drawn. When in selection mode (either Select or Transform), the UI looks the same as in creation mode, except that the values are for the currently selected shape. The two garbage can buttons provide deletion of selected shapes, and all shapes on the current time frame, respectively.

Each drawn shape has several values associated with it, the first 3 of which override the corresponding global (automatic) parameter in the area of the shape:

Use: To:
Tolerance override the global detection tolerance.
Size Tolerance override the global size tolerance.
Size override the global dust expansion amount.
Repair Method override the global repair method. The default is Temporal. You would only switch to Spatial Repair in areas where the motion is so complicated that the motion vectors are incorrect. Note that there are no parameters for the Temporal repair method. When Temporal repair method is selected, the Radius, Distance and Smoothing parameters will be grayed out.
Spatial Radius set how large a texture patch to use for matching areas around the dust.
Spatial Distance set how far to search from the dust to find a pixel to put in place of the dust.
Spatial Smoothing set how smooth to make the infilling of the dust.

(a) Tolerance and Size Tolerance raised to label more dust in this area.  (b) Tolerance and Size Tolerance of 100, to label the entire interior as dust.  (c) Tolerance and Size Tolerance of 0, to label the entire interior as not dust.  

Defect Matte Viewing

The defect matte is output on the second output, thus allowing the use of context points—see Setting Context Points to view the input defect matte and the defect matte after dust detection has been applied. You can get the second output node from the Utilities folder in the Tools tab.