This, the third release of the Toolbox, represents over two decades of development. The last release was in 2005 and this version captures a large number of changes and extensions generated over the last two years which support my new book “Robotics, Vision & Control”.
The Machine Vision Toolbox (MVTB) provides many functions that are useful in machine vision and vision-based control. It is a somewhat eclectic collection reflecting my personal interest in areas of photometry, photogrammetry, colorimetry. It includes over 100 functions spanning operations such as image file reading and writing, acquisition, display, filtering, blob, point and line feature extraction, mathematical morphology, homographies, visual Jacobians, camera calibration and color space conversion.
The Toolbox, combined with MATLAB ® and a modern workstation computer, is a useful and convenient environment for investigation of machine vision algorithms. For modest image sizes the processing rate can be sufficiently “real-time” to allow for closed-loop control. Focus of attention methods such as dynamic windowing (not provided) can be used to increase the processing rate. With input from a firewire or web camera (support provided) and output to a robot (not provided) it would be possible to implement a visual servo system entirely in MATLAB
An image is usually treated as a rectangular array of scalar values representing intensity or perhaps range. The matrix is the natural datatype for MATLAB and thus makes the manipulation of images easily expressible in terms of arithmetic statements in MATLAB language. Many image operations such as thresholding, filtering and statistics can be achieved with existing MATLAB functions.
The Toolbox extends this core functionality with M-files that implement functions and classes, and mex-files for some compute intensive operations. It is possible to use mex-files to interface with image acquisition hardware ranging from simple framegrabbers to robots. Examples for firewire cameras under Linux are provided.
The routines are written in a straightforward manner which allows for easy understanding. MATLAB vectorization has been used as much as possible to improve efficiency, however some algorithms are not amenable to vectorization. If you have the MATLAB compiler available then this can be used to compile bottleneck functions. Some particularly compute intensive functions are provided as mex-files and may need to be compiled for the particular platform. This toolbox considers images generally as arrays of double precision numbers. This is extravagant on storage, though this is much less significant today than it was in the past.
This toolbox is not a clone of the Mathwork’s own Image Processing Toolbox (IPT) although there are many functions in common. This toolbox predates IPT by many years, is open-source, contains many functions that are useful for image feature extraction and control.
This third release of the Toolbox has been significantly extended to include classes to represent different types of cameras (perspective, fisheye, catadioptric and spherical), pose estimation, visual Jacobians and advanced segmentation techniques such as MSER and graph-based. The Toolbox also including Simulink models for PBVS and IBVS visual servoing systems for arm-type, mobile and flying robots.
Advantages of the Toolbox are that:
- the code is quite mature and provides a point of comparison for other implementations of the same algorithms;
- the routines are generally written in a straightforward manner which allows for easy understanding, perhaps at the expense of computational efficiency. If you feel strongly about computational efficiency then you can always rewrite the function to be more efficient, compile the M-file using the Matlab compiler, or create a MEX version;
- since source code is available there is a benefit for understanding and teaching.
Downloading the Toolbox
- Download it from here in zip format (.zip).
- The Toolbox is tested with MATLAB R2011a.
- To install the Toolbox simply unpack the archive which will create the directories (folders): vision, simulink, and common.
- Adjust your MATLABPATH to include this directory.
- Execute the startup file rvctools/startup_rvc.m and this will place the correct directories in your MATLAB path.
- The book Robotics, Vision & Control (Corke, 2011) is a detailed introduction to color, image geometry, image processing, feature extraction, multi-view geometry and vision-based control, all illustrated using the Machine Vision Toolbox for MATLAB.
- The manual vision.pdf is a printable document (around 200 pages). It is auto-generated from the comments in the MATLAB code and is fully hyperlinked: to external web sites, the table of content to functions, and the “See also” functions to each other.
- The Toolbox documentation also appears in the MATLAB help browser.
If you like the Toolbox and want to cite it please reference it as:
- P.I. Corke, “Robotics, Vision & Control”, Springer 2011, ISBN 978-3-642-20143-1. [bibtex]
The following are now quite old publications about the Toolbox and the syntax has changed considerably over time:
- P. Corke. Machine vision toolbox. IEEE Robotics and Automation Magazine, 12(4):16–25, Nov. 2005. [PDF]
- P.I. Corke, “MATLAB toolboxes: robotics and vision for students and teachers”, IEEE Robotics and Automation Magazine, Volume 14(4), December 2007, pp. 16-17 [PDF]
There is no support! This software is made freely available in the hope that you find it useful in solving whatever problems you have to hand. I am happy to correspond with people who have found genuine bugs or deficiencies but my response time can be long and I can’t guarantee that I respond to your email. I am very happy to accept contributions for inclusion in future versions of the toolbox, and you will be suitably acknowledged.
I can guarantee that I will not respond to any requests for help with assignments or homework, no matter how urgent or important they might be to you. That’s what your teachers, tutors, lecturers and professors are paid to do.
You might instead like to communicate with other users via the Google Group called which is a forum for discussion. You need to signup in order to post, and the signup process is moderated by me so allow a few days for this to happen. I need you to write a few words about why you want to join the list so I can distinguish you from a spammer or a web-bot.
There is also a frequently asked questions (FAQ) wiki page.
The Toolbox will not work with Octave. I like Octave and it is now quite sophisticated but there are just too many differences compared to vanilla MATLAB. You’re on your own with this.
- MATLAB and Octave Functions for Computer Vision and Image Processing (Peter Kovesi)
- MATLAB functions for multi-view geometry (Visual Geometry Group, Oxford)
- VLFeat.org: open source vision algorithms in MATLAB (Andrea Vedaldi & Brian Fulkerson)
- Camera calibration toolbox for MATLAB (Jean-Yves Bouguet)
- OpenCV C, C++, Python (Willow Garage)
The machine vision toolbox developed slowly during the 1990s to assist in research related to visual servoing. The first release was in 1999, and the second in 2005 to coincide with a paper.
During the writing of the book the code grew in size and sophistication and made strong use of classes for cameras and image features.