Giter Site home page Giter Site logo

Comments (9)

parthmehta avatar parthmehta commented on July 18, 2024

Any solution for this issue ?

from node-opencv.

jandrieu avatar jandrieu commented on July 18, 2024

I have the same issue. I have OpenCV installed on my machine, but not pkg-config. I ended up reconstructing the flags directly in the binding.gyp, but it wasn't pretty. In fact, I couldn't get it to compile. Node-gyp stopped complaining, but the last error I had was a slew of warnings and two specific errors with matrix.cc

[lots of these conversion warnings...]
..\src\Matrix.cc(1109): warning C4244: 'initializing' : conversion from 'double
' to 'float', possible loss of data [C:\Tests\node_modules\opencv\build\binding.s
ln]
..\src\Matrix.cc(1139): error C3861: 'round': identifier not found [C:\Tests\node
_modules\opencv\build\binding.sln]
..\src\Matrix.cc(1140): error C3861: 'round': identifier not found [C:\Tests\node
_modules\opencv\build\binding.sln]
[followed by even more conversion warnings]

from node-opencv.

seyedaed avatar seyedaed commented on July 18, 2024

I just wanted to add this as maybe it might help someone. I've been trying to get it working on Windows 7 64bit. I seem to be able to get things to compile but I still get an error. I'll post the error below but maybe some of these steps can help you out. If your using 32bit try using 32bit sources instead.

Steps to install and compile on 64 windows7

Install opencv @ - (I used version 2.4.4)

http://opencv.org/downloads.html

Install python version 2.7 @
http://www.python.org/download/releases/2.7/install pkg-config by downloading the all in one bundle @ - (I used Gtk+ 3.6.4)

http://www.gtk.org/download/win64.php

Add the following to your path variables

C:\pkg-config\bin;C:\OpenCV\build\x64\vc11\bin;

Install visual-studio in 4 steps

First install Visual C++ 2010 Express
Second install Windows SDK for windows 7 and .net framework 4
Third install Visual Studio 2010 Service Pack 1
Fourth install Visual C++ 2010 Service Pack 1 Compiler

Download notcoffeetable/node-opencv fork

https://github.com/notcoffeetable/node-

opencv

Open windows sdk 7.1 command prompt <- need

This one specifically as it sets path information for kernel

Navigate to the directory containing the downloaded branch

Type node-gyp rebuild

You will get several warnings. If you get an error that says something about Round not being found in Matrix.h try this.

Edit ./src/Matrix.cpp add at the bottom

inline double round( double d ) { return floor( d + 0.5);}

Try node-gyp rebuild again. It should work with several warning.

To install just type npm install

Error trying to run node contour.js

module.js:356
Module._extensions[extension](this, filename);
^
Error: The specified module could not be found.
C:\Users\deadeyes\Desktop\nodeJS\node_opencv\node-opencv-master\build\Release\op
encv.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\deadeyes\Desktop\nodeJS\node_opencv\node-ope
ncv-master\lib\bindings.js:1:80)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

from node-opencv.

mrgreene avatar mrgreene commented on July 18, 2024

seyedaed, you ever get a solution to your error? I think I've got something similar going on.

from node-opencv.

thomasbaldauf avatar thomasbaldauf commented on July 18, 2024

Same here! Please help with this, thanks!

from node-opencv.

jack545 avatar jack545 commented on July 18, 2024

same errors related to opencv on node. Kindly help!

from node-opencv.

 avatar commented on July 18, 2024

Same thing here, this is going to be a show-stopper.

from node-opencv.

brianofrokk3r avatar brianofrokk3r commented on July 18, 2024

Same issue as @subhendusc

from node-opencv.

funky81 avatar funky81 commented on July 18, 2024

Hi @seyedaed ....

Thanks for guidance. I have successfully install node-opencv over my windows 10
following is my walk-through to install this

  1. Download Install opencv @ - (I used version 2.4.4)
    http://opencv.org/downloads.html
    Put it in c:\opencv
  2. Install python version 2.7 @
    http://www.python.org/download/releases/2.7/
    put it in c:\python27
  3. install pkg-config by downloading the all in one bundle @ - (I used Gtk+ 3.6.4)
    http://www.gtk.org/download/win64.php
    put it in c:\pkg-config
  4. Add the following to your path variables
    C:\pkg-config\bin;C:\OpenCV\build\x64\vc11\bin;
  5. Install visual-studio in 4 steps
  6. First install Visual C++ 2010 Express
  7. Second install Windows SDK for windows 7 and .net framework 4
  8. Third install Visual Studio 2010 Service Pack 1
  9. Fourth install Visual C++ 2010 Service Pack 1 Compiler
  10. Download npeterbraden/node-opencv fork
    git clone https://github.com/peterbraden/node-opencv
  11. edit file src/Matrix.cpp
    put "inline double round( double d ) { return floor( d + 0.5);}" below "cv::Rect* setRect(Local objRect, cv::Rect &result);"
  12. run npm install

from node-opencv.

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.