blur - svg feGaussianBlur: correlation between stdDeviation and size -
when blur object in inkscape let's 10%, get's filter fegaussionblur stddeviation of 10% * size / 2.
filter has size of 124% (it big, inkscape doesn't add bit on safe-side).
where number come from? guess 100% + 2.4 * (2*stddeviation/size)
, 2.4 come from?
from the svg 1.1 spec:
this filter primitive performs gaussian blur on input image. gaussian blur kernel approximation of normalized convolution:
g(x,y) = h(x)i(y) h(x) = exp(-x2/ (2s2)) / sqrt(2* pis2) , i(y) = exp(-y2/ (2t2)) / sqrt(2 pi*t2)
with 's' being standard deviation in x direction , 't' being standard deviation in y direction, specified ‘stddeviation’.
the value of ‘stddeviation’ can either 1 or 2 numbers. if 2 numbers provided, first number represents standard deviation value along x-axis of current coordinate system , second value represents standard deviation in y. if 1 number provided, value used both x , y.
even if 1 value provided ‘stddeviation’, can implemented separable convolution.
for larger values of 's' (s >= 2.0), approximation can used: 3 successive box-blurs build piece-wise quadratic convolution kernel, approximates gaussian kernel within 3%.
let d = floor(s * 3*sqrt(2*pi)/4 + 0.5)
... if d odd, use 3 box-blurs of size 'd', centered on output pixel. ... if d even, 2 box-blurs of size 'd' (the first 1 centered on pixel boundary between output pixel , 1 left, second 1 centered on pixel boundary between output pixel , 1 right) , 1 box blur of size 'd+1' centered on output pixel.
note: approximation formula applies correspondingly 't'.*
Comments
Post a Comment