fastblur icon indicating copy to clipboard operation
fastblur copied to clipboard

Small typo in create_box_gauss in blur.rs?

Open niniack opened this issue 5 years ago • 1 comments

This probably has very little effect on the output, but I noticed that the + 1.0 was after the sqrt, whereas the blog post has it inside the sqrt

Original: let w_ideal = (12.0 * sigma * sigma / n_float).sqrt() + 1.0;

Suggested: let w_ideal = (12.0 * sigma * sigma / n_float + 1.0).sqrt();

niniack avatar Jul 08 '20 05:07 niniack

Just tested this on an example image with text (i.e. structures of high frequency). The corrected formula has a tremendous effect, when sigma is really small (below 10).

Original:

image

With erroneous formula:

image

With corrected formula:

image

Nevsden avatar Nov 02 '23 14:11 Nevsden