13

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 ?

2

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.