Technical Solutions
How can I improve the performance of the IMREAD function when reading a TIFF-file that has a large number of pages?
Date Last Modified: Friday, July 17, 2009
| Solution ID: | 1-6OTY4U | |
| Product: | MATLAB | |
| Reported in Release: | No Release | |
| Fixed in Release: | R2009a | |
| Platform: | All Platforms | |
| Operating System: | All OS |
Subject:
How can I improve the performance of the IMREAD function when reading a TIFF-file that has a large number of pages?
Problem Description:
I am using IMREAD to import multipage TIFF-files, using the:
I = imread(filename, k);
syntax, where "filename" contains the name of the file and "k" is the index of the page I am reading.
I find that this operation takes more time if "k" is large. As a result, importing all the pages of a TIFF-file with many pages, as in:
for k = 1:K
where "K" is the number of pages in the file, can take a significant amount of time, because of the large amount of time needed to import each page near the end of the file.
I{k} = imread(filename, k);
end
Solution:This issue has been addressed in MATLAB 7.8 (R2009a). The fix requires the use of a new syntax in order to get improved performance: Rename the file to imread.m.old 5. Download the attached "imread.m" file. Place the new file(s) in the same directory mentioned in step 4. 6. Repeat the analogous process with each of the files: These replacement files (from the attached "private.zip") will go in the same directory as the old files:
7. Restart MATLAB 8. After restarting MATLAB, issue the following command at the MATLAB command prompt:
rehash toolboxcache
|
Related Documents/Files:
|
|
Store

