Page 2 of 2 FirstFirst 12
Results 21 to 33 of 33

Thread: colour channels in the histogram and 'good' white balance

  1. #21
    DanK's Avatar
    Join Date
    Dec 2011
    Location
    New England
    Posts
    8,933
    Real Name
    Dan

    Re: colour channels in the histogram and 'good' white balance

    Quote Originally Posted by davidedric View Post
    From another angle (I think!). With most graphical representations, the Area Under the Curve (auc) represents some real physical quantity. Can anyone enlighten me as to what the auc of a histogram represents? As a specific​ example, the difference between a flattish histogram and a higher one, with the same relative peaks heights from left to right?
    The histogram is luminance (x-axis) by density (y-axis). So it seems to me that the relative areas under the curve should represent the total proportion of pixels of each color, across all levels of luminance. I'm hedging with "proportion" because I don't believe the y axis is scaled to represent a count. I think most software rescales it to fill the vertical space, but I don't actually know for certain.

  2. #22

    Join Date
    Feb 2011
    Location
    retirement
    Posts
    331

    Re: colour channels in the histogram and 'good' white balance

    Quote Originally Posted by davidedric View Post
    ...Can anyone enlighten me as to what the auc of a histogram represents? ...
    I'm not a Moderator but I did start this thread so please can I ask you politely not to pirate a thread like this? If you have a new question please start a new thread.

    Thank you,

    Ken

  3. #23
    davidedric's Avatar
    Join Date
    Jul 2012
    Location
    Cheshire, England
    Posts
    3,668
    Real Name
    Dave

    Re: colour channels in the histogram and 'good' white balance

    Actually, I think the answer is very relevant to your original post, since it seeks to understand what the histogram is actually displaying. However, as you are the OP I will of course desist.

    P.S. please see also pm
    Last edited by davidedric; 7th March 2013 at 09:06 PM.

  4. #24
    Moderator Manfred M's Avatar
    Join Date
    Mar 2012
    Location
    Ottawa, Canada
    Posts
    22,260
    Real Name
    Manfred Mueller

    Re: colour channels in the histogram and 'good' white balance

    Okay; let's look at some histograms. These were created in Photoshop; we have a histogram of pure black with RGB values of (0,0,0), middle gray (128,128,128) and white (256,256,256). Not surprisingly, the histogram has a single bar that goes all the way up the y-axis.

    colour channels in the histogram and 'good' white balance


    The second image is 50% white and the rest of the image is a picture of a timber wolf lying on some snow. I also show a histogram of the image of the wolf only.

    colour channels in the histogram and 'good' white balance

    I suspect that this bar on the right side of the histogram going all the way up the y-axis is what Steve is referring to. The full image also shows a bar all the way up the right (and I double checked; there is no highlight clipping in the image). This is where I am coming from when I say there is no way to glean white balance information from the histogram because we cannot disagregate the pure white from the rest of the image.

  5. #25
    DanK's Avatar
    Join Date
    Dec 2011
    Location
    New England
    Posts
    8,933
    Real Name
    Dan

    Re: colour channels in the histogram and 'good' white balance

    Manfred,

    I assumed Steve was talking about a display of separate histograms of all of the color channels.

    If I understand right, all a monochrome histogram tells you is where along the luminance scale the pixels are clustered. In your shots, as a result of the snow, you have a lot within a short range of maximum luminance, hence the stacking near the right. WB would not affect this. However, the color temp of the light source would change the histograms of the color channels.

    I never use the histograms to analyze WB because the position and size of the various histograms depends on the source (the scene). however, I find it very useful to leave my camera set that way because I often find that one channel (most often, the red) is clipping when the exposure in the other channels is low enough that the monochrome histogram shows everything to be fine. I have lost detail in a number of flower shots that way.

    Dan

  6. #26

    Join Date
    Aug 2009
    Posts
    2,342
    Real Name
    Steve

    Re: colour channels in the histogram and 'good' white balance

    And that's when you use the grey point 128/128/128 (if you can see the right side of the histograms and there is white in the image, then all you have to do is adjust the right side. 256/256/256)............... (notice all three color channels are the same number.................ta da )............ Aligning the histograms to a neutral point. It may not be what you like, but it is a base line for adjusting an image.

  7. #27

    Join Date
    Aug 2009
    Posts
    2,342
    Real Name
    Steve

    Re: colour channels in the histogram and 'good' white balance

    Quote Originally Posted by DanK View Post
    Manfred,

    I assumed Steve was talking about a display of separate histograms of all of the color channels.

    If I understand right, all a monochrome histogram tells you is where along the luminance scale the pixels are clustered. In your shots, as a result of the snow, you have a lot within a short range of maximum luminance, hence the stacking near the right. WB would not affect this. However, the color temp of the light source would change the histograms of the color channels.

    I never use the histograms to analyze WB because the position and size of the various histograms depends on the source (the scene). however, I find it very useful to leave my camera set that way because I often find that one channel (most often, the red) is clipping when the exposure in the other channels is low enough that the monochrome histogram shows everything to be fine. I have lost detail in a number of flower shots that way.

    Dan


    We are not talking about monochrome, we are talking about color. Black / white / grey are all colors in a color image. The mix of colors R G B for these colors are all the same( pure black is 0,0,0---50% grey is 128,128,128---white is 256,256,256. When you adjust the white balance and map white to 256,256,256 all the other colors follow, thus adjusting the white balance.

  8. #28
    Moderator Manfred M's Avatar
    Join Date
    Mar 2012
    Location
    Ottawa, Canada
    Posts
    22,260
    Real Name
    Manfred Mueller

    Re: colour channels in the histogram and 'good' white balance

    Let me try approaching this from a slightly different direction.

    I've created three colour patches in Photoshop and on a blank (no content background, which gets converted to a white background when written to jpg). I isolated each patch and showed the histogram for each channel. Each colour has a value of 255; i.e. the red patch is (255,0,0); the green has values of (0,255,0) and the blue is (0,0,255).

    colour channels in the histogram and 'good' white balance


    So the histogram for each channel properly shows each swatch as 100% full colour value; BUT they are not in the same location, so we cannot assume that they represent a white value, even though the data is at the right side of the histogram. The bottom line is that the histogram is just the distribution of quantity (y-axis) of the value (0 -255) on the x-axis. It may or may not show the white value.

  9. #29

    Join Date
    May 2012
    Location
    northern Virginia suburb of Washington, DC
    Posts
    19,064

    Re: colour channels in the histogram and 'good' white balance

    I just now returned to the thread after being away from it all day and I don't believe the attention that is being given to the values of RGB on a single point of the X axis has anything to do with the OP's question. As I provide that question below as a convenience, I would like to point out that the question refers to an alignment of the color channels, meaning each entire channel, not one luminosity value such as 128 or 255.

    Quote Originally Posted by stuck View Post
    I'm wondering if one way of knowing that the colour balance is close to correct is to look at the alignment of the colour channels on the histogram. 'Right' being when they all more or less line up/overlap, as opposed 'wrong' when one channel is offset relative to the others.
    As such, my answer to the question remains that no, that alignment provides no indication as to whether the color balance is close to correct.

  10. #30

    Join Date
    Nov 2009
    Location
    Provence, France
    Posts
    992
    Real Name
    Remco

    Re: colour channels in the histogram and 'good' white balance

    Well, I did manage to get decent WB settings with adjustments based on the histogram.
    A few conditions though:
    there must be some white in the image
    highlights shouldn't be clipped

    I use a multicolour histogram in log mode (Y values are on a log scale), and adjust to
    have the right flanks for each colour coincide. It works very well on things like landscapes
    and other scenes with some pure white as highlight.

    @Steve: your demonstration of the use of the gray point on the flower picture is severely flawed:
    that particular image was taken with a custom WB set with a WiBal card (see Dan's post), so
    the WB in the original was technically correct (except in case of operator error). Adjusting the
    grey point would then give a completely false WB, and colours that are way off. (Note that
    the green in the centre of the flower is supposed to have a yellow cast, as it is surrounded by
    yellow petals)

  11. #31

    Join Date
    Aug 2009
    Posts
    2,342
    Real Name
    Steve

    Re: colour channels in the histogram and 'good' white balance

    Ok, i just did a test. I shot an image of a white piece of paper under incadescent light. I set the white balance to 2500K. I shot a base image. Then i created a color cast by shifting the white balance, with my white balance shift feature on my camera. I shifted it to full red, then full blue, then full green. This did as expected, and gave the images a red/blue/green color cast. I then adjusted the right side of the seperate RGB histograms, with color mode set to color. I then adjusted the left side with color mode set to color. Then i adjusted the mid range or grey point.

    Adjusting the right side or white point , took the color cast out of the highlights. The black point took the color cast out of the shadows. The grey point took it out of the midrange.

    It is apparent that in order to neutralize 'all' color casts, you have to set the black point, grey point , and white point. This will , however, leave the image 100% neutral and prob. cold looking. It will remove all wanted color casts.

    What i've been doing with my images, is to set the whitebalance to my liking with the sliders, and then adjusting the mid range or grey point to neutralize any heavy color casts. I'm not using they grey eyedropper, im adjusting it with the curves tool. I use this ,in combination with saturation to warm the image back up.

    Most of the time, you're histograms are lined up pretty good, and when you adjust the levels, the colors of the highlights and shadows are very close to being correct. It's the mid range , that i find is off more times than not. Don't know if it is right or wrong, but that's the way i like my images for now.


    Here are the results of my test.


    Base image as 2500k under incandescent light.
    colour channels in the histogram and 'good' white balance


    Base image with white point adjusted
    colour channels in the histogram and 'good' white balance


    Base image with black point adjusted.
    colour channels in the histogram and 'good' white balance


    jThe white point and black point was only levels adjustment , not color corrections.

    Base image color corrected in the mid range

    colour channels in the histogram and 'good' white balance



    For each of the color casts, the first is straigt out of the camera, the second is white point adjusted, third is black point and white point adjusted and fourth is Black, white, and mid range adjusted.


    Red cast..........


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance



    colour channels in the histogram and 'good' white balance

    Green cast..............


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance

    colour channels in the histogram and 'good' white balance


    Blue cast...............


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance


    colour channels in the histogram and 'good' white balance



    The last image of each set , are very similar in color correction. Maybe not quite exact, but very very close.


    I think this test shows you can get a neutral WB by using the histograms. Maybe not correct to the scene as it was photographed, but neutral.

  12. #32
    DanK's Avatar
    Join Date
    Dec 2011
    Location
    New England
    Posts
    8,933
    Real Name
    Dan

    Re: colour channels in the histogram and 'good' white balance

    try it with something that is not white. If you "balance" colors that are not in fact balanced in the image, you won't get an accurate representation. That's why your edits of my peony image were so unnatural and inaccurate. That's why people use a neutral source. (Your white paper was probably reasonably close.)

    The bottom line is simply that unless you are shooting a spectrally neutral source, playing with histograms will not necessarily get you closer to correct WB and can easily (as in the peony example) get you radically incorrect WB. In that case, you were starting with an image that HAD correct WB and made it incorrect by "balancing" the histograms. The way to get correct WB is simple: take a neutral source and set the three colors to be equal (as the LR eyedropper does). Luminance is largely irrelevant.
    Last edited by DanK; 8th March 2013 at 05:58 PM.

  13. #33
    Moderator Manfred M's Avatar
    Join Date
    Mar 2012
    Location
    Ottawa, Canada
    Posts
    22,260
    Real Name
    Manfred Mueller

    Re: colour channels in the histogram and 'good' white balance

    This technique reminds me of the old Photoshop "trick" to do a quick and dirty colour cast removal. It works reasonably well in "average" images. but throw an image with a colour bias at it, it will fail.

    Make a duplicate layer of the original image; apply the average blur and then invert these colours. Set the blending mode to Multiply, and voila! Quick and dirty colour cast removal. Try it with an image like your flower Dan, and you get the same false colour result.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •