Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

fixes the docs in kornia.morphology` for the kernel sizes (#980)

Edgar Riba682fde3c0fd3
diff --git a/kornia/morphology/basic_operators.py b/kornia/morphology/basic_operators.py
index 3f32e9ba6..aef1ce94c 100644
--- a/kornia/morphology/basic_operators.py
+++ b/kornia/morphology/basic_operators.py
@@ -26,7 +26,7 @@ def dilation(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Dilated image with shape :math:`(B, C, H, W)`.
@@ -47,7 +47,7 @@ def erosion(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Eroded image with shape :math:`(B, C, H, W)`.
diff --git a/kornia/morphology/morphology.py b/kornia/morphology/morphology.py
index 5693dec6f..335db242f 100644
--- a/kornia/morphology/morphology.py
+++ b/kornia/morphology/morphology.py
@@ -15,7 +15,7 @@ def gradient(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Dilated image with shape :math:`(B, C, H, W)`.
@@ -56,7 +56,7 @@ def top_hat(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Top hat transformated image with shape :math:`(B, C, H, W)`.
@@ -97,7 +97,7 @@ def black_hat(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Top hat transformated image with shape :math:`(B, C, H, W)`.
diff --git a/kornia/morphology/open_close.py b/kornia/morphology/open_close.py
index bfc7f357b..240c1fd49 100644
--- a/kornia/morphology/open_close.py
+++ b/kornia/morphology/open_close.py
@@ -13,7 +13,7 @@ def open(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Dilated image with shape :math:`(B, C, H, W)`.
@@ -51,7 +51,7 @@ def close(tensor: torch.Tensor, kernel: torch.Tensor) -> torch.Tensor:
Args:
tensor (torch.Tensor): Image with shape :math:`(B, C, H, W)`.
- kernel (torch.Tensor): Structuring element with shape :math:`(H, W)`.
+ kernel (torch.Tensor): Structuring element with shape :math:`(k_x, k_y)`.
Returns:
torch.Tensor: Dilated image with shape :math:`(B, C, H, W)`.