How to create binding opencv (contribute-modules) to matlab [closed]

asked 2017-02-02 08:17:11 -0500

agatte gravatar image

updated 2017-02-03 00:43:08 -0500

Hello,

I want to run opencv code wirh class from contributes_modules in matlab I am trying to create binding opencv to matlab. It is ok when I use standard opencv interface. But I need to use a class xphoto from contribute modules. I have already built fine opencv with conribute-modules in cmake & visual studio. It is working fine. I checked USE matlab. Matlab paths were found well.

I followed tutorial from github: I got still error in matlab : Building with 'Microsoft Visual C++ 2010'. Error using mexOpenCV (line 120) bm3d.cpp C:\Users\Desktop\bm3d\bm3d.cpp(11) : fatal error C1083: Cannot open include file: 'opencv2/xphoto.hpp': No such file or directory

Could anyone help me please how I can do it ?

I would appreciate for any help please.

My steps: 1. OpenCv 3.2.0 and contribute modules 2. Generate project with cmake (check Enable free modules and path to contribute modules, and check use matlab) All path to matlab were found well 3. Compile OpenCv with contribute modules in MS Visual Studio 2010 4. In Matlab I check mex 5. mex -setup c++ 6. add paths to opencv build folder

MATLABPATH

C:\OpenCV-3.2.0\opencv\build-2\modules\matlab
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\.matlab
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\.matlab\CMakeFiles
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\CMakeFiles
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\map
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\src
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\test
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\test\CMakeFiles
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\test\x64
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\test\x64\Debug
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\test\x64\Debug\opencv_test_matlab
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\x64
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\x64\Debug
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\x64\Debug\opencv_matlab
C:\OpenCV-3.2.0\opencv\build-2\modules\matlab\x64\Debug\opencv_matlab_sources
  1. I have done cpp file with mexfunction
  2. I run in matlab command mexOpenCV bm3d.cpp >> mexOpenCV bm3d.cpp Warning: The OpenCV libraries were built using Microsoft Visual C++ 2012. Your compiler is Microsoft Visual C++ 2010. These compilers may not be compatible. Note that you can select a compiler using 'mex -setup' command. > In mexOpenCV>checkCompilerCompatibility (line 152) In mexOpenCV (line 46) Building with 'Microsoft Visual C++ 2010'. Error using mexOpenCV (line 120) bm3d.cpp C:\Users\agatka\Desktop\bm3d\bm3d.cpp(11) : fatal error C1083: Cannot open include file: 'opencv2/xphoto.hpp': No such file or directory

... Bth I have already installe visionSupportPackage in matlab I run well opencv example but it is standard interface without xphoto.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by agatte
close date 2017-02-04 14:22:25.249332