裝這個東西花了我一天的時間因此想找個地方記一下~php
下載camera源代碼node
git clone https://github.com/wearefractal/cameragit
嘗試安裝github
npm install
而後會下載一些庫,可是安裝opencv時會失敗npm
去camera/node_modules
下下載node-opencv
單獨編譯測試
git clone https://github.com/peterbraden/node-opencv opencvcode
編譯以前先要安裝pkg-config
get
sudo port install pkgconfigit
沒有安裝port的話,去http://www.macports.org/install.php
下載個dmg文件安裝。安裝過程會卡好久。編譯
添加環境變量
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
在camera的頂層文件夾中運行
npm test
測試過了就過了,沒過也沒辦法……