如何在matlab中调用opencv中的面部检测?/使用loadlibrary进行失败

时间:2012-08-14 22:36:53

标签: matlab opencv mex face-detection loadlibrary

我正在使用matlab 2011b(32位),VS 2008,OpenCV 242。

我想加载库,然后在matlab中通过“calllib”调用它们。我的问题是 当我加载库时:

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)

例如我为highgui得到了这个:

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

notfound =

  []

似乎已经加载了。但是现在如果我尝试使用calllib,我会收到一个错误,找不到函数!!!

要理解我是否真的加载了库,我使用了“libfunctions('highgui')”,这似乎并没有真正加载库!我收到以下错误:

"No methods for class lib.highgui or no class lib.highgui."

0 个答案:

没有答案