Dilate

Perform morphological 'dilation' filtering. Adds pixel in center of the kernel if conditions set in kernel are true.

dilate(img, kernel, i, device, debug=None)

returns device, image after dilation

Input grayscale image

Screenshot

from plantcv import plantcv as pcv

# Perform dilation
# Results in addition of pixels to the boundary of object
device, dilate_img = pcv.dilate(img, kernel, 1 device, debug='print')

Image after dilation

Screenshot