0

I am using matlab 2011b (32bit), VS 2008, OpenCV 242.

I would like to load the libraries and then call them by "calllib" in matlab. My problem is when I load the libraries:

opencvPath = 'C:\opencv';
includePath = 'C:\opencv\build\include';
[notfound,warnings]=loadlibrary(...
fullfile('C:\opencv\build\x86\vc9\bin', 'opencv_core242.dll'),...
fullfile(opencvPath, 'build\include\opencv\cxcore.h'), ...
'alias', 'cxcore', 'includepath', includePath)

[notfound,warnings]=loadlibrary(...
fullfile('C:\opencv\build\x86\vc9\bin', 'opencv_core242.dll'), ...
fullfile(opencvPath, 'build\include\opencv\cv.h'), ...
'alias', 'cv', 'includepath', includePath)

[notfound,warnings]=loadlibrary(...
'C:\opencv\build\x86\vc9\bin\opencv_highgui242.dll',...
'C:\opencv\build\include\opencv\highgui.h', ...
    'alias', 'highgui', 'includepath', includePath)

and for example I get this for highgui:

Warning: The library class 'highgui' already exists.  Use a classname alias. 
> In loadlibrary at 180
In facedetector at 45 

notfound =

  []

It seems they have been loaded. But now if I try to use calllib, I get an error the function cannot be found!!!

To understand if I really loading the libraries, I used "libfunctions('highgui')" which seems I did not really load the libraries!!! I get the below error:

"No methods for class lib.highgui or no class lib.highgui."
  • The below is the rest of the code I am trying to implement: classifierFilename = 'C:/opencv/data/haarcascades/haarcascade_frontalface_alt.xml'; % cvCascade = calllib('cv', 'cvLoadHaarClassifierCascade',... % classifierFilename) % cvStorage = calllib('cxcore242', 'cvCreateMemStorage', 0); % % cvImage = calllib('cvLoadImage', inputImage, int16(1)); % % if ~cvImage.Value.nSize % % error('Image could not be loaded'); % end – user1599339 Aug 14 '12 at 22:39
  • Please, edit your question and add this code there. It will improve reading. – Yamaneko Aug 15 '12 at 02:25

0 Answers0