zed-sdk
zed-sdk copied to clipboard
how to convert cv2.Mat to sl.Mat in Python Code ?
Preliminary Checks
- [X] This issue is not a duplicate. Before opening a new issue, please search existing issues.
- [X] This issue is not a question, bug report, or anything other than a feature request directly related to this project.
Proposal
I want to convert python cv2 image to zed sl.Mat,please tell me how can i do, thanks
Use-Case
No response
Anything else?
No response
Hi, You can share both memory between opencv mat and sl mat :
my_opencv_mat = my_sl_mat.get_data(sl.MEM.CPU, False)
//use opencv function on my_opencv_mat ex : cv2.rectange(my_opencv_mat,10,10,10,10...)