Unity silhouette from depth

Dear community,
I am doing an assessment for a project. I would like to know if the scenario is doable in Unity using the Stereolab’s plugin and the ZED2 camera.
I need to create a “silhouette” using the depth image - it’s basically a mask of everything that is closer to camera than specified distance threshold. For example in the mask should be everything closer than 3 meters. Then from this image I’d like to remove floor, walls (remove past 2 meters to each side of the camera) and ceiling (remove above 2,5 meters). Can I use SDK’s plane detection for this?
Is there any example I could build on?
Thank you!

KR, Tomas

Hi Tomas,

If I had to do something similar, I’d work on the point cloud directly. There is a sample level that retrieves and displays the point cloud in Unity (https://www.stereolabs.com/docs/unity/samples#point-cloud).

Then, you can clamp the point cloud based on the distance to the camera, as well as the height of the points, to remove the floor.

Best,

Stereolabs Support