RGB to HSV

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

rgb2gray_hsv(img, channel, device, debug=None)

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

Original RGB image

Screenshot

from plantcv import plantcv as pcv

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

device, h_channel=pcv.rgb2gray_hsv(img, 'h', device, debug="print")

Hue channel image

Screenshot

from plantcv import plantcv as pcv

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

device, s_channel= pcv.rgb2gray_hsv(img, 's', device, debug="print")

Saturation channel image

Screenshot

from plantcv import plantcv as pcv

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

device, v_channel=pcv.rgb2gray_hsv(img, 'v', device, debug="print")

Value channel image

Screenshot