Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object Tracking: MATLAB vs. Python Numpy

I will soon be starting a final year Engineering project, consisting of the real-time tracking of objects moving on a 2D-surface. The objects will be registered by my algorithm using feature extraction.

I am trying to do some research to decide whether I should use MATLAB or use Python Numpy (Numerical Python). Some of the factors I am taking into account:

1.) Experience

I have reasonable experience in both, but perhaps more experience in image processing using Numpy. However, I have always found MATLAB to be very intuitive and easy to pick up.

2.) Real-Time abilities

It is very important that my choice be able to support the real-time acquisition of video data from an external camera. I found this link for MATLAB showing how to do it. I am sure that the same would be possible for Python, perhaps using the OpenCV library?

3.) Performance

I have heard, although never used, that MATLAB can easily split independent calculations across multiple cores. I should think that this would be very useful, and I am not sure whether the same is equally simple for Numpy?

4.) Price

I know that there is a cost associated with MATLAB, but I will be working at a university and thus will have access to full MATLAB without any cost to myself, so price is not a factor.

I would greatly appreciate any input from anyone who has done something similar, and what your experience was. Thanks!

like image 922
hjweide Avatar asked Jun 21 '12 07:06

hjweide


1 Answers

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 :)
like image 59
Oriol Nieto Avatar answered Sep 18 '22 23:09

Oriol Nieto