Function tch_utils::color::hsv_from_rgb

source ·
pub fn hsv_from_rgb(rgb: &Tensor) -> Tensor
Expand description

Convert a tensor of RGB values to HSV values.

Arguments

  • rgb: Tensor - The tensor of RGB values [N, 3, H, W] with float values in the range [0, 1]

Returns

Tensor - The tensor of HSV values [N, 3, H, W] with float values in the range [0, 360]