I have used both for a long time and I switch from one to the other depending on what I'm doing. If you're doing research (for instance, if you're testing different algorithms, different representations, etc) I recommend Matlab, since you will be able to program faster. If you already had a result of your research, and wan't to make an application with it, I recommend OpenCV, it will take longer to program, but you can make more time and memory optimizations. If you are doing research but you're working with very large datasets, features, etc, maybe you'll have to use OpenCV instead of Matlab in order to play with memory optimization, since with large data Matlab tends to crash frequently. According to the image processing functionalities they provide, I think both are well equipped, but I would say that Matlab is better in this case, and you can find more Matlab source code in internet than OpenCV's.
I have not worked with opencv and so cannot comment on that. But have used MATLAB exhaustively and never faced a moment when MATLAB couldn't do what I wanted it to. It is very user friendly and has a rich library of functions. Handling video is also simple. A lot of interesting options for analyzing results, plotting outputs etc.. There are utilities that can convert a MATLAB program to C/C++ . I have not used its GUI functions so much, but my students always managed to design a smart GUI for their MATLAB based applications.
I have used both for a long time and I switch from one to the other depending on what I'm doing. If you're doing research (for instance, if you're testing different algorithms, different representations, etc) I recommend Matlab, since you will be able to program faster. If you already had a result of your research, and wan't to make an application with it, I recommend OpenCV, it will take longer to program, but you can make more time and memory optimizations. If you are doing research but you're working with very large datasets, features, etc, maybe you'll have to use OpenCV instead of Matlab in order to play with memory optimization, since with large data Matlab tends to crash frequently. According to the image processing functionalities they provide, I think both are well equipped, but I would say that Matlab is better in this case, and you can find more Matlab source code in internet than OpenCV's.
In the past I have worked extensively with both Matlab and OpenCV.
Matlab allows you to prototype faster, for instance in order to test a method, compare the accuracy of different techniques, estimate which implementation runs faster, or learn the best parameters for a model. It is especially interesting for fast debugging and fast visual plotting of results, in particular for research in image processing. It is also fairly easy to find public source code shared by users.
OpenCV allows you to efficiently encode algorithms for computer vision. It will run much faster than Matlab code, but it will take longer to implement and to debug. You will be able to incorporate external libraries, and is a great help for serious solution coding. There are several tutorials and nice documentation out there, and it is well maintained.
Unlike some users have suggested above, I completely discourage to use any utilities that convert Matlab to C/C++, nor to port any OpenCV functions to Matlab. That makes little sense. Your code will be more efficient by carefully coding it from scratch using the proper libraries, and most times you will go faster by implementing something from scratch in Matlab over some base code. Both Matlab and OpenCV contain a great deal of image processing utilities, from basic to advanced requirements, so they are mostly interchangeable depending on your goal.
I have used both OpenCV and Matlab for computer vision proposes and as a conclusion I agree with Carles, It is basically depend on your application.
It is a fact that Matlab essentially is slower than OpenCV, but you shouldn't forget approaches for speeding up runtime in Matlab.
On the other side, OpenCV shares many useful utilities which is not included in Matlab, like faster platform and efficient results.
If you are new in computer vision, it is better to start with Matlab. when you get enough information about implementing computer vision programs, you can go to the OpenCV and improve your skills there.
Why not get the best of both worlds? Use OpenCV with Python. Python is as easy to program as MATLAB, and you can take adventage of the fast C/C++ functions of OpenCV. The python bindings are not complete, but are quite extensive. I wish they implement the GPU functionality.
it depend on your programmation skills. Matlab is so easy to begin with for testing and get faster results but when we speek about the running time of programs , Matlab is often a bit slower at execution time comparing to OpenCV .
However, we can use both of them by using Mexopenc in Matlab ( a collection and a development kit of matlab mex functions for OpenCV library.)
Use OpenCV when you know what transformation is required, use Matlab when you need to research what needs to be done. In most cases, it translates to using Matlab, or at least Scilab, an open source matlab alternative, whenever you can, and switching to a production library only when you know which approach works, for the simple reason that a production language can turn your research into a scaffold building project unless you have narrowed down your search space.
From the other hand, Matlab rarely allows efficient programming, and your algorithm most probably will differ when you finish porting it to C(++). Consequently, if you want an optimized algorithm, not bothering with Matlab will bring you effective code faster. However, either way you may soon find yourself experimenting with both packages, as most end up doing.
I totally agree with the first, very smart, answer by Annette Morales-González. I can add that when I used OpenCV around 2003-2004, together with the IPP Intel library of low-level image routines, the functions were not so well documented, neither very accurate. And the call of IPP routines from OpenCV was not so convivial. so it was more than just a longer programming time in C:C++. It was also a lot of little bugs to solve with OpenCV and IPP. Hopefully, there were excellent russian software engineers at the Intel support who helped me a lot.
I would prefer for prototyping: Phyton Opencv combination or Matlab
and for developing, were high performance is important: OpenCV, Intel IPP.
Another interesting language, which I'm using in my application orientend projects is the auto-parallelization language Single Assignment C (SAC). Using that you can compile your programs to CPU or GPU, with less knowlegde about parallelization concepts or HW-architecture. The style of the language is C/Matlab like.
If you want to work only on computers and simulators and need to just test the results then Matlab is very good cum easy option. But if you want to work on different devices , for eg Mobile phone then Open CV is required at certain point of time as Matlab have its own limitation/s.