Skip to content

Commit

Permalink
Fix Laplacian filter wrong sign scikit-image#7357
Browse files Browse the repository at this point in the history
  • Loading branch information
pitkajuh authored and pitkajuh committed Apr 13, 2024
1 parent 7ae4fd8 commit 51ec376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skimage/restoration/uft.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ def laplacian(ndim, shape, is_real=True):
idx = tuple(
[slice(1, 2)] * dim + [slice(None)] + [slice(1, 2)] * (ndim - dim - 1)
)
impr[idx] = np.array([-1.0, 0.0, -1.0]).reshape(
impr[idx] = np.array([1.0, 0.0, 1.0]).reshape(
[-1 if i == dim else 1 for i in range(ndim)]
)
impr[(slice(1, 2),) * ndim] = 2.0 * ndim
impr[(slice(1, 2),) * ndim] = -2.0 * ndim
return ir2tf(impr, shape, is_real=is_real), impr

0 comments on commit 51ec376

Please sign in to comment.