gaussianblur
-
Description: Applies a Gaussian 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 the blur. 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. - sigma_x (
int): The standard deviation in the X direction for the Gaussian kernel. Default is 0.
- img (
-
Notes
- For backward compatibility,
sigmaX=...is also accepted.
- For backward compatibility,
-
Returns
- np.ndarray: The blurred image.
-
Example
import capybara as cb
img = cb.imread('lena.png')
blur_img = cb.gaussianblur(img, ksize=5)