Gaussian Blur

Applies a gaussian blur filter. Applies median value to central pixel within a kernel size (ksize x ksize). The function is a wrapper for the OpenCV function gaussian blur.

plantcv.gaussian_blur(img, ksize, sigmax=0, sigmay=None)

returns blurred image

Original image

Screenshot

from plantcv import plantcv as pcv

# Set global debug behavior to None (default), "print" (to file), or "plot" (Jupyter Notebooks or X11)
pcv.params.debug = "print"

# Apply gaussian blur to a binary image that has been previously thresholded.
gaussian_img = pcv.gaussian_blur(img=img1, ksize=(51,51), sigmax=0, sigmay=None)

Gaussian blur (ksize = (51,51))

Screenshot

from plantcv import plantcv as pcv

# Set global debug behavior to None (default), "print" (to file), or "plot" (Jupyter Notebooks or X11)
pcv.params.debug = "print"

# Apply gaussian blur to a binary image that has been previously thresholded.
gaussian_img = pcv.gaussian_blur(img=img1, ksize=(101,101), sigmax=0, sigmay=None)

Gaussian blur (ksize = (101,101))

Screenshot