# White Balance Discrepancy - RAW vs. LR import



## corytomlinson (Jan 26, 2010)

Hi everyone. I have a problem I hope someone can help me resolve.

I get a discrepancy in the "As Shot" White Balance of a RAW file that has been imported into Lightroom 2.6 vs. the actual White Balance of the RAW image. Here is a screenshot example.. http://twitpic.com/ztmd4

The RAW image was created with a custom white balance of 55''k and yet when I import the RAW image into Lightroom (ensuring that Develop Settings is set to None) the "As Shot" white balance is 51''k. Is there something going on I'm not aware of that can account for this discrepancy?

Thanks!


----------



## Mark Sirota (Jan 26, 2010)

Welcome to Lightroom Forums!

This is normal. The white balance is not recorded in the raw file as degrees kelvin -- it is recorded as coordinates in a color profile, which is then translated back to degrees by Lightroom using its own color profile. Because the camera makers do not share the details of their raw files, Adobe created their own, and they differ slightly from the camera's.

However, neutral is still neutral. You can safely ignore the numeric discrepancy.


----------



## clee01l (Jan 26, 2010)

[quote author=Mark Sirota link=topic=9'45.msg6'895#msg6'895 date=1264535543]
Welcome to Lightroom Forums!

This is normal. The white balance is not recorded in the raw file as degrees kelvin -- it is recorded as coordinates in a color profile, which is then translated back to degrees by Lightroom using its own color profile. Because the camera makers do not share the details of their raw files, Adobe created their own, and they differ slightly from the camera's.

However, neutral is still neutral. You can safely ignore the numeric discrepancy.
[/quote]Also you might note that setting the WB in the camera only affects the in camera processing which applies only to JPEG files produced by the camera. A RAW file from your camera will not have any WB applied to the values recorded by the sensor. If it did, it would cease to be a RAW image. The EXIF values that you see only reflect the settings that would be applied if a JPEG is produced from your RAW file. If you have proprietary post processing software or can produce a JPEG in the camera from a RAW image, these seetting would be used to post process the RAW file to produce the 8 bit JPEG that would have been genersted by the camera IF the camera was writing JPEG files.


----------



## corytomlinson (Jan 26, 2010)

Thanks very much for the quick and detailed replies.

I understand what you're saying with regards to RAW data however I'm still not clear why Lightroom applies a color temp of 51''k when the information from the camera suggests it should be 55''k? It certainly should not be calling it "As Shot" because it's not.

I guess the solution for me then is to create a develop preset to apply the white balance "As Really Shot" on import or to batch apply the settings after import. Not an issue for images shot under controlled lighting but I'm not sure how I feel about how things will be handled when I shoot with Auto WB in camera and having LR ignore my camera settings completely.

What happens if I convert the RAW image to DNG outside of Lightroom and then import. Does LR still apply its own color profile when importing a DNG image in the same way it does for a RAW file? In other words will it look at a DNG image with a color temp of 55''k and import it using 51''k?


----------



## trevorguy (Jan 26, 2010)

> Also you might note that setting the WB in the camera only affects the in camera processing which applies only to JPEG files produced by the camera


 
I think you will find that LR respects the WB setting of the camera when processing the RAW file, it is one of the few adjustments it does use from camera.


----------



## b_gossweiler (Jan 27, 2010)

[quote author=corytomlinson link=topic=9'45.msg6'9'4#msg6'9'4 date=12645424'5]... I'm still not clear why Lightroom applies a color temp of 51''k when the information from the camera suggests it should be 55''k? It certainly should not be calling it "As Shot" because it's not. ...
[/quote]

Yes, it is. You will notice that the image with the value "51''" in Temp matches the appearance of the color temperature of a JPG rendered by your camera at 55''K.

Here is some reading I found on another forum by one of the main writers of the ACR/Lightroom RAW code:

[quote author=Thomas Knoll]&gt;Thomas Knoll - 1':47am Sep 25, '5 PST (#1 of 1'1) Edited: 25-Sep-2''5 at 12:57pm
This is the normal and expected result of Adobe Camera Raw and Nikon using different camera profiles and algorithms, and is not a bug.
Because of the different camera profiles being used, when matching white balance values Camera Raw can either match the white balance appearance (which colors are exactly neutral) or the white balance numbers (exact Kelvin/Tint numbers). In these cases, Camera Raw chose to match the appearance, not the numbers.
Even if the white balance matches, I don't expect an exact overall appearance match since Camera Raw and Nikon software use a different tone curve and rendering algorithms for non-neutral colors. 
[/quote]

Beat


----------



## corytomlinson (Jan 27, 2010)

Thanks for the additional input.

If this is a "normal" condition then it seems crazy to me. The number on the scale and the appearance of the color are not mutually exclusive so how can one justify the explanation that "Camera Raw chose to match the appearance, not the numbers"? If I shoot using lights with a temperature of 55''k and I program my camera to record the color temperature at 55''k how can Lightroom possibly justify telling me that the color's appearance is correct based on the RAW data but the temperature is actually 51''k?

Furthermore, if I change the WB in Lightroom to the "Flash" preset which is 55''k, and which represents the actual condition under which the image was created, then the image becomes unnaturally warm.

It leads me to the question: How does one ever obtain the a consistently accurate white balance using Lightroom?

AND

What purpose do the white balance presets in Lightroom provide when the appearance and the numbers don't match?


----------



## Mark Sirota (Jan 27, 2010)

You are placing an inappropriate amount of faith in the numbers.

The numbers aren't real -- they are calculated as a function of the neutral color, as positioned within the color profile used to process the raw data.

The neutral color set in the camera is still neutral in Lightroom. That's what really matters. Don't go by the numbers.


----------



## sizzlingbadger (Jan 27, 2010)

I don't want to confuse matters but.....

The WB numbers from both my Nikons match exactly in LR. This *could* be because LR/ACR can read the WB data in the Nikon NEF. Maybe the Sony RAW file cannot be read directly so LR has to calculate it as Mark has suggested. This is a guess of course, I don't know the answer.


----------



## Mark Sirota (Jan 27, 2010)

Nik, have you installed custom profiles into your cameras? I haven't, and mine don't match Lightroom (D2'' and D7'').

I am 99% certain about the way white balance is stored in the raw file, and the way Lightroom derives the temp/tint values from it.


----------



## sizzlingbadger (Jan 27, 2010)

I use the latest ACR profiles on a D3'' & D7''


----------



## sizzlingbadger (Jan 27, 2010)

I have just tested this out (D7'') and your right they are different. I'm sure mine were the same when I was creating custom profiles and that led me to believe that they always matched. I no longer use a custom profile and never thought twice about the WB settings.

Camera   LR
25''K  26''K
3'3'K  295'K
385'K  37''K
526'K  5'5'K
833'K  76''K

Perhaps a custom profile would be a workaround for Cory ?


----------



## corytomlinson (Jan 28, 2010)

Thanks again guys for the responses.

Mark, I understand what you're saying about the numbers just being a function of neutral color but if I can't base my white balance on the numbers then I can't use the Lightroom presets for color temperature either. Because they are based on a number and that number doesn't correlate with the number coming from my camera. 55''k != 55''k

Nik, this whole question came about for me because I was trying to create a custom color profile for my studio lighting conditions. The sample image that I provided in my original post is image data from a RAW capture of an x-rite ColorChecker chart. That's why I was confused when I saw Lightroom assign a color temp value of 51''k to my RAW image when there is no question that the color temperature emitted from the light was 55''k and the camera's custom white balance was also set to 55''k. Yet even with a LR assigned 51''k when I open the image in PS and check the grey patch the RGB values are almost dead on 2'' where they should be for an accurate white balance. Huh?

And by the way I don't think it has anything to do with it being a Sony file because it handles a DNG version of the image the same way. I converted the RAW in DxO Optics Pro to a DNG and then imported the DNG into Lightroom and it still assigns a color temperature of 51''k. So I suspect that Mark might be more than the 99% right that he suggests regarding how Lightroom derives the temp/tint values.

It's still doesn't make sense to me why the numbers don't match up between the two. It's a bit like telling me that when it's 3' degrees outside it's not really 3' degrees outside it's 26. What's worse is that had I not noticed I might have simply have just selected the "Flash" preset assuming that Lightroom's 55''k would accurately match the 55''k under which the image was shot but instead what I would end up with are images that are too warm.

So how do you guys handle setting white balance in Lightroom when you shoot with auto white balance in your camera? Do you trust the camera to do a good job and leave the white balance "As Shot" or do you choose "Auto" or use the White Balance Selector tool?


----------



## Kiwigeoff (Jan 28, 2010)

If I'm thinking this rightly it is like this.The numbers will be different as the different processing algorithms interpret the raw data differently. So to achieve a similar appearance from what will be differing points at which the w/b is entered differing kelvin numbers will be needed.e.g. NX Nikon processes the sensor info as 45 65 75 and adds 5125k to give a neutral 65 65 65ACR processes the same sensor info as 55 65 85 and adds 535' to give a neutral 65 65 65Same end result different combination of numbers to produce it. (the numbers have no meaning, I just picked them)Does that make sense??The temperature used is just like a colour filter with the sensor data being the "light source". Nikon and ACR produce different "light sources."


----------



## James_N (Jan 28, 2010)

Not quite. The only in-camera settings read by Lightroom (and Adobe Camera RAW) are ISO, aperture, and shutter speed. This is also true for ALL other third-party RAW converters.

WB is an entirely different matter. In a digital workflow color temperature/white balance is not a tightly controlled parameter. A digital camera does not store WB as a discrete, single number. There are several ways in which WB is stored but usually it is expressed as a set of multipliers to be applied to each color channel. The color profiles used by Lightroom and ACR differ from those used by the camera manufacturers so the color temperature number computed from the gains is also different.

The bottom line though is that the results as measured in the image are the same.  White is still rendered white, black is still rendered black and greys are still rendered neutral. The only way to have all the in-camera parameters read and applied is to use the RAW converter provided by each manufacturer.

I have my own theory why this is the case. Those of us who have followed Adobe for quite a while will no doubt recall the controversy around Nikon's decision to encrypt the WB information in the D2X camera. See here for reference: Nikon encrypts D2X white balance metadata
It was only until David Coffin cracked the encryption with DCRAW that Adobe was able to parse WB metadata from the D2X. If you read the DCRAW website you'll see that Photoshop is listed as one of the applications using DCRAW code (Lightroom did not exist at that time). Presumably Adobe is doing it to avoid lawsuits from camera manufacturers. An individual coder/developer without deep pockets can take risks that Adobe is probably unwilling to do.

[quote author=trevorguy link=topic=9'45.msg6'914#msg6'914 date=1264549441]





> Also you might note that setting the WB in the camera only affects the in camera processing which applies only to JPEG files produced by the camera




I think you will find that LR respects the WB setting of the camera when processing the RAW file, it is one of the few adjustments it does use from camera.
[/quote]


----------



## Mark Sirota (Jan 28, 2010)

[quote author=corytomlinson link=topic=9'45.msg61'34#msg61'34 date=126466'668]
Mark, I understand what you're saying about the numbers just being a function of neutral color but if I can't base my white balance on the numbers then I can't use the Lightroom presets for color temperature either. Because they are based on a number and that number doesn't correlate with the number coming from my camera. 55''k != 55''k

...

It's still doesn't make sense to me why the numbers don't match up between the two. It's a bit like telling me that when it's 3' degrees outside it's not really 3' degrees outside it's 26. What's worse is that had I not noticed I might have simply have just selected the "Flash" preset assuming that Lightroom's 55''k would accurately match the 55''k under which the image was shot but instead what I would end up with are images that are too warm.[/quote]

Two things:
- The color of the light source cannot be expressed as this single number anyway. It isn't enough information. That's why we measure a known subject in the light, and use that for white balance,
rather than just setting the number. (You've done this.)

- It's not just the color temperature in degrees Kelvin; it's the combination of the color temperature and the measuring system (color profile) that determines white balance. This isn't an absolute, like measuring the length of a piece of paper. What 55''K will measure as white in one color profile, yellow in another, and blue in a third. You need to specify both the temperature and the profile.

The camera doesn't use the same profile as Lightroom, so 55''K appears different in each.

[quote author=corytomlinson link=topic=9'45.msg61'34#msg61'34 date=126466'668]
So how do you guys handle setting white balance in Lightroom when you shoot with auto white balance in your camera? Do you trust the camera to do a good job and leave the white balance "As Shot" or do you choose "Auto" or use the White Balance Selector tool?[/quote]

I shoot a white balance target under the same lighting, then use the dropper in Lightroom on that frame. Then sync the white balance values to the rest of the shoot.

I leave the camera in Auto, unless it does a really awful job, which it does in some lighting. In that case I'll take a shot of that same white balance target which fills the frame, then use that frame to set the camera's WB, so that the histogram will be closer to the truth (which is the only reason I care about setting WB in camera).


----------



## sizzlingbadger (Jan 29, 2010)

and then you warm it up a bit using your eye as it looks a bit better


----------



## b_gossweiler (Jan 29, 2010)

[quote author=sizzlingbadger link=topic=9'45.msg61'9'#msg61'9' date=1264724392]
and then you warm it up a bit using your eye as it looks a bit better  
[/quote]

LOL, is that what's the entire two page thread about   

Beat


----------

