Ask Your Question

Revision history [back]

Here is an answer from an email by Hu, Ningxin. i paste it here for future references

Calib3d module is not enabled by OpenCV.js by default. To enable it, you need:

1.       Enable the build flag: https://github.com/opencv/opencv/blob/master/platforms/js/build_js.py#L136

2.       Append js into WRAP list of calib3d’s CMakefiles.txt: https://github.com/opencv/opencv/blob/master/modules/calib3d/CMakeLists.txt#L2

3.       Add SolvePnP API into JS API whitelist: https://github.com/opencv/opencv/blob/master/modules/js/src/embindgen.py#L141

4.       You may need to include the calib3d’s headers into the main file: https://github.com/opencv/opencv/blob/master/modules/js/src/core_bindings.cpp#L76

Here is an answer from an email by Hu, Ningxin. i paste it here for future references

Calib3d module is not enabled by OpenCV.js by default. To enable it, you need:
 1.       Enable the build flag: https://github.com/opencv/opencv/blob/master/platforms/js/build_js.py#L136
 2.       Append js into WRAP list of calib3d’s CMakefiles.txt: https://github.com/opencv/opencv/blob/master/modules/calib3d/CMakeLists.txt#L2
 3.       Add SolvePnP API into JS API whitelist: https://github.com/opencv/opencv/blob/master/modules/js/src/embindgen.py#L141
 4.       You may need to include the calib3d’s headers into the main file: https://github.com/opencv/opencv/blob/master/modules/js/src/core_bindings.cpp#L76

Here is an answer from an email by Hu, Ningxin. i paste it here for future references

Calib3d module is not enabled by OpenCV.js by default. To enable it, you need:
 1.  Enable the build flag: https://github.com/opencv/opencv/blob/master/platforms/js/build_js.py#L136
2.  Append js into WRAP list of calib3d’s CMakefiles.txt: https://github.com/opencv/opencv/blob/master/modules/calib3d/CMakeLists.txt#L2
3.  Add SolvePnP API into JS API whitelist: https://github.com/opencv/opencv/blob/master/modules/js/src/embindgen.py#L141
4.   You may need to include the calib3d’s headers into the main file: https://github.com/opencv/opencv/blob/master/modules/js/src/core_bindings.cpp#L76