Image Subtract

Obtain a image of the pixelwise input values within two image files. This is a wrapper for the OpenCV function subtract.

image_subtract(img, img2, device, debug=None)

returns device, subtracted image

Original grayscale image (image 1)

Screenshot

Image to be subtracted (image 2)

Screenshot

from plantcv import plantcv as pcv

# Subtract image from another image. 
device, subtracted_img = pcv.image_subtract(img, img2,  device, debug="print")

Subtraction of image 2 from image 1

Screenshot