Opened 3 years ago

#9068 new defect

Smartblur filter: inccorct naming variance vs. standard deviation

Reported by: simgro Owned by:
Priority: normal Component: documentation
Version: unspecified Keywords: smartblur, gaussian, variance
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


The Documentation for smartblur filter states (
luma_radius, lr: ... specifies the variance of the gaussian filter used to blur the image.

This is not correct. From how the parameter is used, it is not the variance but the standard deviation of the gaussian filter (variance=std-deviation2).

As far as i can see, the naming error is actually inside the used function sws_getGaussianVec ( ) which has an input called 'variance' which is used as if it was the 'standard deviation' in line 01284:
vec->coeff[i]= exp(-dist*dist/(2*variance*variance)) / sqrt(2*variance*M_PI);
For reference, see e.g.,

Possible solution:
It might be best to change the documentation such that it correctly ready 'standard deviation'. To avoid confusion, also replace the name of the variable in the sws_getGaussianVec function. The documentation potentially has this error whenever the sws_getGaussianVec function is valled by some filter.

Change History (0)

Note: See TracTickets for help on using tickets.