You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed the prebuilt opencv for jetson 4.1.1 (available through specific NVIDIA debian repositories, but it seems that the problem isn't connected espetially with NVIDIA prebuilt binaries).
I get no error messages, everything seems to be working ok
I run the following command to test a binding node -e "const cv = require('@u4/opencv4nodejs'); const cap = new cv.VideoCapture('./video.mp4'); const im = cap.read(); console.log(im)"
I get the following error stack
<...>/node_modules/@u4/opencv4nodejs/lib/cvloader.js:62
throw err;
^
Error: Cannot find module '<...>/node_modules/@u4/opencv4nodejs/build/Release/opencv4nodejs'
Require stack:
- <...>/node_modules/@u4/opencv4nodejs/lib/cvloader.js
- <...>/node_modules/@u4/opencv4nodejs/lib/opencv4nodejs.js
- <...>/[eval]
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at getOpenCV (<...>/node_modules/@u4/opencv4nodejs/lib/cvloader.js:54:23)
at loadOpenCV (<...>/node_modules/@u4/opencv4nodejs/lib/opencv4nodejs.js:6:48)
at Object.<anonymous> (<...>/node_modules/@u4/opencv4nodejs/lib/opencv4nodejs.js:21:12)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'<...>/node_modules/@u4/opencv4nodejs/lib/cvloader.js',
'<...>/node_modules/@u4/opencv4nodejs/lib/opencv4nodejs.js',
'<...>/[eval]'
]
}
How to fix
The module is not built. Using @u4/opencv-build and node-gyp I have found out, that the compilation failes here opencv4nodejs/cc/highgui/highguiConstants.cc:30
the constant WND_PROP_TOPMOST was intoduced only in OpenCV 4.1.2 while in opencv4nodejs code it stands for 3.4.8
Error Message
Error: Cannot find module '.../node_modules/@u4/opencv4nodejs/build/Release/opencv4nodejs'
Steps to reproduce:
npm i @u4/opencv4nodejs
node -e "const cv = require('@u4/opencv4nodejs'); const cap = new cv.VideoCapture('./video.mp4'); const im = cap.read(); console.log(im)"
How to fix
The module is not built. Using @u4/opencv-build and node-gyp I have found out, that the compilation failes here
opencv4nodejs/cc/highgui/highguiConstants.cc:30
the constant WND_PROP_TOPMOST was intoduced only in OpenCV 4.1.2 while in opencv4nodejs code it stands for 3.4.8
Please replace this
with
Manual Build - Environment Information
OpenCV version 4.1.1
With OpenCV-contrib? (extra modules): no
OS: Ubuntu
The text was updated successfully, but these errors were encountered: