SDK 3.8.1 ROI in python

Hi everyone,

I’m trying to get the new ROI feature running from SDK but am not sure if I’m reading the C++ code correctly since I’m trying to adapt the sample to python. I’m trying to read out a mask png file using

roi_data = cv.imread(roi_file)

and would then probably go on with

zed.set_camera_settings_roi()

I get the feedback

Parameter ‘Rect_roi’ unfilled
Parameter ‘settings’ unfilled

So currently I’m not sure, which parameters I need to set here besides of the mask array? Is there gonna be an update to the API reference soon?

Hello and thank you for reaching out to us,
You should probably use the function set_region_of_interest from here => Camera Class Reference | API Reference | Stereolabs
The Mask array is a sl.Mat.

Antoine

2 Likes

Hi Antoine,

seems like my problem has to do with the Python API which I wasn’t able to get working correctly yet. Will need to figure that out first, I guess.

We currently have an issue with the python api, which installs badly on windows. We’ll release a 3.8.2 soon to fix that.
In the meantime, you can use the solution from here : Can't install get_python_api.py - #8 by Dan

1 Like

Thanks, yes, I managed to figure out that solution and got the ROI working now.