Octave

MATLAB is great, I love it, but it is expensive. GNU Octave is a very viable alternative. Octave runs under Linux, Windows and Mac OS X.

In recent times the Octave project has become increasingly active and a number of toolboxes, including an image processing toolbox, are being built up. I have been impressed to find that many of my functions run under Octave with little or no modification. Most of the changes needed are due to the fact that plotting and visualization of data under Octave are not as well developed as they are under MATLAB. As far as image processing is concerned the major difficulty is the inability to overlay plots on an image. Functions with no plotting, or simple plotting commands, will often run with no change.

For computer vision work you want version 2.1.71 or greater. I suggest you check the following links

Please do not mail me about any Octave installation problems, I will not know how to help you. You should refer to the appropriate FAQ pages.


Notes on code modifications to provide Octave compatibility

In some cases I have had to create slightly different execution paths for Octave and MATLAB. To detect whether the code is running under Octave I am using the following crude test.
  v = version; Octave = v(1)<'5';  % Crude Octave test    
The value Octave will be 1 if the first character of the version string is less than '5', and 0 otherwise. This assumes that it will be a while before Octave gets to version 5 and it assumes most MATLAB users have version 5 or greater.

While MATLAB allows one to pass string arguments to functions without enclosing quotes and brackets, for example

  warning off
  axis equal
this is not (always) allowed under Octave. However, by writing code in the proper functional form such as
  warning('off');
  axis('equal')
compatibility under both MATLAB and Octave can be maintained.

Some additional functions to allow execution under Octave

Here are some functions I have had to write to allow execution of a number of my functions under Octave. These are mostly rather crude work arounds which will hopefully get better in time, or not be needed with future versions of Octave

(Place these in a directory that is not in your MATLAB path...)

A few gotchas to look out for