cv3.color_spaces.gray2bgra

cv3.color_spaces.gray2bgra(img)[source]

Convert grayscale image to BGRA.

Parameters:

img (numpy.ndarray) – Input grayscale image.

Returns:

Image in BGRA format.

Return type:

numpy.ndarray

Raises:

ValueError – If input image is not grayscale.