Analyze NIR intensity

This function calculates the intensity of each pixel associated with the plant and writes the values out to a file. Can also print out a histogram plot of pixel intensity and a pseudocolor image of the plant.

analyze_NIR_intensity(img, rgbimg, mask, bins, device, hisplot=False, debug=None, filename=False)

returns device, header of histogram, histogram values, pseudocolored image

Output Data Units: - Bins - bin values based on number of bins set by user
- Signal Histogram - histogram of object pixel intensity values 0 (unsaturated) to 255 (saturated)

Original grayscale image

Screenshot

from plantcv import plantcv as pcv

# Caclulates the proportion of pixels that fall into a signal bin and writes the values to a file. Also provides a histogram of this data and a pseudocolored image of the plant.
device, hist_header, hist_data, h_norm  = pcv.analyze_NIR_intensity(img, rgbimg, mask, 256, device, debug="print", filename="pseudocolored_plant")

Pseudocolored NIR signal

Screenshot

NIR signal histogram

Screenshot

Image with shape characteristics

Screenshot