2.5 Fixing Film Dirt

22 Jun, 2017 | PFCLEAN, TUTORIALS

In our previous extended study material for the Level 2 PFClean training (2.4 Fixing Faded and Colour Shifted Film) we were looking at tackling colour shifts and fade in film.

Both the chanti shots were suffering from green colour shift and slight loss of contrast. We used the Workbench’s Colour Balance effect to fix these problems.  Having balanced the clip so that the colours and contrast now appear natural we can see it has revealed a lot of striations and dirt in the clips. In this extended study we are going to be looking at tackling the dirt using the Auto Dirt Fix effect in the Workbench.

If you haven’t completed the previous 2.1, 2.2, 2.3 and 2.4 tutorials, I would suggest going back and starting from there as we will be using some of the material and profiles we generated.  

NOTE: To follow along in this tutorial, you will need access to the clips provided for the class. If you don’t have them to hand, below you will find the link to download the footage again.

Contents

01. Adding The Auto Dirt Effect

02. Motion Analysis

03. Detection

– Contrast

– Sample

– Size

– Motion

– Channels

04. Fix

– Spacial and Temporal

– Dilation Size

– Blend Radius

– Channels

05. Reviewing the Results

06. Using the Q/A Panel

07. Auto Dirt Fix Preset

Tutorial Footage

The footage used in the training.

Footage: PFClean_footage_level_02.zip

Download

01. Adding the Auto Dirt Effect

Let’s start where we left off on the previous extended study 2.4 which was CHANTI_SHOT_001 where we had used the Colour Balance preset we had generated.  From here go to CHANTI_SHOT_003 either by clicking on the clip in the Worklist or the forward arrow at the top left of the GUI.

Playing through the clip we can see a large amount of dirt over the entire duration of the clip.  Removing this dirt using a manual tool such as Paint or Manual Dirt / Dust Fix whilst giving a great result would take a very long time?. In this tutorial e are going to be using a powerful effect which will speed this process up.

Let’s add the Auto Dirt Fix to the effects stack.  To do this we click the + button to the left of the GUI and under the Repair Operations we will select Auto Dirt Fix. As soon as the effect is added to the stack it will immediately begin repairing the current frame we are on.

As we can see it has removed a lot of the artefacts in the frame but not all, this is where we will begin to adjust the parameters to refine our results.

To see what the Auto Dirt effect has picked up as dirt we can click the View button to highlight the areas that have been fixed in this frame. Using the middle and right mouse button let’s  zoom and pan onto an area that has been fixed. Then click View again to inspect the fix.

02. Motion Analysis

editAutoDirtMotion

Let’s begin by looking at the first panel on the left hand side called Motion Analysis. The motion analysis box contains parameters that affect the accuracy and speed of the motion analysis required for dirt detection or temporal cleanup. The default will be set to low but as there is a fair amount of movement in the foreground we are going to select Normal from the drop down box.

The Lookahead parameter controls the number of frames to search behind and in front of the current frame when detecting and fixing dirt pixels. We are going to leave this at its default position.

The Smoothness parameter allows the overall smoothness of the motion field to be controlled. Increasing this value will mean that smoother motion fields are generated, possibly at the expense of decreased accuracy around edges of moving objects. In this instance we will leave this at its default position.

03. Detection

The Detection and Fix boxes contain the parameters that are used to detect and fix dirt areas respectively.

editAutoDirtParams

The first option in the Detection panel allows us to tell the effect whether we are looking for Light dirt or Dark Dirt or even both in the clip. In our case we are just looking for light dirt so we can leave this in its default position.

Contrast

The Min. Contrast (%) value specifies how different dirt areas need to look from their environment. The lower the minimum contrast value, the more sensitive the defect detection becomes. You can change the value by either typing the desired value into the text box, or clicking inside the box and dragging with the left or middle mouse button. With the View button selected let’s reduce the Min Contrast (%) to 2.00.

Sample

You could also sample a piece of dirt to have PFClean determine a suitable Min. Contrast value. De-select View, then click the Sample button and draw a rectangle around the defect you want to sample. The Min. Contrast (%) value updates and the sampled dirt is fixed automatically.

Size

The Size parameters specify the minimum and maximum number of pixels a piece of dirt can contain. By default, the minimum size is 10 pixels (at 2K image resolution), and the maximum size edit box is empty, which means there is no upper limit in place. We have dirt in our clip which is smaller than the default 10 pixels in size so we are going to adjust this to 2.

Motion

The Motion parameters (Min/Max) restrict cleanup to parts of the image which undergo a range of motion. The minimum and maximum motion edit boxes function in a similar way to the minimum and maximum size parameters. Clearing a value from an edit box will remove that constraint, so setting the minimum motion to 10 and clearing the maximum motion box will mean only pieces of dirt that move at least 10 pixels between frames will be cleaned.  We will be leaving Motion at its default with no constraint set.

Channels

In some cases, you may get better results by detecting dirt in fewer channels but fixing in all channels, you can do this by deselecting one or more of the channels. For example, if there is a significant amount of blue emulsion marks in the clip you could choose to auto detect in just the blue channel where the contrast will be greater.  For our clip we are going to leave this at it’s default detecting in all three.  Do experiment though with the View button enabled and see what effect it has on the clip.

04. Fix

Spatial and Temporal

The parameters in the Fix section define how the Auto Dirt Fix effect fixes the areas that have been identified as dirt. The Type parameter defines whether dirt areas should be fixed spatially, that is by using neighbouring pixels to fill the area, or temporally, using motion compensated information from neighbouring frames. By default, small areas are fixed spatially and larger areas are fixed temporally. The Threshold parameter defines up to which size spatial fixes will be applied. If you de-select the Spa. button, all areas will be fixed temporally. Accordingly, all areas will be fixed spatially, if the Temp. button is de-selected. De-select the Temp. button to see what a spatial fix of this dirt area would look like.

Dilation Size

The Dilation Size parameter refers to the number of pixels each dirt area will be expanded horizontally and vertically by before fixing. This can be used to increase the size of each dirt area slightly and improve the quality of the fix. We are going to set this box to 0 for our clip which will not dilate the fixes at all.

Blend Radius

The Blend Radius parameter allows detected dirt areas to be expanded and blended with the background image after cleaning, reducing visible artifacts around the edges of each area.  For our clip we are going to leave the Blend Radius at 0.

Channels

Much like the channels parameters in the Detection panel, the channel controls in the Fix panel control which channels you would like to be fixed. For example if working with three strip material that only has damage on one of the channels you can choose to fix that without affecting the other two.

The Grain/Noise Preset menu allows a grain preset to be selected to render grain or noise over the top of each fix. Rendering grain over the top of a fix will often improve overall appearance. We generated some grain presets in an earlier extended study tutorial so let’s go ahead choose one of the profiles we generated, in my case I am going to select chanti_m2.

You can find more information about these and all the other parameters in the Auto Dirt Fix manual, which will open in your web browser when you click the help-effect button.

05. Reviewing the Results

Click the full_res_pfclean button to view the clip at full resolution or select any other zoom level of your choice, then click the Playblast playblast button to review the fixes. Once the clip has been cached, you can use the A/B button for a before/after comparison in the Cinema. Drag the red box at the centre to move the dividing line, or drag it anywhere to rotate. Turn off the A/B split and click the Playblast button again to return to the effect.

As you can see it has made quite an improvement removing at least 70% of the dirt from the clip, there are some striations left over but these can be removed easily using the Manual Dirt/Dust Fix tool later on.

06. Using the Q/A Panel

In case your parameters produce false positives, you can easily delete the unwanted fixes in the Q/A panel. Click the Q/A button to open the panel. Click View to highlight all the fixes in the current frame. You can remove a fix by simply drawing a rectangle around it in the Cinema. Other options are drawing an Ellipse, a freehand Lasso, or painting with a Brush. Select Area and click on a dirt area, to remove the fix. If, after removing a fix you decide that you want to keep the fix, you can delete the undo-area for that fix. Select the undo-area you want to delete, thenclick and confirm the Del button. Click the Q/A button again to return to the effect.

07. Auto Dirt Fix Preset

You can store the current parameters of the Auto Dirt Fix effect in an preset. This is really useful if you are working on a project that is displaying many similar artefacts.

In the Auto Dirt Fix tool we are going to click Store in the Presets panel on the right to create a new preset. Let’s edit the text edit box just underneath the thumbnail that has just been generated and call it chanti_dirt.

dirt_preset

Next let’s click the < button next to the clip thumbnail on the top left to jump to the second clip CHANTI_SHOT_001. Let’s create an Auto Dirt Fix effect for the second clip, select the preset and click Recall. Both clips now have the Auto Dirt Fix effect with the same preferences applied.

In our next tutorial we will be looking at a powerful combination, the Auto Dirt effect and an Infrared defect map.

Related Posts

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Share This

Share This Post On: