stereolabs / zed-opencv

ZED SDK interface sample for OpenCV
https://www.stereolabs.com/docs/opencv/
MIT License
139 stars 79 forks source link

Camera bugs out on run. slMat2cvMat is in wrong place. #90

Closed SegunAwe05 closed 2 years ago

SegunAwe05 commented 2 years ago

Preliminary Checks

Description

when you cv::Mat img = slMat2cvMat that should be inside the while loop. I had a problem where If it is outside the while loop it causes your imshow image to glitch out very bad when you run. This tutorial tells us to put it outside the while loop

Steps to Reproduce

1.Follow the this tutorial 2. 3. ...

Expected Result

Clear camera images

Actual Result

Glitchy camera images

ZED Camera model

ZED Mini

Environment

OS Ubuntu
Zed mini 3.5
Jetson Nano

Anything else?

No response

P-yver commented 2 years ago

Hi, In this sample, the function is call outside the main loop but the corresponding memory depth_image_zed is already allocated. If your source sl::Mat is not allocated, or has changed (type, size, mem) the corresponding cv::Mat reference is outdated.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days