What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Adding colour to greyscale images


Johnc1966

Member
Messages
9
Likes
0
Hi,
I have a colour image of a scene and several greyscale images of similar scenes.
I would like to use the colour information from the colour scene and add it to the greyscale images,thereby making them colour also.
I am sure there is more than one way to do this, but the way I imagined it would work was to some how sample all the colours and then map them individually to the 256 (or more ?) grey levels.
The colous wouldn't change because I would choose a 'standard' image but the greyscale images would all be different.
I have tried searching the net for info but I don't think I am entering the correct terms, so any guidance would be appreciated.

thanks.
 
I'm commuting, on a train, so this has to be short. Undoubtedly, others will respond with the full story, but I wanted to point out why your statement, "...the way I imagined it would work was to some how sample all the colours and then map them individually to the 256 (or more ?) grey levels...", rarely works.

Here's an example: in one part of the scene, gray level values from 120 - 140 may represent green trees, whereas in another part of the scene the exact same range of gray levels may represent brown soil, so there is no one-to-one mapping between gray levels and hues or saturation values.

HTH.

More later when I have time.

Tom
 
Tom,
I should point out that the images are not of earth, and always contain pretty much the same materials, so basically rocks are rocks, sand is sand, and sky is sky. the ambient lighting would change but little else.

Safe journey.
 
Yeah, seems I remember this being discussed at great length before but I can't find the thread. As Tom stated, there is really no way to map grayscale levels of an image with specific hues.
 
Hi,
I posted a quick reply but it hasn't appeard, so here is another.
The images are not of Earth, in them rocks are rocks, sand is sand, and sky is sky, nothing really changes wildly in terms of content, only the ambient lighting.
I suppose the sky could have the same greyscale as say a light rock in sunlight but I would use any info given here to recreate the sky seperately.(I think!)

Thanks.
 
That being said..and it is true, does not mean you can't use other means to colorize it. It is, however, not a one or two button process. Of course, the first step is to change the mode to color, RGB would be preferable. I colorize old images using the selection tools and most times adding Hue/Saturation adjustment layers in Colorize mode. You can also effect precise color applications to your image by using the Black and White adjustment layer. Utilizing this adjustment, you check the Tint box and when the dialog opens enter the color code or hex numbers and then apply your color to your selected area. This is an example of what you can accomplish using this methodology.
As greyscale original:
White Shield BW sm.jpg
Colorized:
White Shield-flat-png.jpg
 
Hi, I posted a quick reply but it hasn't appeard, so here is another.
The images are not of Earth, in them rocks are rocks, sand is sand, and sky is sky, nothing really changes wildly in terms of content, only the ambient lighting.
I suppose the sky could have the same greyscale as say a light rock in sunlight but I would use any info given here to recreate the sky seperately.(I think!) Thanks.

My trees-and-soil example was just an example of a much more general problem you may encounter if you attempt to use only brightness info to recreate the missing hue and saturation numbers for each pixel using some sort of a simple mapping procedure. You are attempting to find a way to generate / simulate the other two numbers which are needed to completely specify a color.

In general, this simply can't be done. One can't create the two items of missing information (ie, hue and sat) from another number which is only partially correlated to these variables.

However, as I think you are suggesting, for subsets of limited subject matter in similar lighting (eg, all skin tones on the sunny side of faces of the same ethnicity, all skin tones on the shadow side of faces, rocks near the subject, the blue part of the sky, the clouds in the sky, etc.), one can make a pretty guess how brightness will map into hue and saturation. Do this for enough different types of objects in the scene and one can come up with a fairly good reproduction of the colors in the original scene.

In fact this sort of multiple gradient map approach is exactly what is done in a commercial colorization product called AKVIS Coloriage:
http://akvis.com/img/examples/coloriage/color-selection/color-library.jpg
http://akvis.com/en/coloriage-tutorial/howwork/tips.php
http://akvis.com/en/coloriage-tutorial/howwork/index.php

The gradient map procedure is essentially an attempt to make a more automated version of the approach that was suggested Larry (ALB), and is favored by more traditional photoshop artists who either manually paint in the needed colors from swatches or by making up a suitable set of hue/sat adjustment layers, each masked to a particular type of content in the image.

The traditional PS artists are using their knowledge and experience with different types of subject matter to select good colors to use.

HTH,

Tom


PS - Larry, I LOVE your coloration of that image. IMHO, that's one of your best ever.
 
Tom,
Thanks for your input. I did this a long time ago and it was posted here. In fact, I think I used it as my avatar for awhile. Being the photographer you are, you may be interested to know that the original photo was made by the famous Edward S Curtis. Curtis, financed by J.P. Morgan, was charged with photographing the native peoples of North America. He published literally 1000's of images of same. This was late 1800's, early 1900's. Subsequently, being prior to 1928, the copyrights expired and the work became part of the public domain. However, the original glass negatives were sold and later discovered by another firm after that owner's death. So, you can actually purchase originals today made from those glass plate negatives (assuming your a serious collector and are willing to lay out a wad of cash). The whole collection is on the Library of Congress site and I enjoy taking this material and using my imagination to colorize and embellish it. I made an acrylic framed print 13 x 19 from the one shown here.
 
Thanks for the replies, however, I wasn't referring to painting by numers.
I would like to extract the colour info from a REAL image of a REAL place and use it to colour a greyscale image of another real place with the very same REAL colours. Not because it makes the place look nice but because they are the actual colours of that place.
Just to give an example here is a link to the kind of coloured greyscale image I am talking about. I can't post links yet so go to db-prods.net




Thanks again.
 
I must not have made the nature of the difficulty of the proposed approach clear, so let me try once again.

Lets suppose that your "real" color image contains 100 significantly different luminosity levels, 100 significantly different hues, and 100 significantly different saturation values. This means that there could be as many as 1 million (ie, 1,000,000) significantly different colors in the image of the "real" color scene. Put differently, for each value of the luminosity (ie, each gray level), there could be 10,000 significantly different colors.

The grayscale image that you want to algorithmically color probably also has around 100 significantly different luminosity levels, so you are asking some magical algorithm to guess which of the 10,000 different hue and saturation possibilities to use for each value of luminosity in the gray scale image.

This can't possibly be done correctly with a simple tone-to-color mapping algorithm. How could the algorithm possibly know which of the 10,000 possible hues and saturation values to use for a pixel with a specified value of luminosity (ie, specified gray level)?

Even with quite a bit of a priori knowledge about which hues and saturation values are reasonable in certain areas of the image (eg, which areas are rocks, which areas are dirt, etc. etc.) and a human at the controls, there still will be many choices for hue and saturation that have to be made, but which can only be guessed at. Good artists with lots of experience in that particular environment will guess well, poor artists (and computers) won't guess so well.

Unless I am missing something, I think you are asking for the impossible.

Sorry,

Tom
 
Tom,

Thank you for your reply.
Put like that it would indeed seem an impossible task.
Did you visit the site I mentioned?
If indeed you did visit the site you will see that greyscale PanCam images of Mars have been colourised using information from colour MastCam100/34 images.
So apparantly it is not impossible.
Perhaps it beyond your ability.

Thanks again.
 
Perhaps it beyond your ability." You know not to whom you speak grasshopper. :rofl:

Tom,

Thank you for your reply.
Put like that it would indeed seem an impossible task.
Did you visit the site I mentioned?
If indeed you did visit the site you will see that greyscale PanCam images of Mars have been colourised using information from colour MastCam100/34 images.
So apparantly it is not impossible.
Perhaps it beyond your ability.

Thanks again.
 
The accuracy in colourizing the images taken from the MastCam has to be questioned when in the noticeably 'French' words of the blogger, "I have acquired good working protocols and produce images that satisfy me","my compositions with attention to stick as close to reality , or at least to my perception of what would be seen by March the human eye". So it would seem it is beyond the bloggers ability as well.

So unless his perception of what colours to use are now the world standard, you should listen to Tom's advise, and realise this blogger has only guessed the colours. I have already proved that the same grey can represent 2 different colours, so how do you think it is possible to map a colour from grey information.

If you ask a question, you really shouldn't spit your dummy out when you get an answer that doesn't suite what you want. Be a bit more grateful for the quality information you are getting and try and take it on board and understand the facts as they are presented to you.
 
Last edited:
Thank you for your sane comments.
My insanity is brought about by an inability to reproduce what I have seen.
Accurately mapping colour to a greyscale is impossible.
Any ideas how I can reproduce the types of images I have mentioned(accurate or not).
I don't want a walkthrough, but some informed pointers would be most appreciated.
Turning a black and white image of an Indian into colour is obviously a labour of love.

Thanks again.
 
beyond your ability....should be You didn't spend hours for me......Please.:rofl:
 
Mike,

I have already been berated for my pedantic attitude, your post only makes you look ridiculous.
As I said, I DON'T want a walkthrough!
Perhaps I asked the right question in the wrong way, perhaps I thought that having read the question, and realising it wasn't feasible, someone would point me in a more enlightened direction.
Colourising old photographs is a wonderful persuit in an artistic and perhaps idealistic way. The colourising of images from spacecraft is an attempt to recreate a scene in a more 'realistic' way.
One is more artistic the other less so IMHO.
I suppose it would also depend on the intended audience?

Thanks again.
 
There is an extensive literature on colorizing grayscale images from planetary probes, the Hubble, moon missions, etc.. There are three basic approaches:

1. Purely subjective - designed for viewing by non-specialist audiences. In previous messages, I described some of the commonly used methods. You responded by characterizing them as "paint by the numbers". I'm sure NASA folks would get quite a chuckle out of that comment.

2. Use the colors from a low resolution image of an area to colorize a much higher resolution grayscale image of the exact same area - this gives quasi-realistic colors. It is quite analogous to the different degrees of image compression often used for luminosity vs color info.

3. Take several grayscale images of the same area with different filters (eg, R, G, and B) in front of the lens and combine them. - This gives the most scientifically useful, most accurate colors. This method is also used to generate false color images based on the composition of the materials in the FOV.

NASA sincerely wants people to know how their beautiful images are made and have an extensive outreach program to let amateurs colorize Hubble(and other) imagery. 15 minutes of Googling turned up dozens of relevant papers and websites. All I did was search on {NASA grayscale colorization mars} and similar search strategies. I can't imagine why you couldn't find these yourself.

Finally, before you start getting any more huffy, I suggest you consider the fact that you were the one who first started the ball rolling in this direction with snide / denigrating comments such as "paint by the numbers", and "Perhaps it is beyond your ability".

This speaks to your lack of sophistication in such matters. For example, have you, even once, colorized any image (using any method), with a fraction of the degree of success and beauty that Larry (ALB) colorized the American Indian. If you haven't, I suggest that you do so, ie, learn to walk before you try to run. Also, to clarify a comment by Larry, FYI, I am a full professor at a major university. I published my first paper on scientific image processing in the 1980's, ie, before Photoshop existed, and I hold several patents on the application of various forms of spectroscopy to image analysis.

Tom

PS - BTW, the reasons I didn't describe methods 2 and 3 earlier is because since you obviously didn't find the relevant websites, you wouldn't have access to the data, and in the case of #3, I doubt you would understand the mathematics behind these methods.
 

Back
Top