WebAssembly OpenCV.js and camera processing with Embind-ed C++ functions
If I am using opencv.js as described here (https://docs.opencv.org/3.4/dd/d00/tu...) 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/tu... to Embind(ed) functions, I am getting "Uncaught UnboundTypeError: Cannot call XXX due to unbound types: N2cv3MatE". The cv::Mat type between opencv.js and c++ code is not compatible (a pity). 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!
i have no idea, but maybe take a look here
Thanks! It gave me the idea to get the camera object directly into C++ in similar way how it is done with these bindings. I'll give it a try.
glad you found it useful, lol ;)
Ok, it didn't help :D Does anyone have an idea how to access the camera from the website level so that it will be possible to pass it to cv::VideoCapture constructor?