Trait ColorConversion
pub trait ColorConversion {
// Required methods
fn rgb2gray(self) -> Tensor<4>;
fn gray2rgb(self) -> Tensor<4>;
fn rgb2hsv(self) -> Tensor<4>;
fn hsv2rgb(self) -> Tensor<4>;
}Expand description
Color space conversion tensor operations.
Required Methods§
fn hsv2rgb(self) -> Tensor<4>
fn hsv2rgb(self) -> Tensor<4>
Converts a batch of images from the HSV color space to the RGB color space.
§Arguments
self: A batched image tensor of shape[batch, channel, height, width]. The first channel (hue) is in the0.0..360.0range. The other two (saturation and value) are in the0.0..=1.0range.
§Returns
The same-shape image tensor in RGB color space.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ColorConversion for Tensor<4>
Formulas derived from the OpenCV docs.