Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to convert cv2.Mat to sl.Mat in Python Code ? #540

Open
2 tasks done
XuErShuo opened this issue Mar 5, 2023 · 1 comment
Open
2 tasks done

how to convert cv2.Mat to sl.Mat in Python Code ? #540

XuErShuo opened this issue Mar 5, 2023 · 1 comment
Assignees

Comments

@XuErShuo
Copy link

XuErShuo commented Mar 5, 2023

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • 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

@obraun-sl
Copy link
Member

obraun-sl commented Apr 13, 2023

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...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants