slow imread, multiframe tiffs
- From: runcyclexcski@xxxxxxxxx
- Date: Thu, 28 Jun 2007 14:34:03 -0700
Hi all,
I posted this ~3 months ago and got no response. So I am trying again.
I use matlab to read and analyze multiframe tiff images. An average
image is a 16 bit grayscale, 30 by 30 pixels, tens and hunreds of
thousands of images. I have problems with performance, to the point
when I am considering re-writing the whole code in VC++. Can anyone
suggest a way to speed matlab up? Generate libs from matlab and plug
them into VC++ code? I could even get a more powerful PC just to save
myself time needed to re-write the code in a faster language.
Here are the details.
Iterative imread of a 1000 30x30 16 grayscale TIFF frames takes 6.1
seconds. This is
despite the fact that I pre-allocate everything:
frames(height,width*i) = uint16(0);
frame(height,width) = uint16(0);
tic,
for index=1:i
frame = imread(fifile,'tiff',index);
frames(1:height,(index-1)*width+1:
(index-1)*width+width) = frame;
end
toc
elapsed_time = 6.1100
In fact, not-preallocating the arrays does not make a big difference
(~25% slower?).
This is on Pentium M 1.86, 512 mB of RAM IBM laptop.
Loading this same tiff file in a image analysis program called ImageJ
(Java-based?) takes 0.8 seconds. I am not a Java programmer, but the
Java source of ImageJ, and the matlab algorythms look the same. The
only difference is a factor of 10 in performance.
.
- Follow-Ups:
- Re: slow imread, multiframe tiffs
- From: Steve Eddins
- Re: slow imread, multiframe tiffs
- Prev by Date: Re: A PLOT WITH Y-TICK LABELS ON BOTH SIDES?
- Next by Date: non-monotonic data interpolation
- Previous by thread: Busy-Note in Gui while calculating
- Next by thread: Re: slow imread, multiframe tiffs
- Index(es):
Relevant Pages
|
Loading