Read Image

Reads image into numpy ndarray and splits the path and image filename. This is a wrapper for the OpenCV function imread.

readimage(filename, debug=None)

returns img, path, image filename

  • Parameters:
    • filename - image file to be read (possibly including a path)
    • debug - None, "print", or "plot". Print = save to file, Plot = print to screen. Default = None
  • Context:
    • Reads in file to be processed
  • Example use:
import plantcv as pcv      
img, path, img_filename=pcv.readimage("home/user/images/test-image.png")