Re: slow imread, multiframe tiffs
- From: "Vincent Bonin" <vincent@xxxxxxx>
- Date: Thu, 13 Sep 2007 17:06:49 +0000 (UTC)
The problem is there is tons of overhead in imread and
imwrite. You can increase performance by using the low-level
functions rtifc and wtifc you need to copy them from the
MATLAB tree to your working directory) but even that will be
much slower than ImageJ. ImageJ is just much better code.
Vincent
ImageJ is faster
runcyclexcski@xxxxxxxxx wrote in message
<1183066443.252459.208340@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
Hi all,trying again.
I posted this ~3 months ago and got no response. So I am
An average
I use matlab to read and analyze multiframe tiff images.
image is a 16 bit grayscale, 30 by 30 pixels, tens andhunreds of
thousands of images. I have problems with performance, tothe point
when I am considering re-writing the whole code in VC++.Can anyone
suggest a way to speed matlab up? Generate libs frommatlab and plug
them into VC++ code? I could even get a more powerful PCjust to save
myself time needed to re-write the code in a faster language.takes 6.1
Here are the details.
Iterative imread of a 1000 30x30 16 grayscale TIFF frames
seconds. This isimread(fifile,'tiff',index);
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 =
frames(1:height,(index-1)*width+1:difference
(index-1)*width+width) = frame;
end
toc
elapsed_time = 6.1100
In fact, not-preallocating the arrays does not make a big
(~25% slower?).called ImageJ
This is on Pentium M 1.86, 512 mB of RAM IBM laptop.
Loading this same tiff file in a image analysis program
(Java-based?) takes 0.8 seconds. I am not a Javaprogrammer, but the
Java source of ImageJ, and the matlab algorythms look thesame. 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: maximum variable size of repmat
- Next by Date: Re: maximum variable size of repmat
- Previous by thread: maximum variable size of repmat
- Next by thread: Re: slow imread, multiframe tiffs
- Index(es):
Relevant Pages
|