could someone explain to me in relatively simple terms how to read a colour histogram? i think i understand histograms generally - especially if in black and white... but i am totally lost in colour... what does it mean when the red, green and blue bits are in sync vs when they are not in sync?
i have googled, but everything i've found just shows examples without colour in the chart...
(i actually do have a question about reading a bw histogram, but i can't figure out how to explain it properly without a ridiculous amount of words and i haven't the energy just now ;p)
If the red, green and blue bits are *exactly* in sync, then it means the image is black and white -- the brightness of the red component of any pixel is exactly the same as the brightness of the green and blue component of that pixel, so the result is a greyscale image.
For example, here's an image where the saturation has been almost completely dropped. You can see that the histogram is almost all white -- this means that the red, blue and green bits are all the same height. Because there is a slight amount of colour left (too little to easily see), you can see some very slight bits in the histogram where there is colour detail:
However, I think you're asking about images where the red, blue and green histograms have peaks that either line up or don't line up. Simplistically, these can indicate whether the image has a neutral tone or not.
Taking the example image again, here it is (fully-saturated) with a histogram overlaid:
In this case, we can see we have a largish peak just under half-way along the histogram (arrow pointing to it). We can see that a lot of this peak contains all three colours (the white section), some of it contains green and blue (the cyan section), and a bit of it contains just blue (the, err, blue section).
We can also see that we have a smaller red peak to the right of the main peak. Because the red peak is to the right (higher) than the blue peak, that means that most pixels have stronger red components than blue components -- it's a warm image.
If we adjust the white balance on this image, we can make it even warmer:
We now have three very clear and distinct peaks, a blue, green and red one (arrowed). We can see that the red peak is now much much higher than the blue peak, indicating that this image has a very warm balance to it -- which is what we see with our eyes.
If we do the opposite adjustment, we get this:
Here we have dramatically cooled the image down, and now the peaks are separate but reversed -- it's instead the blue peak that is furthest right (highest), with the red peak being at the left. That shows that the image has a predominantly cool balance.
This information can help when trying to colour-balance a photo, especially one with multiple light sources in it. However, it's important to remember that it's really just showing the colour spread in an image. For example, this image has a very strong blue sky component, so it's natural that it will have a very strong blue peak:
While you could attempt to line up the peaks of this image, it does not result in a particularly pleasant appearance:
So by all means use it as a tool to help accurately balance your image, especially if you are using a non-calibrated screen, but don't see it as something that you can simply 'fix' and make the image better. Similarly for sunset shots, usually they will have a higher red peak than a blue peak, because sunlight at sunrise and sunset has a naturally 'warm' tone, that it would be counterproductive to correct.
@abirkill thank you thank you thank you! VERY helpful (as always :D)...
i wasn't thinking that there was necessarily anything wrong - just wondering what it all meant... i have a third colour image for today that i haven't posted (two seems to be enough for one day for me ;p), that has the wierdest histogram with different coloured spikes all over... and then i remembered a class i took once where the all the colours got separated into a comb pattern and that wasn't good for some reason... hence the question...
bookmarking this page as it is supremely helpful...
A 'comb' histogram is typically the result of an overprocessed image, particularly one that was edited in 8-bit mode.
I'll stick with black and white, as it's simpler, but the same principle applies in colour. A simple way to get a comb histogram is to start with a relatively flat image:
(I've made this image excessively flat for the purposes of demonstration)
We then load the image into Photoshop in 8-bit mode, and perform a simple levels adjustment:
However, because we're in 8-bit mode, that means that we only had 256 'shades' to play with to start with, and the levels adjustment has stretched the histogram. This adjustment has stretched a starting value of '62' to '0', and a starting value of '221' to '255'. This stretching, combined with the limited initial tonal information, results in 'gaps' -- in the same way that if you multiply every number between 1 and 100 by 2, you'll end up with no odd numbers. For this change, it may mean that (for example) a mid-range value of, '100' might have moved down to '30', and a mid-range value of '101' has moved down to '33'. We now have no tonal data with values of 31 or 32 -- the image is now 'banded', and if we look at the histogram after the levels adjustment, we can see that:
The 'comb effect' is because there are tonal values that should exist in the image, but don't. This is bad for image quality, and can result in banding patterns on the image and other artefacts.
The way to fix this is to process the image in 16-bit mode. This means that, instead of 256 tonal values, there are instead 65,536 tonal values in the initial image, and we can make a strong levels adjustment that won't leave us with significant gaps in our histogram. Here's exactly the same image, processed exactly the same way, except that I imported it into Photoshop in 16-bit mode initially:
You can see that almost all of the 'comb effect' has gone, showing that this image still has a full range of tonal values.
Note that if you do adjustments in Lightroom, then it automatically uses 16-bit mode under the covers, so you don't need to worry about this. Artefacts from this kind of processing typically only start to show visibly after several steps, but a 'comb' histogram is a clear sign that the image has been processed heavily, and should be avoided if possible. Also note that this only really works with images that have more than 8 bits of data to start with -- RAW files contain typically 12-14 bits of data, so processing in 16-bit mode will avoid comb effects. JPEG files contain 8 bits to start with, so processing in 16-bit mode will rarely help much. (This is another good reason to use RAW files if you are going to do significant image processing).
@northy the only time (other than Alexis explanations, isn't he great?) I understood anything about the histogram was from an e-zine/PDF - it's Craft and Vision1 by David Duchemin - it's free. http://craftandvision.com/books/craft-and-vision/
@remirixjones yes, the principal male character. Heard there is a possible movie being made, even my imagination can't figure out how that will turn out.
@abirkill - wow! i never paid attention to this thing, but when you explain it, i read and surprisingly understand it and it doesn't make my head ache. thank you for sharing with us your vast knowledge of photography and other stuff. bookmarking this.
@abirkill thanks for explaining this. Never really taken notice of the histogram as I didn't understand it, now I shall be more aware of what is going on. Also going to bookmark this for future reference. @northy glad you asked this question.
@abirkill Can I clone you, shrink you and keep you in my camera bag? I promise to feed you and all!! lol I'm bookmarking this also. I swear, Alexis, you seriously should do a book or youtube or something! You explain stuff better than anyone/anything I've come across before!
@m9f9l - i either put them in my favourites or copy the link and e-mail it to myself. he @abirkill explains everything in a way that i don't fall asleep! every time i see a question being posted on here, i check it out for alexis' reply.
@abirkill Hey Alexis, do you have, or have you ever considered writing e-books on camera and processing topics. If you did I sure that there would be a number of customers right here on 365. Craft and Vision has some great e-books and some e-books written by you would be a great addition.
@abirkill Question re the "comb" histogram explanation. I'm new to Photoshop...how do I control 16 vs. 8 bit mode? (Also, why--assuming I have lots of room and RAM--would I want to work in 8 bit?) Thanks.
@abirkill You are such a wealth of information. Thank you for all you do. I really wish I could set up a day to search for your posts and read them all but I don't know if my little brain can take that much info at once. I'll be reading your posts as and when I get time like a book. :-)
@houser934 It will depend on how you get your images into Photoshop.
If you use the Adobe Camera Raw plugin, there is underlined text at the bottom of that window that you can click on, and allows you to set 8-bit or 16-bit, as well as the colourspace you want to work in.
The main disadvantage of editing files in 16-bit mode is, as you guessed, memory and disk space. 16-bit files will take up twice as much memory and twice as much disk space compared to 8-bit files.
Note that certain file formats (most notably JPEG) only support 8-bit data, so when you save a file as a JPEG, you will be saving it in 8-bit mode. Photoshop will automatically do this if you ask it to save a JPEG, but will warn you that you are saving it as a copy, as a (pretty non-obvious) way of warning you that the file format you've chosen cannot store the full tonal variation.
It's OK to save files as JPEGs, of course (not least of all as it's the only widely-used format on the Internet for photography) -- because the file has been edited consistently in 16-bit mode, you will not get a 'comb effect' histogram by converting it to 8-bit mode when it's saved -- this only occurs if editing is done to an already-limited 8-bit file. However, you should also choose to save your file in PSD or TIFF format, both of which will save the full 16-bit data, in case you wish to perform further edits in the future. (You should be doing this anyway, as JPEG is a lossy format).
@abirkill Thanks for this ... I was wondering if you wrote the 'new faces' script ... I've been on a few times and wanted to add that to my profile for this project I'm working on. Thanks in advance.
Write a Reply
Sign up for a free account or Sign in to post a comment.
For example, here's an image where the saturation has been almost completely dropped. You can see that the histogram is almost all white -- this means that the red, blue and green bits are all the same height. Because there is a slight amount of colour left (too little to easily see), you can see some very slight bits in the histogram where there is colour detail:
However, I think you're asking about images where the red, blue and green histograms have peaks that either line up or don't line up. Simplistically, these can indicate whether the image has a neutral tone or not.
Taking the example image again, here it is (fully-saturated) with a histogram overlaid:
In this case, we can see we have a largish peak just under half-way along the histogram (arrow pointing to it). We can see that a lot of this peak contains all three colours (the white section), some of it contains green and blue (the cyan section), and a bit of it contains just blue (the, err, blue section).
We can also see that we have a smaller red peak to the right of the main peak. Because the red peak is to the right (higher) than the blue peak, that means that most pixels have stronger red components than blue components -- it's a warm image.
If we adjust the white balance on this image, we can make it even warmer:
We now have three very clear and distinct peaks, a blue, green and red one (arrowed). We can see that the red peak is now much much higher than the blue peak, indicating that this image has a very warm balance to it -- which is what we see with our eyes.
If we do the opposite adjustment, we get this:
Here we have dramatically cooled the image down, and now the peaks are separate but reversed -- it's instead the blue peak that is furthest right (highest), with the red peak being at the left. That shows that the image has a predominantly cool balance.
This information can help when trying to colour-balance a photo, especially one with multiple light sources in it. However, it's important to remember that it's really just showing the colour spread in an image. For example, this image has a very strong blue sky component, so it's natural that it will have a very strong blue peak:
While you could attempt to line up the peaks of this image, it does not result in a particularly pleasant appearance:
So by all means use it as a tool to help accurately balance your image, especially if you are using a non-calibrated screen, but don't see it as something that you can simply 'fix' and make the image better. Similarly for sunset shots, usually they will have a higher red peak than a blue peak, because sunlight at sunrise and sunset has a naturally 'warm' tone, that it would be counterproductive to correct.
Questions welcome!
i wasn't thinking that there was necessarily anything wrong - just wondering what it all meant... i have a third colour image for today that i haven't posted (two seems to be enough for one day for me ;p), that has the wierdest histogram with different coloured spikes all over... and then i remembered a class i took once where the all the colours got separated into a comb pattern and that wasn't good for some reason... hence the question...
bookmarking this page as it is supremely helpful...
tx tons!
A 'comb' histogram is typically the result of an overprocessed image, particularly one that was edited in 8-bit mode.
I'll stick with black and white, as it's simpler, but the same principle applies in colour. A simple way to get a comb histogram is to start with a relatively flat image:
(I've made this image excessively flat for the purposes of demonstration)
We then load the image into Photoshop in 8-bit mode, and perform a simple levels adjustment:
However, because we're in 8-bit mode, that means that we only had 256 'shades' to play with to start with, and the levels adjustment has stretched the histogram. This adjustment has stretched a starting value of '62' to '0', and a starting value of '221' to '255'. This stretching, combined with the limited initial tonal information, results in 'gaps' -- in the same way that if you multiply every number between 1 and 100 by 2, you'll end up with no odd numbers. For this change, it may mean that (for example) a mid-range value of, '100' might have moved down to '30', and a mid-range value of '101' has moved down to '33'. We now have no tonal data with values of 31 or 32 -- the image is now 'banded', and if we look at the histogram after the levels adjustment, we can see that:
The 'comb effect' is because there are tonal values that should exist in the image, but don't. This is bad for image quality, and can result in banding patterns on the image and other artefacts.
The way to fix this is to process the image in 16-bit mode. This means that, instead of 256 tonal values, there are instead 65,536 tonal values in the initial image, and we can make a strong levels adjustment that won't leave us with significant gaps in our histogram. Here's exactly the same image, processed exactly the same way, except that I imported it into Photoshop in 16-bit mode initially:
You can see that almost all of the 'comb effect' has gone, showing that this image still has a full range of tonal values.
Note that if you do adjustments in Lightroom, then it automatically uses 16-bit mode under the covers, so you don't need to worry about this. Artefacts from this kind of processing typically only start to show visibly after several steps, but a 'comb' histogram is a clear sign that the image has been processed heavily, and should be avoided if possible. Also note that this only really works with images that have more than 8 bits of data to start with -- RAW files contain typically 12-14 bits of data, so processing in 16-bit mode will avoid comb effects. JPEG files contain 8 bits to start with, so processing in 16-bit mode will rarely help much. (This is another good reason to use RAW files if you are going to do significant image processing).
Edit: Fixed the last image.
@sianipops @welcometocarolworld @grizzlysghost Alexis is awesome indeed!!!
Thanks @northy for asking the question!
@northy glad you asked this question.
@northy @grizzlysghost @sianipops @welcometocarolworld @remirixjones @orangecrush @taffy @frankhymus @jantan @mikegifford @summerfield @salza @rachelwithey @stimuloog @photohoot @ozziehoffy
If you use the Adobe Camera Raw plugin, there is underlined text at the bottom of that window that you can click on, and allows you to set 8-bit or 16-bit, as well as the colourspace you want to work in.
If you import into Photoshop from Lightroom, you can set the external editing preferences in Lightroom to determine the same settings -- see here for more details:
http://help.adobe.com/en_US/lightroom/using/WSA810DC18-9A3B-4f2e-B09C-1C45DD1F8EDC.html
The main disadvantage of editing files in 16-bit mode is, as you guessed, memory and disk space. 16-bit files will take up twice as much memory and twice as much disk space compared to 8-bit files.
Note that certain file formats (most notably JPEG) only support 8-bit data, so when you save a file as a JPEG, you will be saving it in 8-bit mode. Photoshop will automatically do this if you ask it to save a JPEG, but will warn you that you are saving it as a copy, as a (pretty non-obvious) way of warning you that the file format you've chosen cannot store the full tonal variation.
It's OK to save files as JPEGs, of course (not least of all as it's the only widely-used format on the Internet for photography) -- because the file has been edited consistently in 16-bit mode, you will not get a 'comb effect' histogram by converting it to 8-bit mode when it's saved -- this only occurs if editing is done to an already-limited 8-bit file. However, you should also choose to save your file in PSD or TIFF format, both of which will save the full 16-bit data, in case you wish to perform further edits in the future. (You should be doing this anyway, as JPEG is a lossy format).
Let me know if you have any questions :)