Region of Interest Implementation in Python

I am looking to place a region of interest mask to filter out a particular shape such that depth detection won’t occur for anything outside of the shape.

I went looking through the documentation, but I am having trouble following the example, particularly creating the SL.mat object to match my dimensions. Is there an example available showing the creation of such an ROI zone in Python?

Below is an approximation of the shape I want to create, anything in black will not be detected, only the light zone.

Hello @GreenMachine,

Would loading your mask as an image work for you?
You could use the combo to load the file and set_region_of_interest to actually apply this Mat.

I don’t think we have a Python sample doing that, but the C++ sample shows an implementation of the manual, manual way (tracing a polygon over the screen). It could help, but it’s C++, sorry.