Write image to the file specified. This is a wrapper for the OpenCV function imwrite for numpy arrays, and can handle matplotlib Figures (like the one returned by pcv.visualize.pseudocolor) and plotnine ggplots (like the histograms returned in pcv.analyze_nir_intensity, pcv.analyze_color, pcv.visualize.histogram, and pcv.fluor_fvfm).

plantcv.print_image(img, filename)

returns none

  • Parameters:
    • img- image object
    • filename- desired name of image file, supported extensions are PNG, JPG, and TIFF
  • Context:
    • Often used to debug new image processing pipelines
    • Used to write out final results images
  • Example use:

from plantcv import plantcv as pcv

pcv.print_image(img, "home/user/images/test-image.png")