W3C home > Mailing lists > Public > www-svg@w3.org > June 2006

Gaussian Blur with very small stdDeviation

From: Alex Menzies <amenzie@us.ibm.com>
Date: Mon, 26 Jun 2006 16:01:55 -0600
To: www-svg@w3.org
Message-ID: <OF1CF7A4C3.D8A0E871-ON87257199.007888C5-06257199.007E32EB@us.ibm.com>
I have a question about the correct behavior of the Gaussian Blur filter 
when a very small stdDeviation is used.  The 1.1 SVG specification 
suggests using 3 box blurs with a size given by:
boxSize = floor (s * 3 * sqrt( 2 * pi) / 4 + 5)
in order to approximate a Gaussian Blur for s >= 2.0.  I am curious if 
anyone has some suggestions about how to handle the case when s < 2.0. One 
might be tempted to just assume the effect of the blur with a low value 
for s to be negligible, but such is not the case.  The following code 
shows an (extreme) example in which the light blue circle is blurred with 
a stdDeviation of 0.001 and scaled to a size where the blurring effect is 
noticeable (when rendered in Opera9beta, Batik, or IE Adobe plugin).  The 
yellow circle shows what an unblurred edge looks like for comparison. 

Thanks!
-Alex

<svg xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns="http://www.w3.org/2000/svg"> 
  <defs>
    <filter id="smallBlur">
      <feGaussianBlur in="SourceGraphic" stdDeviation="0.001"/>
    </filter>
  </defs>
  <circle cx="0" cy="0" r="1" fill="lightblue" filter="url(#smallBlur)" 
transform="scale(1200)"/>
  <circle cx="0" cy="0" r="1" fill="yellow" transform="scale(1100)"/>
</svg>
Received on Monday, 26 June 2006 21:58:39 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:34 GMT