Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

window size to seven

Pulkit Khandelwal6b8aa4932f95
diff --git a/test/test_image.py b/test/test_image.py
index 70472eccb..ea0b4d856 100644
--- a/test/test_image.py
+++ b/test/test_image.py
@@ -58,16 +58,18 @@ def test_get_laplacian_kernel(window_size):
assert kernel.sum().item() == pytest.approx(0.0)
[email protected]("window_size", [5])
[email protected]("window_size", [7])
def test_get_laplacian_kernel2d(window_size):
kernel = image.get_laplacian_kernel2d(window_size)
assert kernel.shape == (window_size, window_size)
assert kernel.sum().item() == pytest.approx(0.0)
- expected = torch.tensor([[1., 1., 1., 1., 1.],
- [1., 1., 1., 1., 1.],
- [1., 1., -24., 1., 1.],
- [1., 1., 1., 1., 1.],
- [1., 1., 1., 1., 1.]])
+ expected = torch.tensor([[1., 1., 1., 1., 1., 1., 1.],
+ [1., 1., 1., 1., 1., 1., 1.],
+ [1., 1., 1., 1., 1., 1., 1.],
+ [1., 1., 1., -48., 1., 1., 1.],
+ [1., 1., 1., 1., 1., 1., 1.],
+ [1., 1., 1., 1., 1., 1., 1.],
+ [1., 1., 1., 1., 1., 1., 1.]])
assert_allclose(expected, kernel)