Page 1 of 3 123 LastLast
Results 1 to 20 of 46

Thread: Is "White Balance" relative or absolute?

  1. #1

    Join Date
    Apr 2018
    Location
    Florida
    Posts
    115
    Real Name
    David

    Is "White Balance" relative or absolute?

    This question pertains to the editing (development) of digital images. The idea that the primary metric, I think, of “white balance” is a temperature (i.e., degrees kelvin) implies that it is absolute. However, my admittedly limited experience with image editing software (primarily GIMP and Rawtherapee) is concluding that it is relative.

    To start with I haven’t yet figured out how the editing software figures out the value for the temperature that it uses as a starting point. In my case we’re talking primarily about the situation where cameras are set to automatically figure out what value to use. In a jpg file the metadata seems to only specify “auto” but the editor will arrive at a temperature (e.g., 6490). Then when I change that value and export an edited file with a different value (e.g., 8000) the metadata still says “auto”. When I then open the exported file the same editor seems to conclude that “auto” translates the same way as when opening the unedited file (e.g., 6490). However, the newly opened version of the image (e.g., now showing 6490 for the temperature) looks, to these eyes, the same as the version that was exported (e.g., with a temperature of 8000). I’m certainly glad to see that the appearance of the exported image doesn’t change when it is reopened in the same software but I am confused about the meaning of the temperature metric being used to specify “white balance”.

    The image editing software I’m using doesn’t seem to do anything to update/alter the metadata associated with the file based on changes made to “white balance”. I suppose this further argues that it is a relative value and the specific value (number of degrees) used for a starting point is pretty meaningless. I was thinking that one purpose for metadata would be to track such changes but possibly it just doesn’t matter. In that, is there any reason to want to know the temperature value at a later time?

    Even if the temperature value is meaningless for editing I find myself at least curious about how the editing software converts what is specified in metadata into degrees kelvin.

    Of course my real reason for posting this thread is to learn from more knowledgeable folks what’s actually happening when editing images?

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

    re: Is "White Balance" relative or absolute?

    First of all, as with all things photographic, there is no "simple" answer.

    White balance is a property of an image file, much like the colour space and gamma. Auto is determined by an algorithm that I have no access to, although I guess is I spent enough time examining the source code of RawTherapee, one might be able to figure it out that particular piece of software does the calculation. A JPEG has the white balance "baked in" when the data is converted to an image file by the raw converter, so one cannot change the white balance of any image file. White balance can only be changed when the raw data is being manipulated, so what you are seeing in the JPEGs is as would be expected; the metadata could include the colour temperature setting that was used in the conversion and could also tag the method used.

    A simple way of looking at how the "correct" Kelvin setting is calculated would be to apply an averaging blur to the image and then see how close the R, G and B values are to each other and apply a colour correction to the data so that all three channels read the same and then apply those settings to the actual data.

  3. #3

    Join Date
    Apr 2018
    Location
    Florida
    Posts
    115
    Real Name
    David

    re: Is "White Balance" relative or absolute?

    My idea is that “white balance” (WB) is a parameter (some might call it an argument) used by the algorithms that are used for developing the image from the data collected by the camera (i.e., raw data). The value assigned can be changed and this produces a change in the appearance (i.e., rendering of colors) for the image file produced from executing the development algorithm/s. Therefore, I get the idea that the camera has to come up with a value to specify for this parameter in order to develop the image. When the camera is set to do this automatically I think that might mean that there are other algorithms the camera uses to deduce such a value based on conditions of the scene being photographed. In this sense it surely is a property of the resulting image file. It sounds like the answer to my question is that there is no way to tell what value was used. While most people couldn’t care less, those of us trying to understand digital editing are at least curious.

    However, at least in the case of Rawtherapee, and I suspect other software used to develop digital images, a camera developed image (i.e., jpg file) can be opened and the various tools applied to it. In the case of the WB tool the degrees kelvin can be changed and it does affect the appearance of the image. When I export such an image to produce another image file, I had in mind that for this new image the WB property was different than for the original image. But what I find is that when this new image is opened in the same editing software the same value for the WB parameter is used as for the original image. In that it is more like a constant than a variable. This is certainly consistent with the notion that there is no way to tell what value was assigned to this parameter when the given image was developed.

    If this is all true that would fit what I was meaning when suggesting the value is relative rather than absolute. In that, the development software can add or subtract some number of degrees but the starting value is pretty meaningless.

    A distinction of raw files is that once produced by the camera they never change. Therefore when working with raw files, the use case I described could never occur. I appreciate the advantage of raw files and I do prefer them for photos I’m shooting now. However, I have lots of camera developed images that I also have an interest in enhancing as I learn more about how digital image development works.

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

    re: Is "White Balance" relative or absolute?

    First of all, my camera has a number of ways of assigning the colour temperature / white balance to an image. I can either use a preset like Sunlight, Cloudy, Shade, Tungsten and this will assign a "hard" value to the data that is part of the metadata; for instance, a Daylight or Flash setting will use a value of 5500K. I can also manually dial in a value or I can shoot a gray card and let the camera determine an appropriate colour temperature based on that reading. I can also let the camera calculate a white balance (AWB) value using the metering system and algorithms that the camera manufacturer has assigned. If I shoot in JPEG + Raw, these values are "baked" into the JPEG and are available to the raw converter software via the metadata. I also have to choose a colour space (in my case, I have to pick either sRGB or Adobe RGB) and this colour space is used in the JPEG file too.

    I use three different raw processors in my work; Adobe Camera Raw / Lightroom, DxO PhotoLab and Phase One Capture One, depending on the image that I use. All three handle both raw data and JPEG data slightly differently, so what you are asking about is really more about how RawTherapee was coded.

    When you shoot in JPEG, your camera creates an image file, which is what you see when you look at the screen on the back of your camera. It does a lot of work for you including the colour temperature, bit-depth, colour space and gamma curve, which are "baked" into the file. It will also sharpen, add contrast and do noise reduction, as required. With the exception of the gamma, which is predetermined by the software developer, you have to make all of the other choices yourself when you are working with raw data.

    When working with a JPEG, you are starting with whatever is in the file created by the camera. If you use a narrow colour space like sRGB, you will never be able to get colours outside of that colour space back. A JPEG uses 8-bit encoding, regardless of what your camera can produce (12-bit for older amateur cameras, 14-bit for most current higher end cameras and 16-bit for some of the current Medium Format cameras). The colour space will be baked in, as will the gamma encoding. Whatever sharpening, contrast, white balance, noise reduction was applied by the camera will be your starting point. When working with raw data, you have to do all those things yourself (with the exception of Gamma).

  5. #5

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by ajax View Post
    This question pertains to the editing (development) of digital images. The idea that the primary metric, I think, of “white balance” is a temperature (i.e., degrees kelvin) implies that it is absolute. However, my admittedly limited experience with image editing software (primarily GIMP and Rawtherapee) is concluding that it is relative.
    In color theory, what is being called "White Balance" in this thread is usually called "Reference White". The reference white for any color space is indeed an absolute value; for example, the reference white for sRGB is defined by the CIE as "D65" which is an exact point on the 1931 chromaticity diagram: those reference white values are x = 0.312727, y = 0.329023 and those are absolute values for a point just above (not on) the Planckian line at 6500 or so degrees K.

    Same comment applies to any other color space, just with different absolute numbers, for example D50 for ProPhoto.

    Any adjustment to an image that changes the sRGB reference white to another value, in order to account for different lighting, I refer to as "color balancing". The new reference white can be expressed with absolute x,y values or relative, depending on one's preference.

    HTH
    Last edited by xpatUSA; 18th April 2018 at 02:57 AM.

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

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by xpatUSA View Post
    In color theory, what is being called "White Balance" in this thread is usually called "Reference White". The reference white for any color space is indeed an absolute value; for example, the reference white for sRGB is defined by the CIE as "D65" which is an exact point on the 1931 chromaticity diagram: those reference white values are x = 0.312727, y = 0.329023 and those are absolute values for a point just above (not on) the Planckian line at 6500 or so degrees K.

    Same comment applies to any other color space, just with different absolute numbers, for example D50 for ProPhoto.

    Any adjustment to an image that changes the sRGB reference white to another value, in order to account for different lighting, I refer to as "color balancing". The new reference white can be expressed with absolute x,y values or relative, depending on one's preference.

    HTH
    In terms of colour theory and defining a colour model, I would agree with you.

    In terms of answering David's question, I would suggest otherwise. Even when I shoot a white or grey target as a reference in a shot, I will generally tweak the image for the "look" I am after. Real world colour does not have pure theoretical illuminants, but real life sources that are impacted by the environment the picture is taken in. I sometimes wonder how I was able to shoot acceptable images for many decades using film that came in only two "flavours"l daylight and tungsten (technically 3200K Photoflood output).

  7. #7

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by Manfred M View Post
    In terms of colour theory and defining a colour model, I would agree with you.

    In terms of answering David's question, I would suggest otherwise.
    His basic question is in the title: "Is White Balance relative or absolute?"

    I showed that a white balance setting is absolute. For example WB in ACR comprises of a temperature and a tint. Those are absolute values in my book and can be traced directly to CIE white point values which are of course absolute.

    Therefore, the following looks like typical photographic Real World obfuscation, unfortunately.

    Even when I shoot a white or grey target as a reference in a shot, I will generally tweak the image for the "look" I am after. Real world colour does not have pure theoretical illuminants, but real life sources that are impacted by the environment the picture is taken in. I sometimes wonder how I was able to shoot acceptable images for many decades using film that came in only two "flavours"l daylight and tungsten (technically 3200K Photoflood output).
    "Tungsten" is technically 2850K. Sounds like "Photoflood", whatever that is, might be Halogen?
    Last edited by xpatUSA; 18th April 2018 at 05:30 AM.

  8. #8
    dje's Avatar
    Join Date
    May 2011
    Location
    Brisbane Australia
    Posts
    4,636
    Real Name
    Dave Ellis

    re: Is "White Balance" relative or absolute?

    Hi David

    White balance is fundamentally about getting a neutral gray object to have equal R,G and B values in the processed image. The raw RGB values are not equal as a result of two main factors


    1. The unequal response to spectrally uniform light of the three channels in the camera
    2. The spectral response of the actual illuminant is not uniform


    When the camera does it's calculation of how to correct for these two factors, it comes up with a set of channel multipliers which are embedded in the raw file. eg Rx1.5, G x1, B x0.95. It is these multipliers that are used by the raw processor to implement White Balance. The contribution to these multipliers from 1 above will always be the same for a given camera however the contribution from 2 above varies according to the nature of the illuminant. For this reason, a white balance adjustment is seen as adjusting for the illuminant, which is characterised by a correlated color temperature.

    The raw processing software calculates the color temperature from the multiplier values, a camera color profile and the known color characteristics of black body radiators at different temperatures. However because real life illuminants aren't true black body radiators, there is also a tint factor introduced to make allowance for this.

    So the color temperature is never actually measured, it is just a conventional and convenient way of organising the software user interface.

    This is a very simplified account of course.

    Dave

    Extra comments : The details above refer to what is commonly referred to as "As Shot" white balance. Subsequent WB adjustments can of course be made in the raw processor using presets, the white color picker on a suitable gray target in the image, or adjustment of the color temp and tint.
    Last edited by dje; 18th April 2018 at 09:05 AM. Reason: Extra comments added

  9. #9

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by dje View Post
    Hi David

    White balance is fundamentally about getting a neutral gray object to have equal R,G and B values in the processed image. The raw RGB values are not equal as a result of two main factors


    1. The unequal response to spectrally uniform light of the three channels in the camera
    2. The spectral response of the actual illuminant is not uniform


    When the camera does it's calculation of how to correct for these two factors, it comes up with a set of channel multipliers which are embedded in the raw file. eg Rx1.5, G x1, B x0.95. It is these multipliers that are used by the raw processor to implement White Balance. The contribution to these multipliers from 1 above will always be the same for a given camera however the contribution from 2 above varies according to the nature of the illuminant. For this reason, a white balance adjustment is seen as adjusting for the illuminant, which is characterised by a correlated color temperature.

    The raw processing software calculates the color temperature from the multiplier values, a camera color profile and the known color characteristics of black body radiators at different temperatures. However because real life illuminants aren't true black body radiators, there is also a tint factor introduced to make allowance for this.

    So the color temperature is never actually measured, it is just a conventional and convenient way of organising the software user interface.

    This is a very simplified account of course.

    Dave
    How does the software determine equal RGB values if there doesn't exist RGB yet. The RAW file contains R,G and B values, not RGB values.
    I can use a gray point to correct an existing RGB raster image.
    In CaptureNx I can't correct the white balance in a jpeg, though I can use the gray point correction.

    George

  10. #10
    dje's Avatar
    Join Date
    May 2011
    Location
    Brisbane Australia
    Posts
    4,636
    Real Name
    Dave Ellis

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by george013 View Post
    How does the software determine equal RGB values if there doesn't exist RGB yet. The RAW file contains R,G and B values, not RGB values.
    Yes George i was probably a bit loose with my terminology. As far as I know, in the raw processor, WB is usually applied before de-mosaicing so it is applied to the individual R,G and B channel values.

    Dave

  11. #11

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by dje View Post
    Yes George i was probably a bit loose with my terminology. As far as I know, in the raw processor, WB is usually applied before de-mosaicing so it is applied to the individual R,G and B channel values.

    Dave
    What I have learned is that with nikon by example the rgb metering sensor is determining the correction of the individual channels. The idea is that the average color is gray. I'm not sure but it did make sense.

    George

  12. #12
    pnodrog's Avatar
    Join Date
    Sep 2012
    Location
    Nomadic but not homeless, ex N.Z. now Aust.
    Posts
    4,154
    Real Name
    Paul

    re: Is "White Balance" relative or absolute?

    George makes a valid point.

    A RAW file does not contain RGB values. It is made up of the output values of each pixels A/D conversion. RGB values are assigned during the demosaicing process which I understand includes the sensitivity correction for the colour filter array (usually Bayer) characteristics and sensor spectrum response. At this point the WB of the RGB values will probably be based on an absolute white point and then adjusted for colour temperature either as determined by the camera or set by the photographer.

    Capturing an image under one set of lighting conditions (unless exceptionally controlled) and then adjusting the image to another colour temperature is in the main an aesthetic exercise. Human visual response adjusts our perception of colours under different lighting towards our memory's expectation. Photographers and artists may see the orange tint of the white cat they are looking at during a sunset far more strongly than most people. Successfully correcting a photo of the cat that will be viewed under different lighting is inevitably a subjective/aesthetic rather than absolute or theoretical adjustment.

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

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by xpatUSA View Post
    "Tungsten" is technically 2850K. Sounds like "Photoflood", whatever that is, might be Halogen?
    Photofloods were common when I started into continuous light photography in the early 1970s and were also referred to as "Over-run" bulbs. These were simply regular tungsten bulbs that had special thinner filaments that glowed somewhat hotter 3200K than the standard tungsten bulbs of the day. Rather than a rated life of hundreds of hours, they would burn for somewhere around 10 hours. Halogen bulbs had not made their debut in any significant way in those days.

    These "tungsten" emulsions were primarily used in the motion picture industry but were also available in at least 35mm film. Instead of giving the heavy orange colour cast that was typical of using daylight film indoors, they gave a more neutral colour rendering. This was better than shooting with correction filters on day light film because the effective using a Wratten 85B filter (5500K to 3200K) lost close to a stop of light.

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

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by pnodrog View Post
    viewed under different lighting is inevitably a subjective/aesthetic rather than absolute or theoretical adjustment.
    Agree 100% Paul.

    Outside of a studio, where the light sources can be controlled reasonably well and the walls are generally neutral, real world photography does not give us colour cast free images where dialing in the theoretical white balance will not always work. Sit someone under a tree and there will generally be a green colour cast. Stand someone beside a red brick wall, and the scene will have a slight red colour cast, and of course, take a shot of a white cat (or a bride in a white wedding dress) at sunset and there will be an orange colour cast.

    That being said, I have had the opportunity to shoot in a studio where we have a mix of 15 year old studio lights and some new ones and getting a 100% neutral shot is impossible. The flash tubes yellow as they age and do cast a warmer light.

    That being said, vision, as you have pointed out is that there is a psychological as well as physiological component to colour vision, so a purely technical view on the "correct" white balance does not always work. As an example, in my experience, most people prefer a slightly warmer skin tone than what a purely neutral gray or white target provide.
    Last edited by Manfred M; 18th April 2018 at 02:03 PM.

  15. #15

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by george013 View Post
    How does the software determine equal RGB values if there doesn't exist RGB yet.?

    George
    My cameras convert the sensor signals to XYZ space using a 3x3 matrix, tagged CamToXYZ.

    Is "White Balance" relative or absolute?

    Then, for each in-camera "WB" setting, there is a WB correction 3x3 matrix but the output from each correction is still in XYZ space.

    All those matrices are passed in meta-data to the converter for use on raw files. They are also used in-camera for a) the LCD previews and b) for the JPEG that is embedded in the raw file and c) for the OOC JPEG if JPEG output has been set in-camera.

    Transformations from XYZ to RGB colorspace are well-known and are defined in the literature.

    How it is done with a Bayer CFA system has already been explained to an extent.

  16. #16

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by xpatUSA View Post
    My cameras convert the sensor signals to XYZ space using a 3x3 matrix, tagged CamToXYZ.

    Is "White Balance" relative or absolute?

    Then, for each in-camera "WB" setting, there is a WB correction 3x3 matrix but the output from each correction is still in XYZ space.

    All those matrices are passed in meta-data to the converter for use on raw files. They are also used in-camera for a) the LCD previews and b) for the JPEG that is embedded in the raw file and c) for the OOC JPEG if JPEG output has been set in-camera.

    Transformations from XYZ to RGB colorspace are well-known and are defined in the literature.

    How it is done with a Bayer CFA system has already been explained to an extent.
    Are those figures constants?
    And how does the camera correct for different light sources without knowing what the light source is?

    George

  17. #17

    Join Date
    Apr 2018
    Location
    Florida
    Posts
    115
    Real Name
    David

    re: Is "White Balance" relative or absolute?

    Cannot find anything like that in the metadata for my (Canon) cameras!

  18. #18

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: Is "White Balance" relative or absolute?

    Quote Originally Posted by ajax View Post
    Cannot find anything like that in the metadata for my (Canon) cameras!
    The exif in the jpg is the situation when that image was created. It contains the camera settings and the variables used to create the RGB pixels. In matter of fact the exif is builded with a lot of different chapters. To give some idea http://www.exif.org/Exif2-2.PDF. I didn't read it.
    What you're doing when changing the color temperature is post processing. That's not in the exif.

    If you're interested you might have a look in exiftools. https://sno.phy.queensu.ca/~phil/exi...Tag-operations. Do your own search and find out how info there's in the exif. And how you can extract it.

    George

  19. #19

    Join Date
    Apr 2018
    Location
    Florida
    Posts
    115
    Real Name
    David

    re: Is "White Balance" relative or absolute?

    Sorry, guess I was guilty of too much brevity. My conclusion came from looking at raw files with ExifTool where I exported metadata to txt file for purpose of better searching.

  20. #20

    Join Date
    Apr 2018
    Location
    Florida
    Posts
    115
    Real Name
    David

    re: Is "White Balance" relative or absolute?

    Well now, not sure what remains on this topic but I certainly feel like I've been to WB School. Very grateful to all for that.

    My question arose when trying to edit images that were already developed by the camera and it now seems that WB is primarily a topic that apples to raw file development. Would it be correct to conclude that while the WB tool of the editing software can be applied to previously developed image files that this is not really the purpose of the tool? In that, once the image is developed WB (i.e., color temperature) becomes meaningless. As such, the effect of iteratively revising (i.e., applying the WB tool to) a previously developed image is the same irrespective of starting point.

    I must admit that my purpose when editing previously developed images was to use the WB tool to create what could be called a desired affect rather than faithful rendering for lighting of the original scene. I might like to call this artistry, which might be a bit of stretch for me, rather than accuracy.

    Something I have now recognized subsequent to my original question is that I can take a raw file to my computer and when using the editing software supplied by the camera maker (Canon in my case) the default computer based development produces an image that appears to be the same as the camera developed image. This implies that the raw file supplies all the data needed to reproduce the in camera development. Looking at the metadata for a raw file indicates what looks to me like a lot of parameters pertaining to WB. Most interesting are a few of these values referred to as "ColorTempAsShot", "ColorTempAuto", and "ColorTempMeasured" which all happen to be the same (6339). The camera was likely set to automatically determine WB. None of this metadata is included in the developed jpg or tif file. Also interesting is that Rawtherapee defaults to what it calls the "Camera" supplied value which while close (6282) I cannot find anywhere in the raw file metadata. When I do the same thing with the Canon supplied software (DPP4) the editor opens with a temperature value (5200) that is also the value assigned in the metadata to a parameter called "ColorTempDaylight". While this all leaves me a bit confused I suppose that has mostly to do with the nuance associated with what are obviously pretty complex programs.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

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