Invert

Invert a binary image. This is a wrapper for the OpenCV function bitwise_not

plantcv.invert(gray_img)

returns inverted image

Input binary 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"

# Invert a binary mask.
inverted_img = pcv.invert(gray_img)

Inverted image

Screenshot

Source Code: Here