[Insight-developers] Gaussian filter performance: Ver 2.0
Paul Yushkevich
pauly@cognitica.com
Mon, 12 May 2003 17:46:47 -0400
This is a multi-part message in MIME format.
--------------010402070201010505020408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I ran a more comprehensive test of Gaussian filter performance. Here is
the experiment that I ran:
For a range of values of scale (meaning standard deviation), I compared
the computation and output of DiscreteGaussianImageFilter (DGIF) and
RecursiveGaussianImageFilter, as applied to a 3D volume. A range of
DGIF's MaximumError values was used.
For each scale, I computed what I considered the 'ground truth' Gaussian
convolution of the image. For this ground truth I used DGIF with a
value of MaximumError low enough not to generate exceptions, i,e, fit
into a 32x32x32 pixel box. I then computed convolutions using DGIF with
larger error rates and using the RGIF.
I compared the result of each such convolution to the 'ground truth'
image for its scale. I recorded the mean squared error, the maximum
absolute error and the bias of the result w.r.t. the ground truth. The
attached file contains a table of results.
The punchline (at least for the image that I used) is this:
*** For sigma < 1 pixel, the RGIF should not be used
*** For sigma >= 3 pixels, the RGIF gives errors on the same order as
the DGIF with MaximumError = 0.01, and RGIF is an order of magnitude
faster, so unless great precision is required, the RGIF should be used.
*** For sigma between 1 and 3 pixels, there is a tradeoff between RGIF
and DGIF in terms of speed and performance.
Sorry, I did not use the VTK Gaussian in this experiment. My intuition
from the last round of experiments that it performs more or less as well
as the DGIF for the same error rates.
Paul.
--------------010402070201010505020408
Content-Type: text/plain;
name="gaussresult.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gaussresult.txt"
=========================================================================
Starting Experiment; Scale = 0.1
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 188 0 0 0
DG 0.0141421 188 0 0 0
DG 0.02 203 0 0 0
DG 0.0282843 204 0 0 0
DG 0.04 203 0 0 0
DG 0.0565685 203 0 0 0
DG 0.08 203 0 0 0
DG 0.113137 203 0 0 0
DG 0.16 187 0 0 0
DG 0.226274 187 0 0 0
DG 0.32 187 0 0 0
DG 0.452548 188 0 0 0
RG 0.00 141 1.2437e+007 16797.4 3370.01
.......................................................................
=========================================================================
Starting Experiment; Scale = 0.141421
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 203 0 0 0
DG 0.0141421 187 0 0 0
DG 0.02 203 0 0 0
DG 0.0282843 187 0 0 0
DG 0.04 187 0 0 0
DG 0.0565685 203 0 0 0
DG 0.08 203 0 0 0
DG 0.113137 187 0 0 0
DG 0.16 187 0 0 0
DG 0.226274 203 0 0 0
DG 0.32 203 0 0 0
DG 0.452548 187 0 0 0
RG 0.00 125 1.46715e+006 5767.68 1156.73
.......................................................................
=========================================================================
Starting Experiment; Scale = 0.2
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 187 0 0 0
DG 0.0141421 187 0 0 0
DG 0.02 203 0 0 0
DG 0.0282843 203 0 0 0
DG 0.04 187 0 0 0
DG 0.0565685 187 0 0 0
DG 0.08 188 0 0 0
DG 0.113137 203 0 0 0
DG 0.16 187 0 0 0
DG 0.226274 188 0 0 0
DG 0.32 188 0 0 0
DG 0.452548 203 0 0 0
RG 0.00 141 153193 1870.67 373.782
.......................................................................
=========================================================================
Starting Experiment; Scale = 0.282843
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 203 0 0 0
DG 0.0141421 203 0 0 0
DG 0.02 188 0 0 0
DG 0.0282843 188 0 0 0
DG 0.04 203 0 0 0
DG 0.0565685 204 0 0 0
DG 0.08 188 0 0 0
DG 0.113137 188 0 0 0
DG 0.16 188 0 0 0
DG 0.226274 203 0 0 0
DG 0.32 203 0 0 0
DG 0.452548 188 0 0 0
RG 0.00 125 10800.1 506.45 99.1968
.......................................................................
=========================================================================
Starting Experiment; Scale = 0.4
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 188 0.0106911 2.1805 -7.28438e-005
DG 0.0141421 187 0.0106911 2.1805 -7.28438e-005
DG 0.02 187 0.0106911 2.1805 -7.28438e-005
DG 0.0282843 203 0.0106911 2.1805 -7.28438e-005
DG 0.04 203 0.0106911 2.1805 -7.28438e-005
DG 0.0565685 187 0.0106911 2.1805 -7.28438e-005
DG 0.08 187 0.0106911 2.1805 -7.28438e-005
DG 0.113137 203 0.0106911 2.1805 -7.28438e-005
DG 0.16 203 0.0106911 2.1805 -7.28438e-005
DG 0.226274 187 0.0106911 2.1805 -7.28438e-005
DG 0.32 187 0.0106911 2.1805 -7.28438e-005
DG 0.452548 188 0.0106911 2.1805 -7.28438e-005
RG 0.00 141 245.07 82.8246 14.8749
.......................................................................
=========================================================================
Starting Experiment; Scale = 0.565685
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 281 0 0 0
DG 0.0141421 281 0 0 0
DG 0.02 203 0.0933394 6.53308 -0.000586393
DG 0.0282843 203 0.0933394 6.53308 -0.000586393
DG 0.04 188 0.0933394 6.53308 -0.000586393
DG 0.0565685 188 0.0933394 6.53308 -0.000586393
DG 0.08 203 0.0933394 6.53308 -0.000586393
DG 0.113137 204 0.0933394 6.53308 -0.000586393
DG 0.16 188 0.0933394 6.53308 -0.000586393
DG 0.226274 188 0.0933394 6.53308 -0.000586393
DG 0.32 204 0.0933394 6.53308 -0.000586393
DG 0.452548 203 0.0933394 6.53308 -0.000586393
RG 0.00 125 0.418091 8.767 0.546951
.......................................................................
=========================================================================
Starting Experiment; Scale = 0.8
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 281 0.0115421 2.05312 0.000426136
DG 0.0141421 281 0.0115421 2.05312 0.000426136
DG 0.02 266 0.0115421 2.05312 0.000426136
DG 0.0282843 282 0.0115421 2.05312 0.000426136
DG 0.04 266 0.0115421 2.05312 0.000426136
DG 0.0565685 282 0.0115421 2.05312 0.000426136
DG 0.08 203 0.717016 17.8511 0.00109266
DG 0.113137 188 0.717016 17.8511 0.00109266
DG 0.16 187 0.717016 17.8511 0.00109266
DG 0.226274 203 0.717016 17.8511 0.00109266
DG 0.32 203 0.717016 17.8511 0.00109266
DG 0.452548 187 0.717016 17.8511 0.00109266
RG 0.00 125 0.250014 10.6837 -0.0297057
.......................................................................
=========================================================================
Starting Experiment; Scale = 1.13137
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 375 0 0 0
DG 0.0141421 391 0 0 0
DG 0.02 375 0 0 0
DG 0.0282843 391 0 0 0
DG 0.04 266 0.154047 6.6839 0.000291375
DG 0.0565685 281 0.154047 6.6839 0.000291375
DG 0.08 281 0.154047 6.6839 0.000291375
DG 0.113137 281 0.154047 6.6839 0.000291375
DG 0.16 281 0.154047 6.6839 0.000291375
DG 0.226274 187 3.29735 35.7973 0.00248762
DG 0.32 188 3.29735 35.7973 0.00248762
DG 0.452548 203 3.29735 35.7973 0.00248762
RG 0.00 141 0.109526 7.32904 0.0104968
.......................................................................
=========================================================================
Starting Experiment; Scale = 1.6
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 500 0.0102285 1.2597 0.0013039
DG 0.0141421 500 0.0102285 1.2597 0.0013039
DG 0.02 500 0.0102285 1.2597 0.0013039
DG 0.0282843 500 0.0102285 1.2597 0.0013039
DG 0.04 375 0.198185 6.11504 0.00411568
DG 0.0565685 375 0.198185 6.11504 0.00411568
DG 0.08 375 0.198185 6.11504 0.00411568
DG 0.113137 265 1.9064 20.6642 0.00728438
DG 0.16 281 1.9064 20.6642 0.00728438
DG 0.226274 281 1.9064 20.6642 0.00728438
DG 0.32 266 1.9064 20.6642 0.00728438
DG 0.452548 203 11.8848 63.1403 0.00904356
RG 0.00 141 0.0254215 2.92197 0.00182838
.......................................................................
=========================================================================
Starting Experiment; Scale = 2.26274
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 813 0.00440759 0.626274 0.00179196
DG 0.0141421 828 0.00440759 0.626274 0.00179196
DG 0.02 657 0.0590506 2.44234 0.00468386
DG 0.0282843 672 0.0590506 2.44234 0.00468386
DG 0.04 656 0.0590506 2.44234 0.00468386
DG 0.0565685 500 0.424522 7.35545 0.0105951
DG 0.08 484 0.424522 7.35545 0.0105951
DG 0.113137 484 0.424522 7.35545 0.0105951
DG 0.16 391 2.18125 19.278 0.0187791
DG 0.226274 390 2.18125 19.278 0.0187791
DG 0.32 282 8.69911 44.1795 0.0260052
DG 0.452548 266 8.69911 44.1795 0.0260052
RG 0.00 141 0.00923357 1.42459 0.0044544
.......................................................................
=========================================================================
Starting Experiment; Scale = 3.2
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 1250 0.00697789 0.5718 0.0037296
DG 0.0141421 1235 0.00697789 0.5718 0.0037296
DG 0.02 1235 0.00697789 0.5718 0.0037296
DG 0.0282843 1016 0.0624751 1.81568 0.00942599
DG 0.04 1015 0.0624751 1.81568 0.00942599
DG 0.0565685 812 0.307984 4.40639 0.0177338
DG 0.08 829 0.307984 4.40639 0.0177338
DG 0.113137 656 1.1483 9.61236 0.0300991
DG 0.16 500 3.55769 19.5879 0.0438228
DG 0.226274 516 3.55769 19.5879 0.0438228
DG 0.32 390 9.57769 36.6619 0.0583078
DG 0.452548 281 23.0746 68.1107 0.0687864
RG 0.00 125 0.00776335 0.935684 0.00994682
.......................................................................
=========================================================================
Starting Experiment; Scale = 4.52548
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 2515 0.00198431 0.236702 0.00351471
DG 0.0141421 2141 0.0146936 0.643375 0.00794726
DG 0.02 2015 0.0146936 0.643375 0.00794726
DG 0.0282843 1891 0.0611564 1.28923 0.0157124
DG 0.04 1563 0.198504 2.28215 0.0278191
DG 0.0565685 1547 0.198504 2.28215 0.0278191
DG 0.08 1313 0.552433 3.97094 0.0443291
DG 0.113137 1109 1.3724 6.69069 0.0643502
DG 0.16 844 3.116 11.4691 0.0857008
DG 0.226274 657 6.56929 19.6927 0.107503
DG 0.32 516 13.0054 32.8529 0.129189
DG 0.452548 375 24.4292 52.5973 0.146544
RG 0.00 140 0.0036548 0.38047 0.0144959
.......................................................................
=========================================================================
Starting Experiment; Scale = 6.4
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 4156 0.000981629 0.166319 0.00559805
DG 0.0141421 3765 0.00599587 0.408905 0.0123179
DG 0.02 3312 0.020619 0.752639 0.0210409
DG 0.0282843 2984 0.0559046 1.20383 0.0328307
DG 0.04 2641 0.132533 1.79782 0.0475306
DG 0.0565685 2297 0.287421 2.71187 0.0651515
DG 0.08 2015 0.583861 3.998 0.0865749
DG 0.113137 1750 1.12769 5.61981 0.111557
DG 0.16 1468 2.09049 7.71494 0.139751
DG 0.226274 1250 3.7357 10.1446 0.169646
DG 0.32 812 10.7828 17.1529 0.235894
DG 0.452548 657 17.5401 26.7915 0.264729
RG 0.00 125 0.00311906 0.285658 0.0127586
.......................................................................
=========================================================================
Starting Experiment; Scale = 9.05097
Filter MaxError MS M.S.E Max Error Bias
.......................................................................
DG 0.01 7422 0.00494722 0.382815 0.022476
DG 0.0141421 6578 0.011931 0.598822 0.0341346
DG 0.02 5906 0.0252543 0.875674 0.0483428
DG 0.0282843 5547 0.0491581 1.21272 0.0648274
DG 0.04 5031 0.0901543 1.64344 0.0840763
DG 0.0565685 4140 0.266585 2.88714 0.130944
DG 0.08 3766 0.435848 3.70605 0.158912
DG 0.113137 2985 1.07552 5.78397 0.220903
DG 0.16 2657 1.63565 7.03142 0.254225
DG 0.226274 2031 3.60399 9.71047 0.331166
DG 0.32 1469 7.61121 14.1225 0.413775
DG 0.452548 1016 15.67 20.6054 0.497119
RG 0.00 140 0.00158891 0.23814 0.00849359
.......................................................................
--------------010402070201010505020408--