This section includes functions for performing conversions between different color spaces.
Converts a src
RGB image to Lab.
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a src
Lab image to RGB.
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a RGB image to YUV. If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a YUV image to RGB. If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a RGB image to Y (discard U and V).
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a RGB image to HSL.
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a HSL image to RGB.
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a RGB image to HSV.
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts a HSV image to RGB.
If dst
is provided, it is used to store the output
image. Otherwise, returns a new res
Tensor.
Converts an RGB image to normalized-RGB.
Converts a L-levels (1 to L) greyscale image into a L-levels jet heat-map.
If dst
is provided, it is used to store the output image. Otherwise, returns a new res
Tensor.
This is particulary helpful for understanding the magnitude of the values of a matrix, or easily spot peaks in scalar field (like probability densities over a 2D area). For example, you can run it as
image.display{image=image.y2jet(torch.linspace(1,10,10)), zoom=50}