If I am using opencv.js as described here (https://docs.opencv.org/3.4/dd/d00/tutorial_js_video_display.html) to get images from camera. I would like to process the frames in the C++ function binded with Embind, because then I can use the same functions to conveniently debug the code locally.
- Is it possible to compile such code (opencv.js and my Embind functions), to have everything in one module?
- I am having the problem with passing the cv.Mat objects from camera (read with opencv.js (https://docs.opencv.org/3.4/dd/d00/tutorial_js_video_display.html)) to Embind(ed) functions, I am getting "Uncaught UnboundTypeError: Cannot call XXX due to unbound types". The cv::Mat type between both is not compatible. Should I get the vector of all elements and pass it to Embind function? This sounds like unnecessary overhead... How to do it in a neater way?
Thank you very much for your help!