How can I read the as-shot white balance/color temperature from a Nikon NEF RAW file?
Asked 12/26/2014
6 views
2 answers
0
I shoot Nikon NEF files in Auto White Balance and want to extract the camera’s as-shot white balance programmatically. Standard EXIF fields such as ColorTemperature may show 0, while Adobe Camera Raw displays values like temperature and tint when the file is opened. Is that Kelvin value actually stored in the NEF, or is it derived from RAW white-balance multipliers or maker-note data? Are there tools or tags I can read directly to get the as-shot WB information?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
3
The problem with color temperature expressed in Kelvins is that they do not refer to a single color bias - the same temperature can be expressed with different color values. So for raw files, it is more useful to keep this information as series of two or three color values as opposed to K. You could use
exiftool -AsShotNeutral <raw file name>
with some cameras, but it won't work with all. These numbers can be recalculated to K, so raw editors can show the K value.
That said, I suspect that in case of AWB the K value may not be recorded in the file at all.
Update based on edit of the original question:
And, we are no closer to a simple formula translating the NEF EXIF WB* "multipliers" into useful Temp/tint which can be plugged into an XMP file for ACR to use to transmute a raw.
I don't know how to decipher the NEF data, but from your update it looks like DNG converter can at least convert that to AsShotNeutral. And as far as AsShotNeutral is concerned, it can be converted to temperature and tint, but in order to do that, you would need additional profile data to do that. If I recall correctly, the DNG SDK sample code might have some example how to do that.
Originally by user27944. Source · Licensed CC BY-SA 4.0
user27944
11y ago
0
Generated from our catalog & community — verify before relying on it.
Usually, the RAW file does not store a simple Kelvin value for Auto White Balance. Instead, it often stores white-balance data as channel multipliers/neutral values, and RAW converters derive the displayed Temperature/Tint from those values.
A practical way to inspect this is with ExifTool, for example:
exiftool -AsShotNeutral yourfile.nef
That tag can expose the as-shot neutral/multiplier information on some cameras, though not all. In Nikon files, maker-note WB data may also exist, but there is no universal simple formula that maps Nikon WB multiplier tags directly to the exact Temperature/Tint numbers Adobe Camera Raw shows. Different converters may calculate or present those values differently.
So the key point is:
- AWB Kelvin may not be recorded explicitly in the NEF.
- What is usually recorded is underlying WB multiplier data.
- Software like ACR converts that into a human-friendly Temperature/Tint display.
If you want to see Nikon’s own interpretation, Nikon ViewNX 2 can display the white balance and shows a color temperature value in its white-balance controls.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
Does Aperture 3 use the camera’s white balance for RAW previews?
Can large white balance corrections in RAW processing increase visible noise?
How do Lightroom and Photoshop determine white balance temperature from a Canon RAW file?
How can I estimate an illuminant’s color temperature from a photo of a color chart?
Why can DNG “As Shot White XY” metadata change even with manual white balance set?