Steve on Image Processing with MATLAB

Image processing concepts, algorithms, and MATLAB

Note

Steve on Image Processing with MATLAB has been archived and will not be updated.

Moving toolbox functions into MATLAB

I'm sorry to have disappeared off the blogging map the last couple of weeks. I got involved in some projects that needed many hours of uninterrupted, focused time, which somehow doesn't mesh well with keeping up with the blog. ;-)

Last week StephenLL commented on my "Five years of Image Processing Toolbox changes" post. Stephen said he'd like to see the function padarray moved into MATLAB.

I think that's a reasonable request.

There have been several cases in the past when we have moved Image Processing Toolbox functionality into MATLAB.

The first case was the image file reading and writing functions. When Image Processing Toolbox version 1.0 shipped in 1993, it included several pairs of functions for reading and writing image formats: tiffread, tiffwrite, bmpread, bmpwrite, etc. Pretty soon, users started complaining that we were charging them for a toolbox when all they wanted to do was read or write a TIFF file. So we decided to move the functionality into MATLAB. Based on our experience with the original functions, we also decided to present the functionality with redesigned interfaces. For example, we learned that it was frequently useful to be able to read the metadata from an image file without actually reading the image pixels. The new image I/O functions were imread, imwrite, and imfinfo, and they shipped with MATLAB 5.0 in 1997.

A simpler MATLAB move, similar to what Stephen is suggesting for padarray, happened a little bit later with circshift. This is one of the earliest cases I can remember where an Image Processing Toolbox function moved without modification into MATLAB. In this case, the first opportunity to ship the function was in a toolbox release, but it was written with the idea that it might go into MATLAB at some point.

The Image Processing Toolbox function ind2rgb moved into MATLAB a year or two after MATLAB 5.0. The driving factor here was the newly added ability to put image data onto user interface buttons in Handle Graphics. Users would read an indexed image from an indexed image file, for example, but then get stuck because the button wouldn't take the image data in indexed form.

The function rgb2ind eventually found its way from the toolbox into MATLAB also, but not until the R2009a release earlier this year. This change was motivated in part by the reintroduction of GIF format support a couple of years ago. Users wanted to write GIF files, but the GIF format supports only indexed images, and MATLAB users without the Image Processing Toolbox found it difficult to convert their truecolor images to indexed form.

Moving rgb2ind was actually a fairly complicated move. Conversion to indexed format is a complex calculation, and rgb2ind called several other Image Processing Toolbox functions to do portions of the work. So all of these functions moved over to MATLAB together with rgb2ind.

I wrote the original version of padarray and figured it might be a candidate for moving into MATLAB at some point. I can't really say for sure, though, whether and when that might happen. Such a function move affects product tests, reference pages, release notes, and so it requires coordination from several people and maybe a day or two of person-time. I suspect also that the current implementation may have some dependencies on other Image Processing Toolbox utility functions, so these dependencies would need to be resolved. It's not a huge amount of time, but then we never seem to have enough time to do everything we want to do with the product.

Anyway, thanks again, Stephen, for the suggestion.




Published with MATLAB® 7.8

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.