Comments (19)
@muhammadsamir11
Did you get this error from npm install? I think your error is not related to this issue, could you open a new issue and append the npm log?
from opencv4nodejs.
Ok, i ran and all the examples worked just great!
Great job you made and thanks for your help! ..
PD: simpleTracking1.js example just didn't work, but thats another topic..
from opencv4nodejs.
Same result with npm install --save opencv4nodejs
from opencv4nodejs.
Since it tries to compile the Tracking module, I assume you have set up the opencv-contrib module. Can you tell me which OpenCV version and which contrib version you are using. I only tested contrib3.2 so far.
from opencv4nodejs.
How to know which version of contrib am i using?, I don't remember i have installed this extra module.
from opencv4nodejs.
if i don't have it, i have to reinstall opencv from source, right?
from opencv4nodejs.
The contrib module is not required, the problem is probably, that you have libopencv_tracking.dylib in your lib folder which does come from a opencv-contrib version other than 3.2. The install script notices this lib and compiles the npm package with contrib. A dirty fix could be to simply rename that dylib. Optionally you can also go in to the opencv4nodejs folder in node_modules and check lib/utils.js. At the top there are arrrays defined for which modules to search for installation. You could try to simply uncomment the tracking module in xmodules. The last option would be to uninstall the contrib module altogether from you system.
from opencv4nodejs.
Just noticed it should also be possible to simply rename or remove the tracking.hpp from the opencv2 include dir.
from opencv4nodejs.
These method of rename tracking.hpp did not work. These files, because there are two, are inside the test folder, i don't think this would work when installing with npm install
.
i'll try the other method.
from opencv4nodejs.
Did reinstall OpenCV w/ contrib from brew, and still get the same error..
brew install opencv3 --with-contrib --with-python3
brew info opencv3
shows other options.
Any other idea solution? or if you need more info..
UPDATE
Did figurated
Warning: opencv: this formula has no --with-contrib option so it will be ignored!
So i am where i did started.
from opencv4nodejs.
Did reinstall OpenCV w/ contrib from source following this tutorial
https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html
got this error now..
In file included from ../cc/modules/tracking/MultiTracker.cc:3:
In file included from ../cc/modules/tracking/MultiTracker.h:2:
In file included from /usr/local/include/opencv2/tracking.hpp:304:
In file included from /usr/local/include/opencv2/tracking/tracker.hpp:45:
In file included from /usr/local/include/opencv2/core.hpp:54:
In file included from /usr/local/include/opencv2/core/base.hpp:58:
In file included from /usr/local/include/opencv2/core/cvstd.hpp:1038:
/usr/local/include/opencv2/core/ptr.inl.hpp:121:5: error: cannot initialize a member subobject of type 'cv::Tracker *' with an lvalue of type 'const char *'
stored(p)
^ ~
../cc/modules/tracking/MultiTracker.cc:37:63: note: in instantiation of function template specialization 'cv::Ptrcv::Tracker::Ptr' requested here
bool ret = FF_UNWRAP(info.This(), MultiTracker)->tracker.add("MIL", image, boundingBox);
^
3 warnings and 1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/modules/tracking/MultiTracker.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/opencv4nodejs
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install:node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.╭─────────────────────────────────────╮
│ │
│ Update available 5.4.2 → 5.5.1 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯npm ERR! A complete log of this run can be found in:
npm ERR! /Users/carlos/.npm/_logs/2017-10-25T00_18_36_649Z-debug.log
from opencv4nodejs.
Sorry for inconvenience, this seems not to be related to contrib directly. It seems to be an osx gcc issue. I provided an quickfix which should hopefully fix it, if you want to try it again.
Otherwise I will try to figure it out asap.
from opencv4nodejs.
I tried to install both ways npm i
on downloaded zip from git, and npm i -g opencv4nodejs
and both gave the same result.
I'll insert full trace at the end but this seems the error is the cause also it appears 5 times in similar ways, did I missed a library from opencv when reinstalling?
../cc/modules/tracking/MultiTracker.cc:38:59: error: no matching member function for call to 'add'
bool ret = FF_UNWRAP(info.This(), MultiTracker)->tracker.add(type, image, boundingBox);
.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
full trace:
trace23-10-2017_21-09.txt
from opencv4nodejs.
I tried to build the package for contrib versions other than contrib3.2 now and indeed the build fails. I disabled the tracking module in the default build for now until I added support for other contrib versions. You should be able to build the package now.
Thanks for reporting this issue and for your patience.
from opencv4nodejs.
I have this error can you help me to fix it please.
clang: error: no such file or directory: 'app/node_modules/macro-inferno/src'
make: *** [Release/obj.target/opencv4nodejs/cc/opencv4nodejs.o] Error 1
from opencv4nodejs.
Ok it looks it is installed now, i haven't tested yet, but this is the log..
First i ran npm i -g opencv4nodejs
and it was weird because it throws an error Error: Cannot find module 'nan'
..
Ok, installed using npm i -g nan
and it was installed fast.
Then i ran again npm i -g opencv4nodejs
and this time also throw a lot of warnings about comparing 'int' and 'uint32_t' also 'int' and 'size_type' but after all this it was installed without errors
SOLINK_MODULE(target) Release/opencv4nodejs.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
- [email protected]
added 3 packages in 108.23s
I'll test the lib and comment back
from opencv4nodejs.
Great to hear, that it works now.
from opencv4nodejs.
Thanks for reporting the bug in simpleTracking1.js, I fixed it.
from opencv4nodejs.
@justadudewhohacks
It works fine
from opencv4nodejs.
Related Issues (20)
- [!] RollupError: Could not resolve "../build/Release/opencv4nodejs.node" from "../build/Release/opencv4nodejs.node?commonjs-external" HOT 1
- Cannot find module 'C:\Users\pierr\Desktop\onnxjs\node_modules\opencv4nodejs\build\Release\opencv4nodejs' HOT 2
- Imencode - OpenCV Error: (!image.empty()) in imencode, in file... RPI4 HOT 1
- Correct the state of the `opencv4nodejs` package on the NPM. HOT 5
- canot load opencv4nodejs after install HOT 1
- Cannot find module 'D:\Web\opencv\node_modules\opencv4nodejs\build\Release\opencv4nodejs' HOT 2
- Error: CalcHist - object has no property: ranges HOT 1
- Can't resolve '../build/Release/opencv4nodejs.node' HOT 1
- Cannot find module /node_modules/@u4/opencv4nodejs/build/Release/opencv4nodejs'
- why no cv.compare or mat.compare function?
- how to catch mouse event on imshow
- ar
- Type error with mat.drawCountours()
- Unable to install opencv4nodejs HOT 1
- Unable to install in Ubuntu 22.05
- Ssim library
- Issues with node-gyp
- Issue with cv.Mat
- Issue with importing cv
- I think that typescript-eslint and eslint should be moved in the dev-dependencies. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv4nodejs.