Object Tracking: MATLAB vs. Python Numpy
Python (with NumPy, SciPy and MatPlotLib) is the new Matlab. So I strongly recommend Python over Matlab.
I made the change over a year ago and I am very happy with the results.
Here it is a short pro/con list for Python and Matlab
Python pros:
- Object Oriented
- Easy to write large and "real" programs
- Open Source (so it's completely free to use)
- Fast (most of the heavy computation algorithms have a python wrapper to connect with C libraries e.g. NumPy, SciPy, SciKits, libSVM, libLINEAR)
- Comfortable environment, highly configurable (iPython, python module for VIM, ...)
- Fast growing community of Python users. Tons of documentation and people willing to help
Python cons:
- Could be a pain to install (especially some modules in OS X)
- Plot manipulation is not as nice/easy as in Matlab, especially 3D plots or animations
- It's still a script language, so only use it for (fast) prototyping
- Python is not designed for multicore programming
Matlab pros:
- Very easy to install
- Powerful Toolboxes (e.g. SignalProcessing, Systems Biology)
- Unified documentation, and personalized support as long as you buy the licence
- Easy to have plot animations and interactive graphics (that I find really useful for running experiments)
Matlab cons:
- Not free (and expensive)
- Based on Java + X11, which looks extremely ugly (ok, I accept I'm completely biased here)
- Difficult to write large and extensible programs
- A lot of Matlab users are switching to Python :)
I would recommend python.
I switched from MATLAB -> python about 1/2 way through my phd, and do not regret it. At the most simplistic, python is a much nicer language, has real objects, etc.
If you expect to be doing any parts of your code in c/c++ I would definitely recommend python. The mex interface works, but if your build gets complicated/big it starts to be a pain and I never sorted out how to effectively debug it. I also had great difficulty with mex+allocating large blocks interacting with matlab's memory management (my inability to fix that issue is what drove me to switch).
As a side note/self promotion, I have Crocker-Grier in c++ (with swig wrappers) and pure python.
If you're experienced with both languages it's not really a decision criterion.
Matlab has problems coping with real time settings especially since most computer vision algorithms are very costly. This is the advantage of using a tried and tested library such as OpenCV where many of the algorithms you'll be using are efficiently implemented. Matlab offers the possibility of compiling code into Mex-files but that is a lot of work.
Matlab has parallel for loops
parfor
which makes multicore processing easy (or at least easier). But the question is if that will suffice to get real-time speeds.No comment.
The main advantage of Matlab is that you'll obtain a running program very quickly due to its good documentation. But I found that code reusability is bad with Matlab unless you put a heavy emphasis on it.
I think the final decision has to be if you have to/can run your algorithm real-time which I doubt in Matlab, but that depends on what methods you're planning to use.