Basic Color Matching
C_StereoColourMatcher has two different modes you can use to perform a color match: Basic mode and Local Matching mode. Basic matching may be sufficient for some stereo sequences, but Local Matching gives you more control:
• Basic - takes the color distribution of one entire view and modifies it to match the distribution of the other view.
• Local Matching - divides the two images into square blocks according to the Block Size control. Then, it matches the color distribution from the view that want to modify to a reconstructed version of the same view, which has been constructed using the pixels and occlusions from the source view.
To perform a color match:
1. | If disparity vectors don’t yet exist in the script, insert a C_DisparityGenerator node to calculate the disparity vectors. See Generating Disparity Vectors for more information. |
2. | Add a C_StereoColourMatcher node downstream of the C_DisparityGenerator. |
3. | Connect a Viewer to the C_StereoColourMatcher node. In the C_StereoColourMatcher controls, select the two views you want to use under Left View and Right View. The two views you select are mapped for the left and right eye. |
4. | Select either Left to Right or Right to Left using the Match dropdown, depending on which view you want to use as the source. |
5. | Select the color matching Mode to use. |
6. | If there are areas in the image that you want to ignore when matching color, supply a mask either in the Mask input or the alpha of the Source input. In the C_StereoColourMatcher controls, set Mask to the component you want to use as the mask. |
Note: Masks should exist in both views, and C_StereoColourMatcher treats the alpha values of 1 as foreground and blurs to the 0 value using nearby disparity to recreate object boundaries, rather than image data. When you create a mask using Roto or RotoPaint, you can use the feather control to extend the calculation.
If you selected Basic mode, the color correction is completed automatically. If you selected Local Matching, proceed to Local Color Matching.