Ask Your Question

toby's profile - activity

2014-06-04 04:40:23 -0600 commented answer OpenCV - Matlab bindings are not working

I forgot about that one, thanks.

2014-06-03 12:39:46 -0600 received badge  Necromancer (source)
2014-06-03 08:08:57 -0600 received badge  Editor (source)
2014-06-03 07:04:28 -0600 answered a question OpenCV - Matlab bindings are not working

I got the same error due to the fact that my mex files were missing. In order to get the mex files you need to compile the latest OpenCV from source. Make sure CMake does not give any errors. Then I compiled things with Visual Studio. This did not work due to Ptr_DenseOpticalFlow not being defined. Thus I had to implement a fix found here: https://github.com/Itseez/opencv/pull/2783.

Basically I had to add the following lines to 'OpenCV-build'\modules\matlab\src:

-53  #include <opencv2/video/tracking.hpp>
...
-80  typedef cv::Ptr<DenseOpticalFlow> Ptr_DenseOpticalFlow;
...
-458 // ---------------------------   Ptr_DenseOpticalFlow   -------------------
-459 Bridge& operator=(const Ptr_DenseOpticalFlow& ) { return *this; }
-460 Ptr_DenseOpticalFlow toPtrDenseOpticalFlow() { return Ptr_DenseOpticalFlow(); }
-461 operator Ptr_DenseOpticalFlow() { return toPtrDenseOpticalFlow(); }

Then I could compile the opencv_matlab module.

Note that this compilation took a long time to complete so be patient!

If all fails you could also try using pre-compiled mex files, found at the end of this post: http://seevisionc.blogspot.nl/2014/03/compiling-opencv-30-with-matlab-support.html

2014-06-03 06:22:44 -0600 received badge  Supporter (source)
2014-06-03 06:19:54 -0600 commented question OpenCV - Matlab bindings are not working

I have the same issue. I did find out that, for me, some functions do have an accompanying mex-file like add. This function does work (after I added the path to my cv build). Anybody find a solution yet?

2013-09-02 06:56:19 -0600 commented answer error write avi file

I had the same problem. I fixed it (after half a days work) by addin '.avi' to the filename where I store the video files.