1 | initial version |
I do think both suggestions contain wrong information. To make it a little more clear look at the link that @FLY provided right here. If you go down to the cvtColor function and to the grayscale to rgb conversion you will see the following statement.
Gray to RGB[A]: R <-- Y, G <-- Y, B <-- Y, A <-- \max(ChannelRange)
Here comes in play directly what @Allyson Martins suggested. When you got a grayscale image you only have intensity values from 0 - 255 of each pixel. You have basically no idea how the relation of green, blue and red is in that specific pixel.
So you either have to