which TIFF's are supported by imread?
Show older comments
On the Matlab help page about imread
there are a paragraph and a table with format-specific information about the TIFF format. The table is supposed to list the supported TIFF by bit/sample and compression type. The entries in the table are either y or -. At first I thought that y means "supported" and - means "not supported". However, I noticed that the 12-bit and 16-bit rows hold only -'s. That would mean that the 12-bit and 16-bit formats are not supported at all. But then why including those rows in the table if they are not completely unsupported. I would greatly appreciate if anybody can explain with certainty how that table is to be read. Thanks.
3 Comments
John
on 10 Jul 2012
Thanks for pointing that out, the table is not very clear at all, is it? We'll get to work to fix that.
Basically, both IMREAD and the Tiff class should be able to read 16-bit TIFFs that obey the TIFF spec. IMREAD can also read some 12-bit TIFFs, although I don't see those too much, other than sometimes showing up in DNG subIFDs. The Tiff class cannot currently read 12-bit TIFF images.
Image Analyst
on 10 Jul 2012
Then what benefits, if any, does the Tiff class have over imread()? I guess if you need to extract out some tiff tags (meta data) for example? But if you don't need to do that, then just use imread()?
John
on 10 Jul 2012
For most users, IMREAD is probably the better tool for reading TIFFs because it requires the fewest steps to get what most people would want. There are a couple of cases where the behavior of IMREAD differs from that of the Tiff class, such as in reading CIELab, YCbCr, MinIsWhite, or LogLuv images.
The big benefit to the Tiff class is in creating TIFF content. IMWRITE only gives you access to a very limited number of tags, whereas the TIFF class handles over 70, some of these being "pseudo tags" that control how various libtiff codecs work. The Tiff class also allows you to define tiled TIFFs and create subdirectories, where IMWRITE does not.
Answers (2)
Image Analyst
on 9 Jul 2012
0 votes
I don't know, but maybe you can try the newer "Tiff" class - it probably handles more flavors of tiff than the generic imread(), though I'm not sure.
Walter Roberson
on 10 Jul 2012
0 votes
Generally speaking, the tables list all formats supported by the standards for that image type. The rows that contain only unsupported entries are needed in order to show that they are unsupported, as otherwise people would be left not being sure.
Categories
Find more on Image Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!