medianblur
medianblur(img: np.ndarray, ksize: _Ksize = 3, **kwargs) -> np.ndarray
-
Description: Applies median blur to the input image.
-
Parameters
- img (
np.ndarray
): The input image to be blurred. - ksize (
Union[int, Tuple[int, int]]
): The size of the kernel used for blurring. If an integer is provided, a square kernel of the specified size is used. If a tuple(k_height, k_width)
is provided, a rectangular kernel of the specified size is used. Default is 3.
- img (
-
Returns
- np.ndarray: The blurred image.
-
Example
import capybara as cb
img = cb.imread('lena.png')
blur_img = cb.medianblur(img, ksize=5)