{"id":208,"date":"2006-06-28T23:36:29","date_gmt":"2006-06-28T14:36:29","guid":{"rendered":"https:\/\/regex.info\/blog\/2006-06-28\/208"},"modified":"2013-08-28T13:56:42","modified_gmt":"2013-08-28T04:56:42","slug":"digital-camera-white-balance","status":"publish","type":"post","link":"https:\/\/regex.info\/blog\/2006-06-28\/208","title":{"rendered":"Digital Camera \u201cWhite Balance\u201d"},"content":{"rendered":"\n\n<!--TECH-->\n<div class=\"robots-nocontent\" style=\"border: 2px solid #FF8080;\n            float: right;\n            padding: 0 1em 1em 1em;\n            margin: 10px 0 1em 1em;\n            display: inline;\">\n<p style='white-space: nowrap'><b>My Tech-Related Photography Posts<\/b><\/p>\n<ul style='margin:0; font-size:80%'>\n  <li><a href='\/blog\/lightroom-goodies\/ipad-howto2'>My Lightroom-to-iPad Workflow<\/a><\/li>\n  <li><a href='\/blog\/lightroom-goodies\/'>Lightroom Goodies<\/a> (lots of plugins)<\/li>\n  <li><a href='\/blog\/photo-tech\/color-spaces-page1\/'>Digital Image Color Spaces<\/a><\/li>\n  <li><a href='\/blog\/other-writings\/online-exif-image-data-viewer\/'>Online Exif (Image Data) Viewer<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/focus-chart\/'>Jeffrey's Autofocus Test Chart<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/calendar\/'>Photoshop Calendar-Template-Building Script<\/a><\/li>\n  <li><a href='\/blog\/lightroom-goodies\/ipad-howto'>How to Prepare Photos for an iPad<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/nef-compression\/'>A Qualitative Analysis of NEF Compression<\/a><\/li>\n  <li><a href='\/blog\/2007-08-24\/554'>Tripod Stability Tests<\/a><\/li>\n<\/ul>\n<p style='font-size:85%; margin:10px 0 0 0'><a href=\"\/blog\/photo-tech\/\">more<\/a>...<\/p>\n<\/div>\n<!--\/TECH-->\n\n<p>\n\nHave you ever noticed that some parking lots have yellowish lights that\nmake things look crazy colors at night? <span class='nobr'>A movie<\/span> theater in Santa Clara, <span class='nobr'>CA we used<\/span> to go to made Fumie's silver car look perfectly green, or something\nlike that.\n\n<\/p><p>\n\nSuch situations are an extreme example of the simple fact that all light is\nnot created equal. Any middle-school student can tell you that perfect\nwhite is an even dose of all colors across the visible spectrum, but it's\nonly common sense that if the light shining on something white doesn't\ncontain that even dose of all colors, then neither can the light\n<i>reflected<\/i> from that white object. (And hence, it won't <i>appear<\/i>\nto be white.)\n\n<\/p><p>\n\nWhat may be surprising are the striking differences among the types of\nlight we find ourselves in every day. Women, with their daily makeup\nritual, know there's <span class='nobr'>a tangible<\/span> difference in how &#8220;natural&#8221;\ncolors appear between the light from an incandescent (&#8220;normal&#8221;)\nlight bulb and fluorescent one, but did you know that the difference in\nspectrum between direct sunlight and shade is much larger still? (To be\nclear, <span class='nobr'>I'm not talking<\/span> about the <i>intensity<\/i> of light, but the\n<i>color makeup<\/i> of light).\n\n<\/p><p>\n\nYet, unless we're really paying attention (such as when applying makeup, <span class='nobr'>I\nguess<\/span>), we don't normally notice these differences, and so those objects\nthat shouldn't in theory appear white <i>do<\/i> seem white. Why?\n\n<\/p><p>\n\nTo quote <a class='quiet'\nhref=\"http:\/\/home.earthlink.net\/~michaelbriggs\/\">Michael Briggs<\/a> from a\n<a\nhref=\"http:\/\/www.photo.net\/bboard\/q-and-a-fetch-msg?msg_id=004Ieu\">photo.net\nforum post<\/a> three and <span class='nobr'>a half<\/span> years ago:\n\n<\/p>\n<blockquote style=\"font-size: 105%\">\n\n<i>The human visual system is designed to define the ambient light as white\nand so people tend not to notice differences in the color of the ambient\nlight. Photographic film doesn't have this ability.<\/i>\n\n<\/blockquote>\n<p>\n\nNor, for that matter, do the sensors of digital cameras.\n\n<\/p><p>\n\nIn order for a digital camera (still or video) to come up with the proper\ndigital value for &#8220;white&#8221; for something that's indeed white, it\nmust know the kind of light reflecting off it. <span class='nobr'>It must either<\/span> figure this\nout for itself (color averaging across the scene? -- <span class='nobr'>I don't<\/span> know) or be\ntold by us, which brings us to the subject of <b>white balance<\/b>. Setting\n<span class='nobr'>a camera's<\/span> white balance is all about setting the camera's color perception\nto match our own.\n\n<\/p><p>\n\nOf course, the perception of all colors are affected, not just white. <span class='nobr'>In the face<\/span> of an incorrect color-perception setting (the wrong white\nbalance), images take on an overall color cast (often bluish or\nreddish\/orange).\n\n<\/p><p>\n\nWith my camera (<a href=\"\/blog\/2006-01-10\/130\">Nikon\nD200<\/a>), <span class='nobr'>I can choose<\/span> from among these white-balance settings:\n<\/p>\n\n   \n\n<ul>\n  <li>Auto (will try to figure it out itself)<\/li>\n  <li>Incandescent<\/li>\n  <li>Fluorescent<\/li>\n  <li>Direct Sunlight<\/li>\n  <li>Flash<\/li>\n  <li>Cloudy<\/li>\n  <li>Shade<\/li>\n  <li>Preset<\/li>\n<\/ul>\n<p>\n\nThe last one, <i>preset<\/i>, allows me to take <span class='nobr'>a picture<\/span> of something gray\nand tell it &#8220;this is supposed to be gray&#8221;, and the color\nperception for future pictures will be adjusted accordingly. This works\nbecause something truly gray (or white, for that matter) has an equal\namount of each of the primary colors (red\/green\/blue), and so if the\ncamera's sensors actually detect an excess or lack of any of them, it can\nadjust them so that they all even out. <span class='nobr'>The same adjustment<\/span> is then applied\nto the entire picture, and (in theory) all colors should then appear\nnatural.\n\n\n<\/p><p>\n\nThe other settings are just ballpark guesses for commonly encountered\nscenarios. For example, there's not one &#8220;incandescent&#8221; light\ntype -- heck, the light from an incandescent light bulb changes depending\non the voltage applied. Maybe this is why the D200 has such abysmal\nincandescent white balance (images taken in &#8220;incandescent light&#8221; with the\nincandescent white-balance setting tend to look <span class='nobr'>a bit<\/span> unnatural)\n\n<\/p><p>\n\nSo here's a question: what should you do when there's <span class='nobr'>a mix<\/span> of light\nsources?\n\n<\/p><p>\n\nI took the picture below, of Fumie and Anthony making waffles, in our\nkitchen. <span class='nobr'>The general<\/span> kitchen lighting is <b>fluorescent<\/b>, but there are\n<b>incandescent<\/b> spot lights directly above (shining straight down to\nthe counter surface), and the <b>9am sun<\/b> was drifting in from the\nwindows behind me. <\/p>\n\n<div style='left: 162px; height:620px; width:415px; position: relative; z-index: 1; margin-bottom: 10px; padding-bottom: 10px'>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-1-incandescent.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_1\"\nstyle=\"position:absolute; left:0; top:0; display:display\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-2-fluo.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_2\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-3-fluo2.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_3\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-4-sun.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_4\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-5-flash.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_5\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-6-cloudy.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_6\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-7-shade.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_7\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-8-pp.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_8\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-91-jasonwb.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_9\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/_JEF015631-92-jasonpost.jpg\" width=\"415\" height=\"620\"\nid=\"img_889_10\"\nstyle=\"position:absolute; left:0; top:0; display:none\"\/>\n\n<\/div>\n\n<style type=\"text\/css\">\nspan.b889 { padding: 6px; border: gray 1px solid }\n<\/style>\n<center>\n  <span class='b889' id='but_889_1' onmouseover='OnMouse_889(1)' style='border-color: red'>Incandescent<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_2' onmouseover='OnMouse_889(2)'>Fluorescent<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_3' onmouseover='OnMouse_889(3)'>HC Fluor.<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_4' onmouseover='OnMouse_889(4)'>Sunlight<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_5' onmouseover='OnMouse_889(5)'>Flash<\/span>\n<br\/><br\/>\n  <span class='b889' id='but_889_6' onmouseover='OnMouse_889(6)'>Cloudy<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_7' onmouseover='OnMouse_889(7)'>Shade<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_8' onmouseover='OnMouse_889(8)'>My Result<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_9' onmouseover='OnMouse_889(9)'>Jason's WB<\/span>\n  &nbsp;&nbsp;-&nbsp;&nbsp; <span class='b889' id='but_889_10' onmouseover='OnMouse_889(10)'>Jason's Result<\/span>\n\n  <p>\n  <small>mouseover <span class='nobr'>a button<\/span> to see that image<\/small>\n  <\/p>\n<\/center>\n\n<script type=\"text\/javascript\">\n var img_889 = new Array();\n var but_889 = new Array();\n\nimg_889[1] = document.getElementById('img_889_1');\nbut_889[1] = document.getElementById('but_889_1');\nimg_889[2] = document.getElementById('img_889_2');\nbut_889[2] = document.getElementById('but_889_2');\nimg_889[3] = document.getElementById('img_889_3');\nbut_889[3] = document.getElementById('but_889_3');\nimg_889[4] = document.getElementById('img_889_4');\nbut_889[4] = document.getElementById('but_889_4');\nimg_889[5] = document.getElementById('img_889_5');\nbut_889[5] = document.getElementById('but_889_5');\nimg_889[6] = document.getElementById('img_889_6');\nbut_889[6] = document.getElementById('but_889_6');\nimg_889[7] = document.getElementById('img_889_7');\nbut_889[7] = document.getElementById('but_889_7');\nimg_889[8] = document.getElementById('img_889_8');\nbut_889[8] = document.getElementById('but_889_8');\nimg_889[9] = document.getElementById('img_889_9');\nbut_889[9] = document.getElementById('but_889_9');\nimg_889[10] = document.getElementById('img_889_10');\nbut_889[10] = document.getElementById('but_889_10');\n\n\n function OnMouse_889(num)\n {\n   img_889[num].style.display         = 'block';\n   but_889[num].style.borderColor     = '#FF4040';\n   but_889[num].style.backgroundColor = '#808080';\n   but_889[num].style.color           = 'white';\n   but_889[num].style.borderWidth     = '3';\n   but_889[num].style.padding         = '4px';\n\n   for (i = 1; i < 11; i++) {\n      if (i != num) {\n          img_889[i].style.display         = 'none';\n          but_889[i].style.borderColor     = 'gray';\n          but_889[i].style.backgroundColor = '';\n          but_889[i].style.borderWidth     = '1';\n          but_889[i].style.padding         = '6px';\n          but_889[i].style.color           = '';\n      }\n   }\n }\n OnMouse_889(1);\n<\/script>\n\n\n\n<p>Although they don't apear so, the wall and cabinet behind Fumie are\nwhite, as is the countertop, milk carton, and, of course, the milk\nitself.<\/p>\n\n<p>Mouseover the buttons below the image to see the different\ncolor-perception interpretations. Note, in particular, the wall behind\nFumie and the countertop (again, both of which should be white).\n\n<\/p><p>\n\nThe countertop is primarily lit by the incandescent spots, so it appears\nthe whitest via the &#8220;incandescent&#8221; setting. (But the parts of the\ncountertop in the shadow under the carton and bowl are lit primarily by the\nambient fluorescent, they're the most properly gray under that\nsetting.\n\n<\/p><p>\n\nThe walls behind Fumie are white and mostly lit by the ambient fluorescent,\nbut the flat surfaces facing forward are also getting some sun, so they\nhave <span class='nobr'>a different<\/span> cast than the side wall appearing between Fumie and\nAnthony.\n\n<\/p><p>\n\nWhat got me thinking to write this post was the horrible time <span class='nobr'>I had<\/span> in\npost-processing this image to create something appearing vaguely natural. <span class='nobr'>At the time<\/span> <span class='nobr'>I took<\/span> it <span class='nobr'>I was<\/span> well aware of the different lighting and of\nthe trouble it would bring-- if I'd had the time, <span class='nobr'>I would<\/span> have turned off\none of the types of light, but it was one of those catch-it-or-lose-it\nmoments.\n\n<\/p><p>\n\nWhat I eventually came up with is shown via the &#8220;My Result&#8221;\nbutton above. <span class='nobr'>I didn't<\/span> do <span class='nobr'>a very<\/span> good job -- the skin tones are still way\noff (compare Anthony's arms to his face -- his face is not getting much\nincandescent light, but his arms are). Mostly, <span class='nobr'>I isolated<\/span> areas that were\ngenerally lit by one type of light and performed <span class='nobr'>a color<\/span> balance adjustment\nin Photoshop. <span class='nobr'>I also used<\/span> the desaturate tool to clean up things that\nshould appear white\/gray.\n\n<\/p>\n\n<p style='border: 1px gray dotted; padding: 5px'>\n<b>UPDATE<\/b> &nbsp;<small>(This section added five days after the initial post)<\/small>\n<br\/>\n<span style='display:block; padding-top:0.3em'>My friend <a href=\"http:\/\/molenda.us\/\">Jason<\/a> took <span class='nobr'>a quick<\/span> whack at this\nimage. The &#8220;Jason's WB&#8221; button is his rough attempt to\nwhitebalance the image for proper skintone.<\/span>\n\n<span style='display:block; padding-top:0.7em'>He took <span class='nobr'>a few<\/span> more minutes\n(<span class='nobr'>a total<\/span> of four, he says) to make <span class='nobr'>a few<\/span> other adjustments\n(&#8220;<i>adjusted the tint to 3; exposure +0.96 EV, <span class='nobr'>Saturation 1.09,<\/span>\nadded <span class='nobr'>a little<\/span> sharpening, straightened it by -2.9 degrees, cropped it <span class='nobr'>a\nbit.<\/span><\/i>&#8221;). His <a href=\"\/i\/_JEF015631-jsm.jpg\">final\nresult<\/a> certainly has <span class='nobr'>a more<\/span> pleasing composition, although it looks odd\nin the &#8220;Jason's Result&#8221; view above, because <span class='nobr'>I had<\/span> to reposition\nit to make it match the others for this post.<\/span>\n\n<\/p><p>\n\nBy the way, in case you're wondering how <span class='nobr'>I came<\/span> up with the seven\nwhite-balance-specific versions of the image, <span class='nobr'>I did so<\/span> by going to the\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/RAW_image_format\">raw file<\/a> <span class='nobr'>I have<\/span>\nmy camera set to produce. <span class='nobr'>It contains<\/span> the pre-white-balance raw sensor\ndata, and so any of the white balance settings can be mimicked after the\nfact in software (in my case, when loading it into Photoshop).\n\n<\/p><p>\n\nSo, <span class='nobr'>I loaded<\/span> it seven times, using <span class='nobr'>a different<\/span> white-balance setting each\ntime. (The &#8220;HC Fluor&#8221; setting is for <span class='nobr'>a special<\/span> kind of fluorescent light\nthat has less holes in its color spectrum than common consumer fluorescent\nlights, and so is better at accurately lighting <span class='nobr'>a scene.<\/span>)\n\n\n<\/p><p>\n\nNow that I have all these setting-specific versions, <span class='nobr'>I should<\/span> go back and\nredo my post processing to see if <span class='nobr'>I can<\/span> use them to get <span class='nobr'>a better<\/span> result. <span class='nobr'>But considering<\/span> that <span class='nobr'>I just<\/span> spent three hours writing this post, <span class='nobr'>I find that<\/span> <span class='nobr'>I don't<\/span> have the time!\n\n<\/p><p>\n\nSome links for further reading:<\/p>\n\n<ul>\n<li><a href=\"http:\/\/www.cambridgeincolour.com\/tutorials\/white-balance.htm\">white balance<\/a> at Sean McHugh's site<\/li>\n<li><a href=\"http:\/\/en.wikipedia.org\/wiki\/Color_temperature\">white balance<\/a> at Wikipedia<\/li>\n<\/ul>\n\n<p>These tend to talk more about &#8220;color temperature&#8221;, &#8220;black body\nradiation&#8221;, and other things that are of no practical use to the\nphotographer, but they explain the science behind it.\n<\/p>\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p> Have you ever noticed that some parking lots have yellowish lights that make things look crazy colors at night? A movie theater in Santa Clara, CA we used to go to made Fumie's silver car look perfectly green, or something like that. <\/p><p> Such situations are an extreme example of the simple fact that all light is not created equal. Any middle-school student can tell you that perfect white is an even dose of all colors across the visible spectrum, but it's only common sense that if the light shining on something white doesn't contain that even dose of [...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,29,4],"tags":[],"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/208"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}