-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Description
System Information
OpenCV version: 4.x
Operating System / Platform: Ubuntu 24.04
Compiler & compiler version: EMCC 3.1.73
Detailed description
After compiling OpenCV.js following the tutorial, running the following code:
import cv from "/home/sid/Documents/opencv/build_js/bin/opencv.js"
const cv2 = await cv;
let dictionary = cv2.getPredefinedDictionary(cv2.DICT_6X6_250);
let size = {width: 5, height: 7};
let squareLength = 0.04;
let board = new cv2.aruco_CharucoBoard(size, squareLength, 0.02, dictionary, new cv2.Mat());
board.getChessboardCorners()results in an error:
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
UnboundTypeError: Cannot call aruco_CharucoBoard.getChessboardCorners due to unbound types: NSt3__26vectorIN2cv7Point3_IfEENS_9allocatorIS3_EEEE
at new UnboundTypeError (/home/sid/Documents/opencv/build_js/bin/opencv.js:31:11076988)
at throwUnboundTypeError (/home/sid/Documents/opencv/build_js/bin/opencv.js:31:11077779)
at ClassHandle.unboundTypesHandler [as getChessboardCorners] (/home/sid/Documents/opencv/build_js/bin/opencv.js:31:11087045)
at file:///home/sid/PycharmProjects/slamdunk/app/lib/calibrate/test2.js:15:7
Node.js v20.9.0
Steps to reproduce
- Clone opencv and opencv_contrib
- Build:
emcmake python3 ./platforms/js/build_js.py build_js --cmake_option="-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules" - Run my code with
node test.js
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable