OcclusionDetector
Description
O_OcclusionDetector generates a mask for the occluded regions in each view. Occluded regions are pixels that are visible in one view but not the other.
The left view of a stereo image. |
The occlusion mask generated |
An occlusion mask identifies areas that cannot be rebuilt as some of the pixels in one view are not visible in the other. You can use it to quality check the result of O_DisparityGenerator and to identify image regions that are likely to fail when using the Ocula nodes that rely on rebuilding one view from the other. If the pixel information isn’t there in one view, it cannot be generated for the other. After you have identified the areas which are not suitable for picture building, you can choose how to handle these in order to get the best possible result.
You may want to generate an occlusion mask for each view when using the following nodes:
This node requires an occlusion mask upstream to produce its output. |
|
This node requires an occlusion mask upstream to produce its output. |
|
This node does NOT require an occlusion mask, but you can use one downstream to quality check the generated disparity map. |
|
This node requires an occlusion mask upstream to produce its output. |
|
This node requires an occlusion mask upstream to produce its output. |
|
This node does NOT require an occlusion mask to produce its output, but you can use one upstream to preview where they may struggle to generate a new view. |
The final occlusion masks for each view are stored in the mask_occlusion channel. You can view them in Nuke by setting the alpha channel menu to mask_occlusion.alpha and pressing M on the keyboard with the Viewer selected. This superimposes the occlusion mask for the current view as a red overlay on top of the image’s RGB channels as shown below.
An occlusion mask displayed on top of the color channels. |
After you have generated an occlusion mask, you can use a Write node to render the mask into the channels of your stereo .exr file along with the color and disparity channels. When you use the same image sequence at a different time, the occlusion mask is loaded into Nuke along with the sequence.
The O_OcclusionDetector requires upstream disparity channels to produce its output. For an in-depth explanation of how to create disparity channels, see DisparityGenerator.