[Insight-users] erosion performance for binary images
Harvey Cline
harvey.cline at kitware.com
Fri Jun 5 15:51:30 EDT 2009
Hi all
A fast binary erosion algorithm strips layers from the surface structure
using a unit cross structure factor multiple times to construct a large
effective radius. The dilation adds surface layers. A region iterator or
pointer is used for implementation speed. While the algorithm is very fast,
there are facetts in the large structure factor.
Harvey Cline
On Fri, Jun 5, 2009 at 10:03 AM, <M.Staring at lumc.nl> wrote:
> Hi all (Gaetan),
>
> I am wondering what is the fastest performing filter for the erosion of 3D
> *binary* data.
>
> I have tried the BinaryErodeImageFilter and the several flavours of erosion
> filters from the review directory (OptGrayscaleErodeImageFilter: BASIC,
> HISTO, VHGW, ANCHOR), contributed by Gaetan, on a large (512x512x142)
> binary 3D dataset. These new filters, which I expected to be much
> faster, appeared to be slower. I think that is because these filters are all
> suitable for grayscale images, so they are "too general" for my problem. Do
> you think that assumption is correct?
>
> Here are some performance numbers:
>
> Ball radius: 1
> Elapsed time erosion_binary: 5.422s.
> Elapsed time erosion basic: 1.875s.
> Elapsed time erosion HISTO: 11.86s.
> Elapsed time erosion VHGW: 17.734s.
> Elapsed time erosion Anchor: 33.891s.
> Ball radius: 2
> Elapsed time erosion_binary: 5.704s.
> Elapsed time erosion basic: 9.312s.
> Elapsed time erosion HISTO: 26.954s.
> Elapsed time erosion VHGW: 13.031s.
> Elapsed time erosion Anchor: 33.484s.
> Ball radius: 4
> Elapsed time erosion_binary: 6.453s.
> Elapsed time erosion basic: 67.047s.
> Elapsed time erosion HISTO: 82.063s.
> Elapsed time erosion VHGW: 43.719s.
> Elapsed time erosion Anchor: 44.75s.
> Ball radius: 8
> Elapsed time erosion_binary: 9.547s.
> Elapsed time erosion basic: 603.593s.
> Elapsed time erosion HISTO: 299.89s.
> Elapsed time erosion VHGW: 13.062s.
> Elapsed time erosion Anchor: 37.094s.
> Ball radius: 16
> Elapsed time erosion_binary: 21.625s.
> Elapsed time erosion basic: too slow
> Elapsed time erosion HISTO: too slow
> Elapsed time erosion VHGW: 17.922s.
> Elapsed time erosion Anchor: 37.5s.
> Ball radius: 32
> Elapsed time erosion_binary: 70.391s.
> Elapsed time erosion VHGW: 44.375s.
> Elapsed time erosion Anchor: 57.875s.
> where the BinaryErodeImageFilter is single-threaded and the other ones
> multi-threaded ( I used 4 cores on my pc).
>
> So, as I currently understand the BinaryErodeImageFilter is the fastest
> one for this task up till a radius of 8-16, even though it is
> single-threaded. After that the VanHerkGilWerman method takes over, probably
> due to it's multi-threadedness. Does anyone know of an erosion filter
> potentially faster than the BinaryErodeImageFilter, that I missed? Does
> anyone have a multi-threaded version of the BinaryErodeImageFilter lying
> around?
>
> When I set ITK_USE_CONSOLIDATED_MORPHOLOGY to true, the base class of
> BinaryErodeImageFilter, namely BinaryMorphologyImageFilter is replaced by
> an optimized version. However, this does not seem to change anything, since
> the GenerateData() of BinaryErodeImageFilter is not overridden. Was it
> supposed to change?
>
> Thanks for you advise/comments,
>
>
> Marius Staring
> Division of Image Processing (LKEB)
> Department of Radiology
> Leiden University Medical Center
> PO Box 9600, 2300 RC Leiden, The Netherlands
> phone: +31 (0)71 526 1105, fax: +31 (0)71 526 6801
> m.staring at lumc.nl
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090605/6d47ffdd/attachment.htm>
More information about the Insight-users
mailing list