I've been working on a project using the depth map occlusion offered by SRWorks and am relatively happy with the possibilities offered by the SDK. The depth map does have quite a bit of noise in it, presumably due to the limited resolution of the cameras. Enabling refinement improves the image, but I there are still some artifacts present.
For my project I only need to differentiate between two regions: close and far. Everything that is beyond the far occlusion distance should be culled. Since I only need such a simplified depth map, I thought about using OpenCV to process the map to my requirements. Unfortunately, I ran into trouble trying to convert my OpenCV mat back into the Rfloat texture format seemingly required by the material/shader. SetPixels only works for limited formats, so I'm at a loss for how to turn my mat back into a Rfloat.
Is there a way to either configure the refinement process used by SRWorks, or implement additional processing using OpenCV to apply connected component analysis or similar?
Attached is a screenshot of the current depth map with occlusion visualised. Ideally, I would like to refine the map so that the small islands disappear.