私は 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."