Friday, July 16, 2010

Photography in Low Light, part 1: The Purkinje Effect

SOME EMPIRICAL observations:
  • I've long found that my photos taken under heavy overcast skies were disappointing. None of my standard techniques produced an attractive image.
  • When I take photos at dusk, finding the right white balance is difficult.
  • Exposure changes drastically at dusk, even though it doesn't seem to get dark so fast.
  • Finding the right white balance under incandescent illumination is easy.
In 1819, the Bohemian medical student Jan Evangelista Purkyně would take long walks outdoors in the early morning hours. He noticed how the quality of color changed as the sky got brighter. He wrote:
Objectively, the degree of illumination has a great influence on the intensity of color quality. In order to prove this most vividly, take some colors before daybreak, when it begins slowly to get lighter. Initially one sees only black and grey. Particularly the brightest colors, red and green, appear darkest. Yellow cannot be distinguished from a rosy red. Blue became noticeable to me first. Nuances of red, which otherwise burn brightest in daylight, namely carmine, cinnabar and orange, show themselves as darkest for quite a while, in contrast to their average brightness. Green appears more bluish to me, and its yellow tint develops with increasing daylight only.
Purkyně discovered that the human eye has two systems of capturing light; one adapted to bright lighting, and another for dim conditions. Undoubtably, this phenomenon was already well known (if but subconsciously), but he wrote down and publicized his discovery. This change in human color perception in dim lighting is now called the Purkinje effect. (Note: there are other ways his name is spelled, including Purkinie, Purkynje, and Burkinė)

Certainly, digital cameras do not model human vision in low light.  As light dims, the eye becomes more sensitive to the bluer wavelengths of light, due to the presence of blue-green sensitive (and red-blind) rod cells. No similar mechanism is found in cameras. Invariably, photos taken under very dim light do not match the color that is actually seen. Using a color calibration target under these conditions will certainly be disappointing if you want to reproduce what you actually see.

This leads me to photographic intent. Sometimes, I want to record the colors and brightness of the various objects in the scene in a way that faithfully preserves their relative tones, while also subtracting out most of the variation of lighting. This is perhaps the most objective way of recording a subject, and this kind of flat uniform lighting is often found in product shoots, or in the exposure blending techniques I use when taking architectural interiors.  But other times, I want to record a scene that is faithful to how I perceived it, and invariably this problem crops up under dim lighting outdoors. Very much is made these days of subjectivity in art, however, many phenomena are what I like to call objectively-subjective: yes, subjective human vision sees things differently than a machine, but this subjective impression follows objective laws.

I was recently at the Missouri Botanical Garden in Saint Louis, Missouri, USA. Usually a beautiful place, I was trapped under shelter during an intense downpour, and during the rest of my time there I experienced mainly heavy overcast skies. From experience, I learned that flower pictures taken under overcast don't look so good to me, and so I turned my camera to other subjects.

Missouri Botanical Garden ("Shaw's Garden"), in Saint Louis, Missouri, USA - waterfall in Chinese Garden - uncorrected for Purkinje effect

This is a particularly awful photo of a waterfall in the Chinese garden, one of many terrible photos I took that day. Although you can hardly tell, it was raining during this photo, and was also quite dark. How dark? I estimate this was about 1/200th the amount of illumination that is found on a sunny day — the kind of illumination you'd expect to find during dusk, when Purkyně's effect is at work.

I didn't want to waste that day of photos, and wanted to improve them somehow. Thinking about why the photos looked bad, I noticed that the vegetation seemed to be too yellow, bright, and flat compared to how I remembered seeing it. Now the white balance on this image, measured by the camera, is actually biased towards blue, and so a perfectly white balanced version of this would be much yellower. Blech. Generally, faithful white balance correction under overcast skies looks bad, often because of yellow vegetation.

I knew that the eye becomes more sensitive to blue light as lighting dims, and I wondered if there is some method that would boost the images's sensitivity to blue light, while not changing the colors. There are several ways of doing this in Photoshop. Here I duplicated the layer, applied the blue channel, and set that layer mode to luminosity and reduced the opacity; this would simulate, I thought, greater sensitivity to blue light.

Missouri Botanical Garden ("Shaw's Garden"), in Saint Louis, Missouri, USA - waterfall in Chinese Garden

Ah, a bit better. I think the tones on the vegetation look more like I remember seeing them; darker and less apparently yellow, as well as displaying more tonal range in the leaves. This is an ad hoc method, but I think it at least somewhat models human vision, and in my opinion it does improve the image. Using this method — let's call it the Purkinje correction version 1 — I was able to rescue a number of other photos taken that day; and you can see them here.

I think that this kind of correction may help rescue floral pictures taken under overcast lighting — which I usually find disappointing. Clearly, besides modifying the brightness contribution of the various color channels, we need to do some modification in white balance, not accepting the measured white balance at face value; certainly these two phenomena are closely related.

There ought to be an experimentally determined Purkinje correction that would work over various luminance levels by variably adjusting the brightness contribution of the red, green, and blue channels. As lighting dims, red would turn dark while blue would be bright, and ultimately, under very dim illumination, the image would become black and white. Now, cameras don't have sensors that mimic the color response that is found in the rod cells; perhaps some combination of green and blue would act as a good estimate — I just don't know. Perhaps some kind of filter is called for — Cinematographers have done that for years with Day for Night (or nuit américaine, “American night”) filters, although I don't find this technique convincing. This correction, if done accurately, would be useful when you want to record your impressions of a scene in dim lighting.



When trying to understand something, it is often good to contemplate it before going to bed, and then sleep on it.  Maybe in the morning you'll have some fresh insights. I thought that I would double-check my wild guess about correcting photos, and continue thinking about it the morning.

I thought that perhaps a quick experiment was called for. I got my handy X-Rite ColorChecker Passport and viewed it under semi-controled conditions after spending some time in darkness. My white-balanced computer monitor in the other room gave off a dim white light — but which appeared bluish to my eyes — and I viewed the ColorChecker's colored squares. For each color, I attempted to match the luminosity of the patch with the neutral squares on the bottom. Here are my rough results:

dark adaptation

I used as a scale the bottom gray squares, assigning 0 to the darkest and 5 to the brightest, and then attempted to match the luminosity of each color square with the gray ones.  The brightest square was the yellow one, with a value of 4, and the darkest one was the red square, with a value of 0.5. I adjusted the brightness of the color squares to match the numbers I wrote down. For a quick aid in showing the differences, I put in a plus or minus sign to indicate if the color was brighter or darker than the standard.

Using both the light meter on my camera, and my old Gossen Lunasix handheld meter, I estimate the luminosity was somewhere between .6 to 1 Lux — or two to four times brighter than the illumination of the full moon in mid-lattitudes. At this light level, I was able to perceive all the colors without problem.

As found by Purkyně, the blue tones are the brightest, and the red and green tones were darkest. Purple tones and the caucasian skin tone patch, along with yellow, remained unaffected in luminosity. That yellow appeared to be unaffected leads me to reject my first version of the Purkinje correction, seen above, as being too naïve: that method reduces pure yellow tones strongly.

Now, there is an oddity in human low-light vision. Our dark adaptation is only sensitive to blue and green light — red is ignored.  So we can use bright red lights at night (with pure red L.E.D. lighting being the best), while still preserving night vision. Since the red and the dark-adapted tones are so vastly different in measured brightness, they would overwhelm the capabilities of modern digital cameras, and so the perceived color and tones of this scene would not be easily captured. I would ignore this phenomenon unless we do some very clever and yet-to-be-invented High Dynamic Range techniques.

I took the ColorChecker into my room, and drew the shades, making the room very dark, being illumined only by dim yellow street lighting filtering through the curtains, and the red glow from an alarm clock. After time for dark adaptation, I was only able to perceive the two brightest patches on the neutral scale, and a few bluish patches — all the rest were dark gray and indistinguishable. I could not perceive any color on the ColorChecker. I did find that the red alarm clock light did not harm my night vision. There are fewer rod cells in the center of vision, and so I could see objects better if I did not look directly at them. Also, the rod cells have a much larger time lag for receiving a signal — we are after all, actually seeing individual photons of light; but the red alarm clock light is seen with normal color vision. Moving my head while looking at the red clock was amusing — the numbers would appear to shift around relative to the dim objects around it.

While it is fun doing some experimentation, there is plenty of quality research regarding human vision in low light. Our problem is to identify the principles and figure out some way to apply them to photography.

Click to see the second article in the series: Photography in Low Light, part 2: The Purkinje Correction.

No comments: