python grayscale to rgb code example
Example 1: opencv grayscale to rgb
backtorgb = cv2.cvtColor(gray,cv2.COLOR_GRAY2RGB)
Example 2: rgb to grayscale python
from PIL import Image
img = Image.open('image.png').convert('LA')
img.save('greyscale.png')