Friday, 13 October 2017

How does Photoshop/Lightroom get the Colour temperature of a Raw image?


I captured a Raw image using my Canon 450D. When imported this RAW(CR2) file into Lightroom and Photoshop CS5, it showed the Temperature as 4900 and White Balance setting - "As shot". When I checked the EXIF data associated to this raw CR2 file, there is no mention of the colour temperature setting in it.


I used Irfanview to see this EXIF data. Irfanview + Canon raw plugin can open this Canon raw CR2 file.**





  1. So how does Photoshop/Lightroom compute the colour temperature from the Raw image data?




  2. Would be interested in knowing What kind of algorithm/mathematical computation it does to get this temeprature number?




  3. Could it be possible that the CR2 raw file has this Colour temperature information embedded into it, but Irfanview Exif information display somehow missed it/messed it?





Any pointers would be useful.



Answer



It is in the EXIF data, but the info is under Canon tag. For any EXIF-related tasks, I wholeheartedly recommend ExifTool by Phil Harvey.


Here's an example of a real file (which coincidentally was shot with Canon 450D)


$ exiftool -canon:"WB_RGGB*" -canon:"*temp*" MG_5366.CR2
WB RGGB Levels As Shot : 2270 1024 1024 1520
WB RGGB Levels Auto : 2270 1024 1024 1520
WB RGGB Levels Measured : 2267 1023 1024 1518
WB RGGB Levels Daylight : 2245 1024 1024 1425
WB RGGB Levels Shade : 2595 1024 1024 1197

WB RGGB Levels Cloudy : 2422 1024 1024 1299
WB RGGB Levels Tungsten : 1660 1075 1075 2222
WB RGGB Levels Fluorescent : 1960 1024 1024 1945
WB RGGB Levels Kelvin : 2245 1024 1024 1425
WB RGGB Levels Flash : 2485 1024 1024 1273
Camera Temperature : 18 C
Color Temperature : 5200
Color Temp As Shot : 4955
Color Temp Auto : 4955
Color Temp Measured : 4955

Color Temp Daylight : 5200
Color Temp Shade : 7000
Color Temp Cloudy : 6000
Color Temp Tungsten : 3200
Color Temp Fluorescent : 3776
Color Temp Kelvin : 5189
Color Temp Flash : 6310

NB: Windows users: double-check that you use double-quotes, not single quotes.





EDIT: The Color Temp infos are "nice to know" data, but they do not hold any other value than informational. The °Kelvins are probably based on camera's WB calculations and post-processing software most likely uses the WB RGGB Levels data.


I tested this by changing the Color Temp As Shot value from 52007000 and opened the file in Photoshop (Adobe Camera Raw). Nothing did change.


Then I changed the WB RGGB Levels As Shot value of a copy of the original file from 2270 1024 1024 15201000 1000 1000 1000 and the image changed to this:


wb rggb change


I did not change the Color Temp As Shot value, but Adobe Camera Raw shows the temperature as 2150 (tint -144)


Summa summarum: Adobe Camera Raw calculates the "Color Temperature" from the EXIF-data, from WB_RGGBLevels* tag, under the Canon group (under the Maker Notes group).


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...