[Insight-users] erosion performance for binary images
Dan Mueller
dan.muel at gmail.com
Fri Jun 5 10:54:55 EDT 2009
Hi Marius,
Are you restricted to a ball structuring element? If a box structuring
element is a good enough approximation, in my experience VHGW
outclasses everything for "large" structuring elements (radius >= 2)
as it has constant time for increasing radius.
If you must use a ball structuring element, then your investigations
below seem applicable.
Regards,
Dan Mueller
Software Engineer
Healthcare Informatics, PII Development
Philips Healthcare Nederland B.V.
Veenpluis 4-6, Building QV-121
P.O. Box 10000, 5680 DA Best
The Netherlands
2009/6/5 <M.Staring at lumc.nl>:
> 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
>
>
More information about the Insight-users
mailing list