0

我正在使用 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."
4

0 回答 0