bundles / skimage 0.26.1rc0.dev0 / skimage / color / colorconv / rgb2hsv
function
skimage.color.colorconv:rgb2hsv
source: /_skimage2/color/colorconv.py:255
Signature
def rgb2hsv(rgb, *, channel_axis = -1)Summary
RGB to HSV color space conversion.
Parameters
rgb: (..., C=3, ...) array_likeThe image in RGB format. By default, the final dimension denotes channels.
channel_axis: int, optionalThis parameter indicates which axis of the array corresponds to channels.
Returns
out: (..., C=3, ...) ndarrayThe image in HSV format. Same dimensions as input.
Raises
: ValueErrorIf
rgbis not at least 2-D with shape (..., C=3, ...).
Notes
Conversion between RGB and HSV color spaces results in some loss of precision, due to integer arithmetic and rounding [1].
Examples
from skimage import color from skimage import data img = data.astronaut() img_hsv = color.rgb2hsv(img)✓
Aliases
skimage.color.rgb2hsv