I would like to include xfeatures2D from opencv_contrib into opencv.js.
I follow this documentation Build OpenCV.js. Everything is ok. I got a brand new opencv.js that I'm able to use in my html page, but it doesn't include the xfeatures2D module.
I change this file opencv/platforms/js/build_js.py to add :
def get_cmake_cmd(self):
cmd = ["cmake",
"-DOPENCV_EXTRA_MODULES_PATH=/Users/me/git/opencv_contrib/modules",
...
Now cmake include opencv_contrib module. I can see extra modules compiled, but still not included by emscripten. It looks like JavaScript compilation hardcoded into opencv/modules/js.
Is a way to produce his own opencv.js and choose to remove or add opencv and/or contribution modules ?
I've spotted a repo which looks promising: https://github.com/ganwenyao/opencv_js
You can even try a few aruco
demos here: https://ganwenyao.github.io/opencv_js/
It doesn't include xfeature2d
already compiled but it's worth trying the same approach listed the repo's README.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With