bgr2centered_gray

horizon_plugin_pytorch.bgr2centered_gray (input: Tensor)

Convert color space.

Convert images from BGR format to centered gray

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

Returns: centered gray image of shape [N, 1, H, W], ranging -128 to 127

Return type: Tensor