opencv4nodejs
opencv4nodejs copied to clipboard
Almost got opencv4nodejs up and running, but have file structure errors when starting the app
I am getting stuck here, I have followed the instructions to a T, and there is some sort of mismatch in the file structure? Are there certain versions of compatible packages that I should use together? I have disabled auto-build, I'm using a mac with an intel chip, I have unlinked Tesaract, installed OpenCV and opencv@2. I want to get a good face detection and face mesh for large groups of people in videos of course. But do it all with Nodejs. What I am using now runs in the browser and I can only get 4 people masked at the most. Love what you're doing here and I hope I can help in any way.
Also when I installed "opencv4nodejs" globally and tried locally. there are lots of warnings and a few errors, I'm not sure if that's just over logging or I'm breaking lots of things.
/node_modules/opencv4nodejs/lib/cv.js:47 throw err ^
Error: Cannot find module '/node_modules/opencv4nodejs/build/Release/opencv4nodejs'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.
I tried tried figuring this out (since I got the same issue).
I described what worked for me here: https://github.com/justadudewhohacks/opencv4nodejs/issues/538#issuecomment-1015480008
I got opencv4nodejs working on my M1 Max MacBook running node.js@v16.
opencv4nodejs can not be installed globally; I did not patch that in my fork because I use a new env variable named OPENCV_BUILD_ROOT
:
export OPENCV_BUILD_ROOT="~/OpenCV"
So all my builds are made outside of my node_modules
and are shared between all my projects.
@UrielCh This sounds very promising 👍.