I can't help but notice that the MATLAB documentation for the Computer Vision toolbox has a very familiar feel, as if it is a re-write of the OpenCV docs and examples.
This is the MATLAB toolbox doc: http://www.mathworks.co.uk/products/computer-vision/
This is the opencv doc: http://docs.opencv.org/
Now I currently don't have MATLAB so I can't really check. Does anyone know if it is actually MEX OpenCV?
Cheers
MATLAB for the most part uses OpenCV libraries underneath the hood for their CV toolbox. However, I would like to note that the Computer Vision Toolbox also implements some functionality that is independent of the OpenCV libraries but a good majority of what the toolbox provides uses OpenCV functionality. As quoted by Amro in his comment below:
Like many other areas, MATLAB wraps well-known libraries in an easy to use format (think BLAS/LAPACK, FFTW, SparseSuite, just to name a few!). So while MATLAB does make use of OpenCV in its CVST toolbox, it adds many other algorithms not found in OpenCV (either implemented in M-code or a lower-level language).
In addition, you are certainly able to interface OpenCV code with MATLAB if you have code already written in this platform and would like to interface that with MATLAB if you are developing MATLAB products and want to take full advantage of OpenCV. See this link for more details (courtesy of Amro): http://www.mathworks.com/discovery/matlab-opencv.html
Some of the MEX functions that called in the Computer Vision toolbox that ultimately get run call OpenCV C++ methods in the end. Inside the folder of where MATLAB is installed, if you actually take a look at the bin/os/
folder where os
is the operating system you're using (for me, it's maci64
), you'll see a libopencv
folder. In this folder, you will see a lot of dynamically linked libraries that are basically those from OpenCV to which the MATLAB MEX functions that are part of the CV toolbox access in the end.
To navigate here in MATLAB, type this into the MATLAB command prompt:
>> cd (matlabroot)/bin/
.. then go into the folder that is for your operating system, then finally go to the libopencv
folder.
You will also see what version of OpenCV is being used when calling the functions in the OpenCV library and the version number is appended at the end of each of the files. As such, if you want to use OpenCV for any of your MEX functions, perhaps the easiest thing would be to use the version that is pre-loaded into MATLAB to escape any compilation / setup headaches. With this, make sure you access the appropriate documentation for this version of OpenCV.
As such, for those functions in the toolbox that do use OpenCV, it's really a three step process:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With