1 | initial version |
You just did that. But if you expected to (magically) recover original colors, you were wrong. The grayscale image has no information about the colors, but only their weighted average values so it is impossible to tell what the original three color components were, as more than one combination of these will result in the same averaged value. So, your result image has three color channels, but each of them has the same value, so the image still appears as grayscale. However you can draw a colored circle in this image, for example, as opposed to the grayscale one. There are methods for coloring grayscale images based on deep networks and although the results will look realistic, these methods cannot retrieve original colors either. https://www.learnopencv.com/convolutional-neural-network-based-image-colorization-using-opencv/