Re: slow imread, multiframe tiffs



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,

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.


.



Relevant Pages

  • Re: slow imread, multiframe tiffs
    ... I use matlab to read and analyze multiframe tiff images. ... Loading this same tiff file in a image analysis program called ImageJ ... I'm wondering if your comparison is really "apples to apples." ...
    (comp.soft-sys.matlab)
  • Re: Multi-layer/Photoshop vs multi-slice/ImageJ
    ... Photoshop CS2 and read it in with ImageJ v1.37 and it read in but all ... unless you only got the first layer). ... Adobe is the keeper/administrator of the TIFF standard. ...
    (sci.image.processing)
  • Re: Image processing prototype software
    ... two main complaints I have against MATLAB are no user interface ... Optimas (a now defunct package that had a lot of higher level ... ImageJ has a fairly user friendly user interface, ... time and cost as compared to getting a different package, ...
    (sci.image.processing)
  • Re: How to count cells
    ... You can use ImageJ. ... - But you can also use Matlab. ... Run Watershed algorithm to obtain image #2 (only contains output from ... Analyze cells by hand or by using a particle counter (see plugins for ...
    (sci.techniques.microscopy)
  • Multi-layer/Photoshop vs multi-slice/ImageJ
    ... Can anybody explain me the compatibility between Adobe Photoshop multi- ... layer tiffs and ImageJ stacks? ... If I create multi-layer tiff in Adobe ...
    (sci.image.processing)