Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

load library

mudasar_husain
Beginner
373 Views
hi,
Im using "OpenCV Beta5" and "Matab 7.0.4" on windows.
I have installed OpenCV(with the exe) and now want to load this library in Matlab with the help of the following function of matlab

loadlibrary('cv097', 'H: empInstallOpenCVcvincludecv.h')
i got the following error
??? Error using ==> loadlibrary
Failed to preprocess the input file.
Output from preprocessor is:'C:Program' is not recognized as an internal or external command,
operable program or batch file.

would you explain what is the problem with my above code and how can i load the OpenCV in matlab ?
Thanks in advance
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
373 Views

Hi,

you need to check parameters you pass to loadlibrary with your Matlab documentation. Probably you specify something in wrong way.

Regards,
Vladimir

0 Kudos
martin_dale
Beginner
373 Views
Hi,

I am trying to do the same thing, did you ever get it to work & if so, how did you do it?

This is what I have done:
addpath('C:Program FilesOpenCVcxcoreinclude');
addpath('C:Program FilesOpenCVcvauxinclude');
addpath('C:Program FilesOpenCVall_includes');

loadlibrary('C:Program FilesOpenCVincxts001.dll','C:Program FilesOpenCVall_includescxtypes.h','includepath','C:Program FilesOpenCVall_includes');
loadlibrary('C:Program FilesOpenCVin rs.dll','C:Program FilesOpenCVall_includescxtypes.h','includepath','C:Program FilesOpenCVall_includes');
loadlibrary('C:Program FilesOpenCVinlibguide40.dll','C:Program FilesOpenCVall_includescvcompat.h','includepath','C:Program FilesOpenCVall_includes');


loadlibrary('C:Program FilesOpenCVincxcore097.dll','C:Program FilesOpenCVall_includescxcore.h','includepath','C:Program FilesOpenCVall_includes');
loadlibrary('C:Program FilesOpenCVincv097.dll','C:Program FilesOpenCVall_includescv.h','includepath','C:Program FilesOpenCVall_includes');
loadlibrary('C:Program FilesOpenCVincvaux097.dll','C:Program FilesOpenCVall_includescvaux.h','includepath','C:Program FilesOpenCVall_includes');

%Read in an image
im=imread('seqsnap_00.bmp');
%create a IPL wrapper around the image passed from the workspace
v=libstruct('CvSize');
v.width=size(im,2);
v.height=size(im,1);

im1Ptr=calllib('cxcore097','cvCreateImageHeader',v,8,1);

I am still trying to figure out how to attach the image data to the Image Header using cvSetData.

Regards,

Martin.



0 Kudos
Reply