The O_ColourMatcher node enables you match the colours of one view with those of another. It has been specifically designed to deal with the subtle colour differences that are sometimes present between stereo views.
Connection Type |
Connection Name |
Function |
Input |
Source |
A stereo pair of images. If disparity channels and occlusion masks are not embedded in the images and you are using the Local Matching mode, you need to add an O_Solver, an O_DisparityGenerator, and an O_OcclusionDetector node after the image sequence. |
Mask |
An optional mask that determines where to take the colour distribution from. For example, if you have a clip showing a person in front of a green screen, you might want to use a mask to exclude the green area so the node concentrates on matching the person. In the Basic mode, O_ColourMatcher calculates the transform on the masked area of the source view but applies it to the whole of the view it's correcting. In the Local Matching mode, it calculates the transform on the masked area and applies it to that area only. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
O_ColourMatcher Tab |
|||
Local GPU |
gpuName |
N/A |
Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when: • Use CPU is selected as the GPU Device in the Preferences. • no suitable GPU was found on your system. • it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU. You can select a different GPU Device, if available, by navigating to the Preferences and selecting an alternative from the GPU Device dropdown. NOTE: Selecting a different GPU requires you to restart Nuke before the change takes effect. |
Use GPU if available |
useGPUIfAvailable |
enabled |
When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU. The output between the GPU and CPU is identical, but using the GPU can significantly improve processing performance. NOTE: Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine which does have a GPU available. The GPU processing also requires certain NVIDIA GPUs and CUDA drivers. For more information on the minimum requirements, please refer to the Nuke Release Notes available in Help > Release Notes. |
Views to Use |
viewPair |
Dependent on source |
Sets the two views whose colours you want to match. These views will be mapped for the left and right eye. |
Match |
matchWhat |
Left to Right |
Sets how to match the colours between views: • Left to Right - adjust the colours of the left view to match with those of the right. • Right to Left - adjust the colours of the right view to match with those of the left. |
Mode |
matchingMode |
Local Matching |
Sets the algorithm to use for the colour matching: • Basic - This mode takes the colour distribution of one entire view and modifies that to match the distribution of the other view. • Local Matching - This mode first divides the two images into square blocks according to the Block Size control. Then, it matches the colour distribution from the view that want to modify to a reconstructed version of the same view, which has been constructed using the pixels of the source view. This can be useful if there are local colour differences between the views, such as highlights that are brighter in one view than the other. NOTE: Both modes require an O_DisparityGenerator node and an O_OcclusionDetector node upstream of the O_ColourMatcher node. |
Mask |
maskWith |
None |
Sets the channel to use as a mask when calculating the colour transformation: • None - none of the footage is ignored. • Source Alpha - use the alpha channel of the source clip to define which areas to ignore. • Source Inverted Alpha - use the inverted alpha channel of the source clip to define which areas to ignore. • Mask Luminance - use the luminance of the Mask input to define which areas to ignore. • Mask Inverted Luminance - use the inverted luminance of the Mask input to define which areas to ignore. • Mask Alpha - use the Mask input alpha channel to define which areas to ignore. • Mask Inverted Alpha - use the inverted Mask input alpha channel to define which areas to ignore. |
Local Matching |
|||
Preview color correction |
previewCorrection |
disabled |
When enabled, a difference overlay previews the areas of colour correction applied to the original image. |
Block Size |
blockSize |
5 |
Defines the width and height (in pixels) of the square blocks that the images are divided into when calculating the colour match. You can set different block sizes for each view. |
Scale |
correctionScale |
0.5 |
Sets the image scale for local colour matching. You can increase the Scale to broaden the colour update and preserve the image structure, helping to prevent image shift and wobble. Decrease the Scale to pick up highlights and detailed colour changes. |
Limit |
correctionLimit |
1 |
Sets a limit on local colour matching against the average correction in a region. If you notice excessive colour changes in areas of highlight, try reducing the Limit. |
Noise |
noiseLevel |
0.25 |
Sets how much noise to retain from the original image. If the colour matching smooths the input noise, increase the Noise value. If the value is too high, colour differences at very fine details are retained. |
Occlusions |
|||
Output corrected area to alpha |
outputOcclusions |
disabled |
When enabled, output the corrected area to the alpha channel. The corrected area can consist of the occlusion mask and the disparity edge mask set using the Adjust Edges control, depending on what the Correction control is set to (Occlusions, Occlusionsand Edges, or None). |
Correction |
occlusionCorrection |
Occlusions |
Defines which areas receive the colour correction when local colour matching is not valid: • Occlusions - fill occluded pixels only, where colour is missing from the other view. • Occlusions and Edges - fill occluded pixels, where colour is missing from the other view, and compensate for disparity changes at edges where matching and/or reconstruction can fail. • None - apply no occlusion or edge correction. |
Adjust Edges |
adjustEdges |
0 |
Sets the threshold for treating image edges as occlusions to reduce haloing and edge flicker. The higher the value, the more image edges are considered occlusions even if they are not marked as such in the upstream occlusion mask. |
Colour Tolerence |
colourTolerance |
0.1 |
Sets the amount of blurring across edges in the colour match at occluded regions. Decrease this to restrict the colour correction in occluded regions to similar colours. Increase the value to blur the colour correction. |
Support Size |
supportSize |
20 |
Sets the size of the region (in pixels) of unoccluded pixels used to calculate the colour correction at an occluded pixel. O_ColourMatcher first finds the closest unoccluded pixel and then expands that distance by this number of pixels to determine the amount of unoccluded pixels to use. |
Stabilise Occlusion |
stabiliseOcclusions |
enabled |
When enabled, flicker can be reduced in occluded areas by using data from multiple frames. |