# How can I turn a black and white picture into a colorful one?

Hi,dear experts:
I know how to turn a colorful picture into a black and white one.For example:pixel.r:=(pixel.r+pixel.g+pixel.b)/3;and pixel.g:=pixel.r;pixel.b:=pixel.r;right?
But for a opposite transformation,what shall I do?
How can I turn a black and whithe picture into a colorful one?Thank you for your kind answere.I will appreciate them very much.

###### Who is Participating?

Commented:
In terms of pure graphics programming this cannot be done, there is no way of establishing the correct colour of a greyscale pixel.

If you ware to seed the greyscale image with some colours then you could write an inteligent tinting algorhythm that searched for image element borders and coloured the image appropriately, but this would be a massive task.
0

Commented:
take a look to

http://www.efg2.com/Lab/Graphics/index.html

i guess you may find there many tips

meikl ;-)
0

Commented:
Just let's do some math:

If you have 3 numbers like e.g. 250, 200 and 150. Now you calculate (250 + 200 + 150) / 3 = 200. So now the result is 200.

How would you go backwards? How can we (or a program) know that 200 should be resolved to 250, 200 and 150? It's simply impossible mathematical. When doing the (r+g+b)/3 we're losing information that we can't recover.

0

Commented:
If you already have the colour image and have converted it to greyscale for display purposes, then you could cache the colour version in order to reverse the operation.
0

Commented:
If you had a black and white image of me, and wanted to make it "colorful" , would you know what color to make my shirt ? How would a program know what color to make my shirt, pants, hair, ect?. . so the opposite transformation of a grayscale image requires the "color" information for that image. . . and by the way, the formula used for getting B&W TV is (0.30 * Red) + (0.59 * Green) + (0.11 * Blue) which gives a truer grayscale image
0

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Thank you,
Russell

EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.