Invert

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

invert(img, device, debug=None)

returns device, inverted image

Input binary image

Screenshot

from plantcv import plantcv as pcv

# Invert a binary mask.
device, inverted_img = pcv.invert(img, device, debug="print")

Inverted image

Screenshot