Filters out dark noise from an image.
- gray_img - Grayscale or binary image data
- kernel - Optional neighborhood, expressed as an array of 1's and 0's. If None, use cross-shaped structuring element.
- Used to reduce image noise, specifically small dark spots (i.e. "pepper").
- Example use:
- See below
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 closing filtered_img = pcv.closing(gray_img)