When shooting RAW images in AUTO WhiteBalance mode, the camera will somehow determine what it thinks is a good WB for the picture. In Photoshop (CS6), there is no way I can find to extract the ColorTemp; the EXIF:ColorTemperature reads "0" and the WhiteBalance="AUTO".
When you bring the NEF (for Nikon) into Adobe Camera Raw (ACR), it will show the ColorTemp (like "5550") and the "TINT" (like -4) the camera estimated when the image was shot.
ACR almost certainly conjurers the ColorTemp and the Tint from the EXIF:WB_GRBGLevels (like "256 496 371 256") constants which characterize the picture’s colors. The only way I can get to these is to:
- right click on a NEF
- Select Open in Photoshop (which launches Adobe Camera Raw)
- In ACR, click on the right side icon on the BASIC menu
- Click on Export settings to XMP
Results from exported XMP: D:\pic\new\cd-2014.1225-nef>egrep "Temp|:Tint" _BPB0920.xmp crs:Temperature="4950" crs:Tint="+4"
The EXIF data contains no 4 digit numbers which could be the ColorTemp:
exiftool.exe -* _BPB0920.NEF | gr "\b\d{4}\b" | egrep -vi "date|version|file|time|copy|binary" Image Width : 7424 Image Height : 4924 ISO Setting : 1000 Raw Image Center : 3712 2462
The ColorTemp is one of the most critical pieces of data for any picture and it appears to be totally hidden from the user without a 4 step, manual Kabuki Dance.
Is there some simple method I am overlooking? There must be some way to calculate the ColorTemp/WhiteBalance in Kelvins based on the EXIF WB tags.
Have any of the Photo-Mathematicians here figured this one out yet?
BPB
TAGS: WhiteBalance ColorTemperature Tint Photoshop ACR EXIF WB_GRBGLevels RGB translate
==========================================================
Results of an Exiftool extraction of just Nikon Maker Notes suggested by Joanne C
sub nef_makernote() { $file = $ARGV[0]; $et = new Image::ExifTool; %ET_OPT = (Group0 => ['MakerNotes']); %ii = %{$et->ImageInfo($file, \%ET_OPT)}; printf("File $file, size %4.3f MB has %d MakerNote keys\n", (-s $file)/1E6, scalar keys %ii); $ii = -1; while(($key, $val) = each %ii) { $ii++; print("$ii) $key -> $val\n"); } }
There are quite a few Maker Notes; Here is the limited attention span summary:
bb.pl il-2014.0529-226127.nef | grep W 39) WB_GRBGLevels -> 256 485 380 256 42) WhiteBalance -> Auto1 56) WB_RBLevels -> 1.89453125 1.484375 1 1 90) WhiteBalanceFineTune -> 0 0 103) Quality -> RAW
And the gory details:
`Running c:/bin/bb.pl il-2014.0529-226127.nef Sun Dec 28 11:41:26 2014
File il-2014.0529-226127.nef, size 38.579 MB has 137 MakerNote keys
0) MinFocalLength -> 28.3 mm
- ExposureBracketValue -> 0
- NEFLinearizationTable -> SCALAR(0x2683e60)
- VibrationReduction -> On
- PhaseDetectAF -> On (51-point)
- ISOExpansion2 -> Off
- FlashExposureBracketValue -> 0.0
- PictureControlVersion -> 0100
- ToningSaturation -> n/a
- FlashGroupAControlMode -> Off
- FlashGroupACompensation -> 0
- MultiExposureShots -> 0
- FlashGroupCControlMode -> Off
- AFFineTuneAdj -> 0
- AFFineTune -> Off
- PowerUpTime -> 2014:05:29 08:34:27
- FirmwareVersion -> 1.02a
- FlashExposureComp3 -> 0
- ShutterCount -> 226127
- MaxFocalLength -> 302.0 mm
- ContrastDetectAF -> Off
- CommanderInternalManualOutput -> Full
- Timezone -> -06:00
- WB_RBLevels -> 1.89453125 1.484375 1 1
- Contrast (1) -> Normal
- YResolution (4) -> 300
- Sharpness (1) -> 5
- AutoBracketOrder -> 0,-,+
- ExternalFlashCompensation -> 0
- Compression (4) -> JPEG (old-style)
- SerialNumber -> 3000001 ;)
- HighISONoiseReduction -> Normal
- ExternalFlashFlags -> (none)
- NEFCompression -> Lossy (type 2)
- FlashGroupCCompensation -> 0
- ResolutionUnit (4) -> inches
- PictureControlName -> Standard
- LensDataVersion -> 0204
- ExposureTuning -> 0
- RepeatingFlashOutputExternal -> 1
- FlashGroupBCompensation -> 0
- ContrastDetectAFInFocus -> No
- CommanderInternalFlash -> TTL
- Lens -> 28-300mm f/3.5-5.60000000000001
- FlashCommanderMode -> Off
- FlashInfoVersion -> 0105
- ISOSetting -> 125
- FocalLength (1) -> 28.3 mm
- ISOExpansion -> Off
- LensIDNumber -> 165
- CommanderGroupAManualOutput -> Full
- ProgramShift -> 0
- PreviewImageLength -> 104006
- DaylightSavings -> Yes
- DirectoryNumber -> 237
- ColorSpace -> Adobe RGB
- FlashSetting ->
- CommanderGroupB_TTL-AAComp -> 0
- ToningEffect -> n/a
- ShootingMode -> Continuous, Exposure Bracketing
- LensType -> G VR
- AutoBracketingMode -> Flash/Speed
- NoiseReduction -> Off
- SequenceNumber -> 0
- ExternalFlashExposureComp -> 0
- FlashColorFilter -> None
- MultiExposureMode -> Off
- WhiteBalanceFineTune -> 0 0
- FlashMode -> Did Not Fire
- ModelingFlash -> On
- AFAperture -> 3.6
- PreviewImageStart -> 923124
- MaxApertureAtMinFocal -> 3.6
- YCbCrPositioning (2) -> Co-sited
- AFFineTuneIndex -> n/a
- FlashExposureComp4 -> 0
- VRInfoVersion -> 0100
- CropHiSpeed -> Off (7424x4924 cropped to 7424x4924 at pixel 0,0)
- ISO (2) -> 126
- MultiExposureAutoGain -> Off
- ActiveD-Lighting -> Auto
- FlashCompensation -> 0
- ShotInfoVersion -> 0222
- CommanderChannel -> 1
- VRMode -> Normal
- VignetteControl -> Normal
- HueAdjustment -> None
- ExternalFlashFirmware -> n/a
- WhiteBalance -> Auto1
- FocusMode -> AF-C
- WB_GRBGLevels -> 256 485 380 256
- MCUVersion -> 167
- ContrastCurve -> SCALAR(0x696bf18)
- FilterEffect -> n/a
- FlashShutterSpeed -> 1/8 s
- AFPointsUsed -> A6
- MakerNoteVersion -> 2.10
- CommanderGroupBMode -> TTL
- FileInfoVersion -> 0100
- AFInfo2Version -> 0100
- FlashControlBuilt-in -> Commander Mode
- DateDisplayFormat -> M/D/Y
- FlashGroupBControlMode -> Off
- PrimaryAFPoint -> A6
- LensFStops -> 5.33
- FileNumber -> 6458
- FlashExposureComp2 -> +2/3
- ISO2 -> 126
- ExitPupilPosition -> 85.3 mm
- Saturation (1) -> Normal
- PictureControlAdjust -> Full Control
- CommanderGroupBManualOutput -> Full
- AutoBracketingSet -> AE & Flash
- RawImageCenter -> 3712 2462
- RetouchHistory -> None
- CommanderGroupA_TTL-AAComp -> +0.3
- CommanderInternalTTLComp -> -2.7
- FocusPosition -> 0x66
- PictureControlQuickAdjust -> Normal
- EffectiveMaxAperture -> 3.6
- FlashControlMode -> Off
- PictureControlBase -> Standard
- MultiExposureVersion -> 0100
- XResolution (4) -> 300
- ExposureDifference -> 0
- AFAreaMode -> Dynamic Area (9 points)
- CommanderGroupAMode -> TTL
- Brightness -> Normal
- Quality -> RAW
- FlashExposureComp -> +1
- FlashSource -> None
- MaxApertureAtMaxFocal -> 5.7
- FlashGNDistance -> 0
- FlashType ->
- AutoDistortionControl -> Off
- FlashSyncSpeed -> 1/250 s
- FocusDistance -> 6.68 m Elapsed time = 0.087 seconds.`
Looking for 4 digit numbers lurking behind weird labels:
bb.pl il-2014.0529-226127.nef | gr "\b\d{4}\b" | egrep -iv "version|time|2014" 14) FileNumber -> 6458 21) RawImageCenter -> 3712 2462
I do not see any evidence of a numerical ColorTemp/WhiteBalance or a Kelvin reading.
Where's Kelvin?! :(
================================================================
Here is yet another attempt to coax a usable color temp/tint out of a NEF file shot with WhiteBalance=AUTO suggested by MirekE using the ASShotNeutral EXIF value.
Nikon does not record this info, but it is present in DNG files. Downloaded the latest adobe DuNG converter (does just what the name implies :). Converted D800E .NEF -> .DNG
Results:
EGAD!!! Yet another incomprehensible, incompatible White Balance surrogate to throw upon the existing Mountain of Babelian blather! There now exists the ASShotNeutral EXIF tag in new and nebulous proprietary format:
>exiftool.exe -ASShot* -WB -whitebala -S -ver pf-2012.0620-3947.dng
9.77
AsShotNeutral: 0.504931 1 0.699454 < New and Improved OBFUSCATION?
WB_RBLevels: 1.98046875 1.4296875 1 1
WB_GRBGLevels: 256 507 366 256
WhiteBalance: Auto1
WhiteBalanceFineTune: 0 0
Adobe Camera Raw (ACR) somehow munges some of this "information" and displays "As Shot"=4950 and "Tint"=+15. How remains a mystery!
Here is the scorecard so far:
Nikon: WB_RBLevels = 1.98046875 1.4296875 1 1
DCRaw: multipliers = 1.880420 1.000000 1.532661 1.000829
adobe_DuNG: ASShotNeutral = 0.504931 1 0.699454
ACR: Temp=4950 & Tint=+15
These are all different formulations of "WhiteBalance" for the same NEF; the Rosetta Stone of WhiteBalance. How does one programmatically translate any of these to another?
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. My Kingdom for a Decrypter Ring or a Babel Fish!