Reputation: 4109
I have a greyscale image which was created from a RGB image using farmula:
0.3 * c.r + 0.59 * c.g + 0.11 * c.b
Now, I want to convert the greyscale image back to the RGB color image close to original as far as possible.
I tried o look for it on the internet, but could not find how to do it. Wikipedia suggests that it is possible but does not explain how.
Could someone please suggest how can I do it.
Thanks in advance.
Upvotes: 0
Views: 1057
Reputation: 1
yes you cant, there was some method to make greyscale to RGB, in this method its include RGB image as baseimage. i write code about this before but i completely forgot the method name. try RGB, alpha beta gamma, some kind like color conversion.
Upvotes: -3
Reputation: 1449
You cannot get true color values.
Think of it like this: you have three unknowns and only one equation.
there are infinite solutions that form a two dimensional plane. You can get a poor representation of the image. Just choose two of the values randomly and calculate thethird one. Hope for the best.
you can generate an RGB value from yoru grayscale if you set R=G=B=Grayscale value
Upvotes: 1
Reputation: 272447
That is not possible. You've taken 3D information, and thrown away 2 of the dimensions. You can't get them back.
Upvotes: 5