I\'m trying to convert a 2D Numpy array, representing a black-and-white image, into a 3-channel OpenCV array (i.e. an RGB image).
Based on code samples and the docs
The simplest solution would be to use Pillow lib:
from PIL import Image image = Image.fromarray(.astype(np.uint8))
And you can use it as an image.