Steve on Image Processing
September 6th, 2007
R2007b
Sharp-eyed readers of my previous post might have noticed the "Published with MATLAB® 7.5" footer at the end of the example. That's right, as Loren posted earlier this week, R2007b is now traveling the world via plane, truck, and TCP/IP.
The new version of MATLAB is 7.5. Follow this link for the full release notes. Some of the new MATLAB features and enhancements might be of particular interest to readers of this blog:
- Reading TIFF files using imread has been significantly enhanced. imread now supports reading TIFF files with JPEG, LZW, and Deflate compression. It also now supports any number of samples per pixel and bits per sample. And memory use has been greatly reduced when you use the 'PixelRegion' parameter to read in a subset of a TIFF file.
- A new mmreader video file reader object for Windows platforms supports formats such as AVI, MPEG, and WMV, and adds the ability to read additional video codecs that aviread does not support.
- You can now make and operate on much larger arrays if you have sufficient memory and are running on a 64-bit OS. Previously, arrays were limited to 231 - 2 elements. [Updated September 11, 2007] The new limit is 248 - 1.
Here are some other enhancements in the new MATLAB release that happened to catch my eye:
- On Windows and Macintosh, fonts in the MATLAB Desktop are now antialiased according to system settings. It looks a lot better on my LCD monitor!
- The editor supports code folding. Using this feature you can collapse and expand subfunctions and their associated help.
- You can set the number of computational threads programmatically using maxNumComputationalThreads.
- There are several incremental improvements to marking up text in cells, such as using HTML and LaTeX markup. (I like these improvements a lot, since I regularly use publish to generate posts for this blog.)
- mlint can now show you the McCabe complexity metric for functions in your M-files. I have sometimes called this the "magic metric," and our team regularly uses it to improve the quality of our code. I talked about this metric in a presentation I gave last year at the International Conference on Image Processing. See pages 32-36 of my presentation for more information.
There are lots more. I encourage you to skim the release notes to discover which other features interest you.
R2007b also includes major new updates of Image Processing Toolbox and Image Acquisition Toolbox, as well a minor update of Video and Image Processing Blockset. I'll write about these releases a little later.
Enjoy!
12:17 UTC |
Posted in Uncategorized |
Permalink |
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
Leave a Reply
|
|
just curious, why is the limit on number of elements 2^48 - 1? 2^64 - 1 would seem more natural.
what functions does maxNumComputationalThreads affect? just BLAS and LAPACK calls, or will other matlab functions utilize more than 1 thread?
Noel—Good questions. It is occasionally necessary in some computations and algorithms to do signed arithmetic on array offsets. That requires a sign bit, so now we’re down to 2^63. But really, the current limitation is imposed by processor architectures. My secret source on the core architecture team (thanks, GW) tells me that none of the current 64-bit processor architectures supports 64-bit pointer arithmetic, and some support only 48 bits. So 2^48 is a hardware limitation. The software limitation inside MATLAB code is now 2^63.
Here’s what the documentation says about multithreaded computation in MATLAB: “multithreaded computation in MATLAB speeds up elementwise computations such as those done by the sin and log functions, and computations that use the Basic Linear Algebra Subroutines (BLAS) library, such as matrix multiply.” I expect additional computations to be revised to exploit multithreaded operation in future releases. That is, every 6 months!
ah cool thanks. so i guess that suggests some change in implementation, since the 2007a limit was 2^32 (maximum size of a 4 byte integer), not 2^31 (maximum offset from a signed 4 byte pointer).
a somewhat unrelated question: does/will matlab use the intel TBB anywhere for its multithreaded functions? if that magically is the case, then it would help out a bunch if those headers/binaries/environment variables were distributed in the 2007b matlab installation. we have a bunch of mex files that use the intel TBB, so it would save some effort on installing those libraries if it came for free with the matlab install.
Noel—The previous limit was 231 - 2.
I am not aware of any use of the Intel Threading Building Blocks library in MATLAB.
So, I can finally read in 12-bit TIFF files? That’s been on my wishlist for years, because we use 12-bit CCD cameras. I’m looking forward to trying this out.
Evan—imread has been able to read 12-bit TIFFs for several years already.
Actually, what would have been needed is a complete rewrite of imread and imwrite. These have excessive overhead which prevents their use for large images stacks or sequences. For TIFF files, I have been using the low-level functions rtifc and wtifc instead but these also have much overhead. For example, when writing a TIFF stack, wtifc open and closes the TIFF file for every frame added to the stack. The consequence is that the time required to write a stack grows linearly with the size of the stack. This is a major hurdle when dealing with large data sets (tens to hundreds of thousands of images). Anyone aware of a faster library for handling TIFF images?
Vincent—See my blog post today, or my response to your comp.soft-sys.matlab newsgroup post.