CIE Luv#
Tip
Learn more: https://en.wikipedia.org/wiki/CIELUV
Functions#
- kornia.color.rgb_to_luv(image, eps=1e-12)[source]#
Convert a RGB image to Luv.
The image data is assumed to be in the range of \([0, 1]\). Luv color is computed using the D65 illuminant and Observer 2.
- Parameters:
- Return type:
- Returns:
Luv version of the image with shape \((*, 3, H, W)\).
Example
>>> input = torch.rand(2, 3, 4, 5) >>> output = rgb_to_luv(input) # 2x3x4x5
Modules#
- class kornia.color.RgbToLuv(*args, **kwargs)[source]#
Convert an image from RGB to Luv.
The image data is assumed to be in the range of \([0, 1]\). Luv color is computed using the D65 illuminant and Observer 2.
- Returns:
Luv version of the image.
- Shape:
image: \((*, 3, H, W)\)
output: \((*, 3, H, W)\)
Examples
>>> input = torch.rand(2, 3, 4, 5) >>> luv = RgbToLuv() >>> output = luv(input) # 2x3x4x5
- class kornia.color.LuvToRgb(*args, **kwargs)[source]#
Convert an image from Luv to RGB.
- Returns:
RGB version of the image.
- Shape:
image: \((*, 3, H, W)\)
output: \((*, 3, H, W)\)
Examples
>>> input = torch.rand(2, 3, 4, 5) >>> rgb = LuvToRgb() >>> output = rgb(input) # 2x3x4x5
References
[1] https://docs.opencv.org/4.0.1/de/d25/imgproc_color_conversions.html