2
我想通過我的Mac上安裝mexopencv
接口Matlab和OpenCV的,我有以下錯誤信息:錯誤安裝mexopencv
>> mexopencv.make
make MATLABDIR="/Applications/MATLAB_R2014a.app" MEXEXT=mexmaci64
make: pkg-config: Command not found
make: pkg-config: Command not found
/Applications/MATLAB_R2014a.app/bin/mex -c -cxx -largeArrayDims -Iinclude src/MxArray.cpp -outdir lib
Building with 'Xcode Clang++'.
In file included from /Users/Alberto/Documents/Data_analysis/mexopencv-master/src/MxArray.cpp:6:
include/MxArray.hpp:14:10: fatal error: 'opencv2/opencv.hpp' file not found
#include "opencv2/opencv.hpp"
^
1 error generated.
make: *** [lib/libMxArray.a] Error 255
我使用的Brew安裝OpenCV的。你有什麼建議如何使安裝工作?謝謝!
'安裝在Mac上mexopencv'是我所經歷過的最大的痛。但是,我設法按照以下說明使其工作:http://stackoverflow.com/questions/19773916/compiling-mexopencv-in-os-x-10-9-with-xcode-5-and-matlab- r2013b。不知道這些是否適合你,但試試吧! – rayryeng 2014-10-02 03:13:17
'mexopencv.make'函數[調用](https://github.com/kyamagu/mexopencv/blob/master/%2Bmexopencv/make.m#L162)系統的'make'來執行'Makefile'。這反過來[使用](https://github.com/kyamagu/mexopencv/blob/master/Makefile#L16)'pkg-config'來找到OpenCV頭和共享庫。所以你必須在PATH上有'pkg-config'。所以如果你打開一個終端並輸入'pkg-config --cflags --libs opencv',你應該得到已安裝的OpenCV庫的編譯和鏈接標誌。如果沒有,請安裝'pkg-config'並將其添加到PATH,然後相應地設置'PKG_CONFIG_PATH' – Amro 2014-10-02 19:10:57
此主題可能有所幫助:https://github.com/kyamagu/mexopencv/issues/71 – Amro 2014-10-02 19:14:47