Coder Social home page Coder Social logo

Comments (19)

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024 1

@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.

carlosen14 avatar carlosen14 commented on June 20, 2024 1

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.

carlosen14 avatar carlosen14 commented on June 20, 2024

Same result with npm install --save opencv4nodejs

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

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.

carlosen14 avatar carlosen14 commented on June 20, 2024

How to know which version of contrib am i using?, I don't remember i have installed this extra module.

from opencv4nodejs.

carlosen14 avatar carlosen14 commented on June 20, 2024

if i don't have it, i have to reinstall opencv from source, right?

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

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.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

Just noticed it should also be possible to simply rename or remove the tracking.hpp from the opencv2 include dir.

from opencv4nodejs.

carlosen14 avatar carlosen14 commented on June 20, 2024

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.

carlosen14 avatar carlosen14 commented on June 20, 2024

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.

carlosen14 avatar carlosen14 commented on June 20, 2024

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.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

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.

carlosen14 avatar carlosen14 commented on June 20, 2024

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.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

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.

muhammadsamir11 avatar muhammadsamir11 commented on June 20, 2024

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.

carlosen14 avatar carlosen14 commented on June 20, 2024

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]

I'll test the lib and comment back

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

Great to hear, that it works now.

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on June 20, 2024

Thanks for reporting the bug in simpleTracking1.js, I fixed it.

from opencv4nodejs.

muhammadsamir11 avatar muhammadsamir11 commented on June 20, 2024

@justadudewhohacks
It works fine

from opencv4nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.