caer.color¶ Using the `to_` syntax¶ to_rgb¶ caer.color.to_rgb(tens)[source]¶ Converts any supported colorspace to RGB Parameters tens¶ (Tensor) – Return type Tensor Returns Tensor to_bgr¶ caer.color.to_bgr(tens)[source]¶ Converts any supported colorspace to BGR Parameters tens¶ (Tensor) – Return type Tensor Returns Tensor to_gray¶ caer.color.to_gray(tens)[source]¶ Converts any supported colorspace to grayscale Parameters tens¶ (Tensor) – Return type Tensor Returns Tensor to_hsv¶ caer.color.to_hsv(tens)[source]¶ Converts any supported colorspace to hsv Parameters tens¶ (Tensor) – Return type Tensor Returns Tensor to_hls¶ caer.color.to_hls(tens)[source]¶ Converts any supported colorspace to HLS Parameters tens¶ (Tensor) – Return type Tensor Returns Tensor to_lab¶ caer.color.to_lab(tens)[source]¶ Converts any supported colorspace to LAB Parameters tens¶ (Tensor) – Return type Tensor Returns Tensor From the RGB colorspace¶ rgb2bgr¶ caer.color.rgb2bgr(tens)[source]¶ Converts an RGB Tensor to its BGR version. Parameters tens¶ (Tensor) – Valid RGB Tensor Return type Tensor Returns BGR Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 rgb2gray¶ caer.color.rgb2gray(tens)[source]¶ Converts an RGB Tensor to its Grayscale version. Parameters tens¶ (Tensor) – Valid RGB Tensor Return type Tensor Returns Grayscale Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 rgb2hsv¶ caer.color.rgb2hsv(tens)[source]¶ Converts an RGB Tensor to its HSV version. Parameters tens¶ (Tensor) – Valid RGB Tensor Return type Tensor Returns HSV Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 rgb2lab¶ caer.color.rgb2bgr(tens)[source]¶ Converts an RGB Tensor to its BGR version. Parameters tens¶ (Tensor) – Valid RGB Tensor Return type Tensor Returns BGR Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 From the BGR colorspace¶ bgr2rgb¶ caer.color.bgr2rgb(tens)[source]¶ Converts a BGR Tensor to its RGB version. Parameters tens¶ (Tensor) – Valid BGR Tensor Return type Tensor Returns RGB Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 bgr2gray¶ caer.color.bgr2gray(tens)[source]¶ Converts a BGR Tensor to its Grayscale version. Parameters tens¶ (Tensor) – Valid BGR Tensor Return type Tensor Returns Grayscale Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 bgr2hsv¶ caer.color.bgr2hsv(tens)[source]¶ Converts a BGR Tensor to its HSV version. Parameters tens¶ (Tensor) – Valid BGR Tensor Return type Tensor Returns HSV Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 bgr2lab¶ caer.color.bgr2lab(tens)[source]¶ Converts a BGR Tensor to its LAB version. Parameters tens¶ (Tensor) – Valid BGR Tensor Return type Tensor Returns LAB Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 From the HSV colorspace¶ hsv2rgb¶ caer.color.hsv2rgb(tens)[source]¶ Converts a HSV Tensor to its RGB version. Parameters tens¶ (Tensor) – Valid HSV Tensor Return type Tensor Returns RGB Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 hsv2bgr¶ caer.color.hsv2bgr(tens)[source]¶ Converts a HSV Tensor to its BGR version. Parameters tens¶ (Tensor) – Valid HSV Tensor Return type Tensor Returns BGR Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 hsv2gray¶ caer.color.hsv2gray(tens)[source]¶ Converts a HSV Tensor to its Grayscale version. Parameters tens¶ (Tensor) – Valid HSV Tensor Return type Tensor Returns Grayscale Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 hsv2lab¶ caer.color.hsv2lab(tens)[source]¶ Converts a HSV Tensor to its LAB version. Parameters tens¶ (Tensor) – Valid HSV Tensor Return type Tensor Returns LAB Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 From the LAB colorspace¶ lab2rgb¶ caer.color.lab2rgb(tens)[source]¶ Converts an LAB Tensor to its RGB version. Parameters tens¶ (Tensor) – Valid LAB Tensor Return type Tensor Returns RGB Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 lab2bgr¶ caer.color.lab2bgr(tens)[source]¶ Converts an LAB Tensor to its BGR version. Parameters tens¶ (Tensor) – Valid LAB Tensor Return type Tensor Returns BGR Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 lab2gray¶ caer.color.lab2gray(tens)[source]¶ Converts an LAB Tensor to its Grayscale version. Parameters tens¶ (Tensor) – Valid LAB Tensor Return type Tensor Returns Grayscale Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3 lab2hsv¶ caer.color.lab2hsv(tens)[source]¶ Converts an LAB Tensor to its HSV version. Parameters tens¶ (Tensor) – Valid LAB Tensor Return type Tensor Returns HSV Tensor of shape (height, width, channels) Raises ValueError – If tens is not of shape 3