fastblur
fastblur copied to clipboard
Small typo in create_box_gauss in blur.rs?
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();
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:
With erroneous formula:
With corrected formula: