Filters out bright 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 bright spots (i.e. "salt").
- 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 opening filtered_img = pcv.opening(gray_img)