Use OpenCV calcHist method
Use OpenCV calcHist method

Updated the analyze_nir_intensity function to use cv2.calcHist instead of np.histogram. calcHist lets you use a mask, which excludes all the background pixels. This allows us to use the normal range of 0-256 (or similar) and makes the output correctly in that range. The bin values were also adjusted to respond to the user input bin number.

danforthcenter/plantcv,danforthcenter/plantcv,danforthcenter/plantcv,stiphyMT/plantcv,stiphyMT/plantcv,stiphyMT/plantcv