renatoGarcia / opencv-swig

SWIG interface files for OpenCV types.
Other
94 stars 23 forks source link

C++ struct contain cv::Mat #21

Closed samguodq closed 4 years ago

samguodq commented 4 years ago

Hello, Thank you for code. It's very helpful to me. I have a question about how to wrap struct contain cv::Mat. struct MyStruct { cv::Mat image; };

Thank you very much for your help!

renatoGarcia commented 4 years ago

Hi @samguodq, sorry for the late response. I don't get what are your doubt. Just copying this struct code to the C++ code at example and following the same instructions will create you a Python wrap to MyStruct. With this you will be able to construct and access the image attribute, and pass/receive it to functions.