cv3.color_spaces.gray2rgba

cv3.color_spaces.gray2rgba(img)[source]

Convert grayscale image to RGBA.

Parameters:

img (numpy.ndarray) – Input grayscale image.

Returns:

Image in RGBA format.

Return type:

numpy.ndarray

Raises:

ValueError – If input image is not grayscale.