image-rs / imageproc

Image processing operations
MIT License
758 stars 149 forks source link

`Laplacian` from `master` is wrong #649

Closed cospectrum closed 5 months ago

cospectrum commented 5 months ago

Why it's [1, 1, 1, 1, -4, 1, 1, 1, 1], while in the doc it's [0, 1, 0, 1, -4, 1, 0, 1, 0]?

cospectrum commented 5 months ago

We just have a bunch of laplacians now

theotherphil commented 5 months ago

Looks like it was broken accidentally in https://github.com/image-rs/imageproc/pull/611 and there are no tests for laplacian_filter so this wasn’t caught.

Let’s add a test alongside fixing the kernel definition.

theotherphil commented 5 months ago

The bug was added since the last release so no crate versions are impacted.

theotherphil commented 5 months ago

Fixed by https://github.com/image-rs/imageproc/pull/650