RGB to HSV

Convert image from RGB colorspace to HSV colorspace and split the channels.

plantcv.rgb2gray_hsv(rgb_img, channel)

returns split image (h, s, or v channel)

Original RGB image

Screenshot

from plantcv import plantcv as pcv

# Set global debug behavior to None (default), "print" (to file), or "plot" (Jupyter Notebooks or X11)
pcv.params.debug = "print"

# image converted from RGB to HSV, channels are then split. Hue ('h') channel is outputed.
h_channel=pcv.rgb2gray_hsv(img, 'h')

Hue channel image

Screenshot

from plantcv import plantcv as pcv

# Set global debug behavior to None (default), "print" (to file), or "plot" (Jupyter Notebooks or X11)
pcv.params.debug = "print"

# image converted from RGB to HSV, channels are then split. Saturation ('s') channel is outputed.    
s_channel= pcv.rgb2gray_hsv(img, 's')

Saturation channel image

Screenshot

from plantcv import plantcv as pcv

# Set global debug behavior to None (default), "print" (to file), or "plot" (Jupyter Notebooks or X11)
pcv.params.debug = "print"

# image converted from RGB to HSV, channels are then split. Value ('v') channel is outputed.
v_channel=pcv.rgb2gray_hsv(img, 'v')

Value channel image

Screenshot