Code covered by the BSD License  

3.75

3.8 | 4 ratings Rate this file 133 Downloads (last 30 days) File Size: 1.11 MB File ID: #40665
image thumbnail

Matalb and OpenCV

by

 

07 Mar 2013 (Updated )

How to Connect Matlab with OpenCV to use the different functions offered by OpenCV using mex-files.

| Watch this File

File Information
Description

How to Connect Matlab with OpenCV to use the different functions offered by OpenCV using mex-files.

The purpose of this connections is to be able to write function in C++ using the OpenCV library to call functions that can for exemple extract feature points using SIFT/SURF or ORB algorithem or detect faces that are on an image ...

To use this functionality you need to have some knowledge about C++ and also how the mex compiler of Matlab work.

Acknowledgements

Image Processing With Guide inspired this file.

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
23 Oct 2014 jose verdugo  
26 May 2014 Dimaz Hafizhan

hi,i'm using Matlab2012b-64bit, VS2010-Ultimate, and openCV 2.3

when running mex displayimage.cpp i got this eror :

displayimage.cpp
displayimage.cpp(5) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory

C:\PROGRA~1\MATLAB\R2012B\BIN\MEX.PL: Error: Compile of 'displayimage.cpp' failed.

Error using mex (line 206)
Unable to complete successfully.

please help me kind sir and thanks in advance

19 May 2014 BIREM Merwan

Hello,

For "sehreen" try to read carefully the file that show how to connect OpenCv with Matlab.

For "imran" I try my self using 32bit version and it is working well unfonutly i didn't try it using the 64bit version but we can try if you want and try to fix this problem.

best regards Merwan

13 May 2014 Corey

Can you explain what the difference is between this library?:

http://www.cs.stonybrook.edu/~kyamagu/mexopencv/

12 May 2014 imran

Hello,

I am working on a project which consist to control two FireWire Cameras simultaneously. I am looking for a toolkit which allow controlling two cameras simultaneously in Matlab. I see OpenCV in Matlab but I don't know How to Install OpenCV in Matlab.

I'm using 64-bit Matlab, Open CV 2.4.9 and Microsoft SDK 7.1

Can you help me to install OpenCV in Matlab because I don't understand too the tutorial.

How to create MEX file

kind regards

09 Jan 2014 sehreen

Can anyone plz tellme the detailed procedure of how to connect the matlab with opencv and run the functions of opencv in matlab.

21 May 2013 BIREM Merwan

Did you modify the "mexopts.bat" file ??

18 May 2013 rana

hey .. i am using matlab 2013a and opencv2.4.5 .. i obtained this error
'displayImage.cpp(5) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory '
i can't include any header,, is that because a configuration to visual studio 2012 is necessary?

15 May 2013 SenyaLab

I am using Matalb2012b-64bit, VS2010-Professional, and OpenCV 2.4.5.

During the compilation I got the following error:

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(287) : error C2582: 'operator '='....

Adding _SECURE_SCL=1 to COMPFLAGS into mexopts.bat file solved this problem for me.

References
1. http://stackoverflow.com/questions/9357699/error-c2582-operator-function-is-unavailable-in-bitstreambitset-extracto/16558308#16558308

2.
http://preshing.com/20110807/the-cost-of-_secure_scl

28 Apr 2013 Rodrigo  
23 Apr 2013 BIREM Merwan

I didn't try to connect OpenCV with Matlab-2012, but i think it's possible (with the appropriate compiler and version of OpenCV) ...

22 Apr 2013 Fernando Sato

Does this tutorial works on MATLAB 2012a?

Updates
07 Mar 2013

Start with : "How to connect Matlab with OpenCV on Windows7.pdf"

22 Mar 2013

A new PDF file added to help and guid the user on how to connect Matlab and OpenCV

Contact us