Ask Your Question

agatte's profile - activity

2017-02-04 04:09:44 -0500 commented answer How to create binding opencv (contribute-modules) to matlab

I have already added more details.

2017-02-02 10:51:04 -0500 received badge  Editor (source)
2017-02-02 10:36:19 -0500 asked a question Binding opencv-contribute-modules to matlab

Hello,

I am trying to create binging 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 a tutorial from github.

I have 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.

2017-02-02 10:04:33 -0500 commented answer How to create binding opencv (contribute-modules) to matlab

Then I want to use opencv code from contribute-modules in matlab

2017-02-02 09:21:20 -0500 commented answer How to create binding opencv (contribute-modules) to matlab

Thanks for good hint :) I have already added it to CMakeLists but I have still problem to run it 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

2017-02-02 08:17:11 -0500 asked a question How to create binding opencv (contribute-modules) to matlab

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.

2017-01-29 03:48:27 -0500 commented question How to compile opencv project in cmake

Now it is working :) Thanks for good hints :)

cmake_minimum_required(VERSION 2.8)

PROJECT (TestOpenCV)
find_package(OpenCV REQUIRED)

add_executable(test1 test1.cpp)
target_link_libraries(test1 ${OpenCV_LIBS}`)`
2017-01-28 06:33:38 -0500 asked a question How to compile opencv project in cmake

Hello,

I am working on Windows and I have already compiled opencv 3.2 in cmake on MS Visual Studio 2010. Now I want to make a test a create small project example. But I don"t know how should look like CMakeLists. I want to compile OpenCv example code in *.cpp file with cmake.

Could anyone help me please ?

  cmake_minimum_required(VERSION 2.8) 

PROJECT (TestOpenCV)
find_package(OpenCV REQUIRED)

add_executable(test1 test1.cpp)
target_link_libraries(test1 OpenCV ${OpenCV_LIBS})

link_directories(${OpenCV_LIB_DIR})

I got an link error concerning OpenCV.lib ?

I think that it is missing something in this script.

I would be appreciate for any help please

2017-01-25 10:02:14 -0500 commented answer Problem with call of function bm3dDenoising() and xphoto ...

I don;t know ... I have to add more includes ?

2017-01-25 10:00:50 -0500 commented answer Problem with call of function bm3dDenoising() and xphoto ...

But it doesn't work... I got a bugs like this : Severity Code Description Project File Line Suppression State Error (active) name followed by '::' must be a class or namespace name Project1 c:\Users\Visual Studio 2015\Projects\Project1\Project1\Project1.cpp 35 Error C3083 'xphoto': the symbol to the left of a '::' must be a type Project1 c:\users\visual studio 2015\projects\project1\project1\project1.cpp 35 Error C2039 'bm3dDenoising': is not a member of 'cv' Project1 c:\users\visual studio 2015\projects\project1\project1\project1.cpp 35 Error C3861 'bm3dDenoising': identifier not found Project1 c:\users\visual studio 2015\projects\project1\project1\project1.cpp 35

2017-01-25 09:12:15 -0500 asked a question Problem with call of function bm3dDenoising() and xphoto ...

Hello,

I would like to create small opencv script woth BM3D denoising. I can't call propely this fucntion in opencv

bm3dDenoising() ? Could anyone help me please ? About include and Namespace ?

#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<opencv2/photo/photo.hpp>
#include<math.h>
using namespace cv::xphoto;
using namespace std;

    int main()
{
 //Load an Image
 Mat img = imread("C:\\image2.jpg", CV_LOAD_IMAGE_COLOR);
 namedWindow("Image", CV_WINDOW_AUTOSIZE);
 imshow("Image", img);

 //Blur Effect
 GaussianBlur(img, img, cv::Size(3, 3), 0);
 cv::xphoto::bm3dDenoising(img, img);  // ????
 namedWindow("Output", CV_WINDOW_AUTOSIZE);
 imshow("Output", img);
 //Wait Key press
 cvWaitKey(0);
 //destroy
 cvDestroyWindow("Image");
 cvDestroyWindow("BlurEffect");
 return 0;
}