Reputation: 21
I need some help converting a cpp file to a mex file. I get the error below:
fatal error: opencv2/core/core.hpp: No such file or directory
Compilation terminated
The cpp file is using opencv header files. I'm not sure how to link Matlab with opencv in Ubuntu. I saw this link
http://xanthippi.ceid.upatras.gr/people/evangelidis/matlab_opencv/
but its for Windows and I'm not sure where Ubuntu stores opencv. There are a couple places I found opencv folders
usr/local/include/opencv and usr/local/include/opencv2 and usr/local/share/OpenCv
Tried these with OCVROOT but got 'Error: Unexpected Matlab Operator'. Not sure what I'm doing wrong here. Any help would be much appreciated.
Thank you!
Upvotes: 0
Views: 907
Reputation: 11941
-I
argument on the mex command line. You will find the answer to How to link during Matlab's MEX compilation helpful.Upvotes: 1