Notes /
OpenCVOpenCV is an open source computer vision tool kit. OpenCV Accessors
Cape Code and OpenCVThe Cape Code Host as
Cape Code OpenCV Demo
![]() However, this demo will not work in the Browser or in Node. The FaceRecognizer actor is a Ptolemy actor that uses Java and C/C++, not JavaScript. Browser Host and OpenCVAlex Veidenbaum <alexv@ics.uci.edu> is working on porting OpenCV to JavaScript, see
Node Host and OpenCVThere is a nice demo at https://github.com/drejkim/face-detection-node-opencv The demo uses node and opencv to do face detection. There are some caveats: 1) the opencv npm module uses OpenCV 2.x, which is out of date 2) I had various problems installing under Mac OS X because I have mac port and homebrew installed. The error messages are not helpful. Running npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! opencv@6.0.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the opencv@6.0.0 install script 'node-pre-gyp install --fallback-to-build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the opencv package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs opencv npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls opencv npm ERR! There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/cxh/.npm/_logs/2017-04-17T19_14_52_332Z-debug.log See MAC OSX 10.11.6 error #441, which suggests checking "Run brew ls opencv and check where opencv.pc is. Also run which pkg-config and ls -l $(which pkg-config) to figure out where pkg-config you're using is installed. You might have to export PKG_CONFIG_PATH with /usr/local/lib/pkgconfig ."
I ended up doing export PATH=/usr/local/Cellar/pkg-config/0.29.2/bin:${PATH} brew tap homebrew/science brew install homebrew/science/opencv npm install opencv Node, OpenCV and RHELUnder RHEL, I believe it was necessary to install OpenCV first with: yum install opencv-devel.x86_64 and then: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig npm install opencv |