Closed jbriales closed 9 years ago
Well, the mexplus library is built after mexopencv project, and both projects have a data conversion API named MxArray
though the design and implementation is different. I haven't had time to implement a reference cv::Mat
converter for mexplus, but it shouldn't be difficult to port the implementation from mexopencv.
Also, if you just want to use mexopencv, you can directly use that with mexplus without any problem, as long as you properly use mexplus::
namescope. Just build the mexopencv library beforehand, specify the MxArray.hpp
header in your code, and link to libMxArray.a
when compiling. The MxArray library in mexopencv looks like this:
cv::Mat mat = MxArray(prhs[0]).toMat();
plhs[0] = MxArray(mat);
I just copied the code you used in mexopencv to implement the corresponding ::from method in mexplus. Thank you for your support!
@jbriales, would you be willing to share your file with the cv::Mat
::from
and ::to
methods for mexplus?
Thanks!
Hi @patrikhuber it's been a while since I last used this package, but I will try to find it when a get a spare moment and commit it!
@jbriales Thank you, much appreciated! (You can also just upload them to a gist or something and I can then compile them with mexplus.)
I need to use cv::Mat objects, for example, and I suppose it can be also done defining new ::from and ::to methods in MxArray. However, I would like to know if there is any way I could directly use the mexopencv wrapper to use opencv objects from mexplus too.