imageproc icon indicating copy to clipboard operation
imageproc copied to clipboard

Fix Gaussian blur loosing value by normalizing the finite Gaussian kernel.

Open stephanemagnenat opened this issue 2 years ago • 2 comments

This corrects issue #529 by re-normalizing the Gaussian kernel. This breaks regression tests based on existing images, obviously.

stephanemagnenat avatar Jun 06 '23 13:06 stephanemagnenat

Of course, if we want compatibility, we could keep the current functions as is and add _normalized versions.

stephanemagnenat avatar Jun 07 '23 07:06 stephanemagnenat

Thanks for the PR.

Please can you move the new tests you've added to regression.rs into the tests section of src/mod/filter.rs, and regenerate the expected outputs for the existing gaussian blur tests in regression.rs by running cargo test with the REGENERATE environment variable set: https://github.com/image-rs/imageproc/blob/4060ac1b28c694b66c4e28fb76d66685c1971647/tests/regression.rs#L8.

theotherphil avatar Mar 10 '24 12:03 theotherphil

This is a useful fix and I suspect that I ignored the PR for long enough for @stephanemagnenat to lose interest! So I’ll merge as is and then fix the tests in a follow up PR.

theotherphil avatar Apr 28 '24 13:04 theotherphil

Sorry I am busy with professional deadlines these days, feel free to merge anything that is helpful :-)

stephanemagnenat avatar Apr 29 '24 08:04 stephanemagnenat