[Insight-developers] Erosion/Dilation Speed Tests
Stephen R. Aylward
aylward@unc.edu
Sun, 11 May 2003 14:00:46 -0400
Hi,
I ran some speed tests to compare
itkObject[Erode|Dilate]MophologyImageFilter
with
itkBinary[Erode|Dilate]ImageFilter
These tests are contained in
Insight/Testing/Code/BasicFilters/itkObjectMophologyImageFilterTest
Data: 50x50x50, unsigned short image
Windows 2000 - compiled in MSVC++6 with RelWithDebInfo mode.
Pentium 4 Dual Pentium Xeon
Avg Time (sec) Avg Time (sec)
ObjectDilate 0.425 0.14
BinaryDilate 12.37 4.10
ObjectErode 0.035 0.015
BinaryErode 0.130 0.047
So, for Dilation the speedup is ~30x and for erosion the speedup is ~4x.
This puts ITK as
Note that ObjectErode is not a 100% compatible implementation of
erosion. You actually need to use (radius-1) for the ObjectErosion
filter to get the same result as with BinaryErosion - I did not do that
in the above tests - so ObjectErode is actually faster than reported.
What about swapping the names of these two filters? The
ObjectDilate/Erode filters assumes there are fixed (user specified)
foreground and background values. The BinaryDilate/Erode filters
perform tests on adjacent pixels to determine what value with which to
fill a dilation/erosion.
Stephen
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695