error LNK 2019Cannot open include file: 'opencv/cv.h': No such file or directory

3 ビュー (過去 30 日間)
paria
paria 2015 年 2 月 5 日
コメント済み: paria 2015 年 2 月 6 日
I have wrote the mex function in Visual studio 2012 with c++ and x64 compiler in windows 8, x64 bit.I use opencv 2-4-10 version as well. I would like to get the matrix arrays of my input image in MATLAB. but when I write in matlab this command: >> mex filename.cpp, the MATLAB gives the above error! Also I have added the opencv folder into include Directory of my project in Visual Studio.

採用された回答

Ken Atwell
Ken Atwell 2015 年 2 月 6 日
MEX is unaware of whatever settings you may have in a Visual Studio project. You will need to add the include folder to your MEX command line:
mex filename.cpp -I\path\to\include
You will probably also need to specify -L to point to the OpenCV folder and -l (lower case "L") to name the library to link against.
  1 件のコメント
paria
paria 2015 年 2 月 6 日
dear Ken, thanks a lot for your help, the problem is solved :D

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by