rgb2gray

horizon_plugin_pytorch.rgb2gray (input: Tensor)

Convert color space.

Convert images from RGB format to gray

Parameters: input (Tensor) – input image in RGB format of shape [N, 3, H, W], ranging 0 to 255

Returns: gray image of shape [N, 1, H, W], ranging 0 to 255

Return type: Tensor