What I'm going to talk about here comes from recent experiences I has while reviewing a commercial focus testing system (LensAlign and Focustune). This system provides information on front and back focusing and allows the user to set the focus microadjustenet value which gives the most accurate focusing (ininimized any front or back focusing). All the observations relate to normal Phase Sensitive AF, using the dedicated AF sensors, NOT contrast detection AF in Live view which uses the image sensor pixels and operates on a different principle.
I won't go into details of the system here (that's covered in my review), what I want to discuss is an observation I made while doing the testing. Using a Canon EOS 70D and a Canon EF85/1.8 USM lens I performed the calibration process and found that a focus microadjustment setting of +7 gave me the best results, i.e. it gave me the sharpest images and minimal front or back focus. So far so good.
I then took the same 70D camera and 85/1.8 lens and took some "real world" shots around my house. Much to my surprise, focus was off. How could that be? So I went back and ran the calibration test again. As before I found that a focus microadjustment setting of +7 was giving me the best sharpness. However, when I took some shots of books on my bookshelf they were slightly, but noticeably, out of focus. I was shooting at f1.8 in all cases because that's the most critical test of focus due to the shallow depth of field at large apertures.
So what was going on? Was the camera loosing calibration somehow? Was the lens randomly shifting focus? Was there something wrong with the mechanics of the lens mount? Why wasn't I getting consist ant focus? What was changing? What was making focus shift forward or backward (as shown in images of a slanted focusing scale as shown below)
Well, after some thought, the differences between the calibration setting shooting and the "real word shooting" were (1) The nature of the target subject, (2) the shooting distance and (3) the light. I fixed (1) and (2) by using the same target at the same distance and still the focus was different, which just left #3, the light.
I was using room light to illuminate the target for the focus calibration work. I'd thought it was fluorescent lighting, but after taking apart the light fixture it actually turned out to be Tungsten Incandescent lighting. For the "real world" shots of my bookcase etc. The lighting was warn balanced LED lighting. Both the Tungsten lighting and LED lighting had a color temperature in the 2600K to 2900K range.
At this point my scientific side kicked in and I collected all the different light sources I could find in the house! These were three different LED lamps, all "warn white" which means a color temperature in the 2600K-3000K range. A also found two fluorescent lights, one daylight balanced (6500K) and one warm balanced (2800K). In addition I also had available regular daylight and flash, both of which are nominally around 5800K sources. The spectrum of the fluorescent lights were significantly less smooth than the LEDS, with more and larger obvious spikes.
What I found was interesting. The daylight and the Tungsten bulb, despite having very different color temperatures, gave very similar focus optimization settings and the Flash was pretty close (slightly back focused). However the three LED sources and the two fluorescent sources showed that focus was significantly backfocused - and all by about the same amount. The color temperature didn't have much of an effect and the less continuous nature of the fluorescent light spectrum didn't have much of an effect.
So what's going on? Why is focus shifting between different light sources and what characteristics of the light determine how much shift there is?
Short answer - I don't know.
Longer answer...I can only guess and speculate. The one thing that both daylight and a Tungsten light bulb have in common is that they are both thermal light sources, i.e. light sources which have a black body spectrum which means they emit light over a wide range of wavelengths from Ultra-violate through visible light and into the Infrared. LEDs and Fluorescent sources both intrinsically emit light at discrete wavelengths and the "while: light is generated either by combining multiple colors (as is often done with LEDs) or by exciting a phosphor which absorbs discrete wavelengths of light and re-emits light over a wide spectrum. This is used by both some LED designs and all fluorescents. They are designed to emit light over the visible spectrum. Any UV or IR emission is a by product and not really part of the design. Typically they won't emit a lot of IR unless specifically designed to do so.
This means that daylight and Tungsten light is likely to emit more IR than the other sources. Flash also emits some IR. So id IR affecting focus? Well, digital imaging sensors have a IR blocking filter in front of them because silicon photocells (i.e. pixels) are intrinsically very sensitive to IR. In fact they are more sensitive to IR then visible light. Focus sensors are comprised of pixels just like imaging sensors, there are just less of them and they are arranged differently, I don't know what type of filtering is used, but they are responsive to IR. If you use a Tungsten light source and put an IR pass filter over the lens (such as a Hoya R72) you block at least 99.99% of the visible light (see above transmission curve). However, the camera will still AF just fine. There's far too little visible light for focusing by visible light but AF is fine, indicating it must be focusing using IR. Almost every lens will have a different focus setting for IR light than for visible light. In fact many lenses have (or had in the past) a separate red mark on the distance scale showing the position for IR focus, usually displaced toward the infinity end of the scale. If you check where the lens focuses in visible light, then see where on the distance scale it focuses with an R72 filter on it, you'll see the amount of focus shift indicated by the red IR focusing line - further confirmation that the Autofocus system is focusing using IR light!
The images above are of a Canon EF 50/1.8 on an EOS 70D. The image on the left shows focus in visible light (actually a target illuminated with an LED source). The image on the right shows the focus with a Hoya R72 filter on the lens. The white line on the distance scale is the normal focus distance indicator. The red dot is the IR focus distance indicator line. Note how the "5" of "2.5" shifts from next to the while line in visible light to next to the red dot in IR. If the IR focusing got was used for visible light the lens would be front focused. So more IR might tend to result in closer focus - which is the same as saying that less IR might result in more backfocus.
In another series of tests I used an LED source and two filters. Both filters allowed blue light, peaking at around 500nm, to pass. Filter #1 (LEE 172) also allowed light above 700nm to pass (near IR) , while filter #2 (LEE 727)only allowed light above 750nm to pass, thus cutting off more near IR light. Using an EOS 7D and an 85/1.8 lens I looked at how focus shifted between the unfiltered LED and the LED through Filter #1 and filter #2. The focus for both the unfiltered LED - with IR output - ("C" above) and Filter #1 - which passed more IR -(see "B" above) were similar with no front or back focus evident. However when the target was illuminated using the LED through filter #2 (which cut more if the IR), backfocus was observed (see "A" above). This is consistent with the observation that focus moves forward when the light contained more IR and it moved back when the light contains less IR.
If the non-thermal light sources (LED and Fluorescent) have less IR than the thermal sources (Tungsten light and Sunlight), then the above theory would be consistent with the observation that the non-thermal (lower IR?) sources result in more backfocus. This is the same as saying that the more IR that is present in the light source, the further forward the focus for visible light shifts.
Contrast detection AF in Live View does not appear to be influenced at all by the nature of the illuminating light. Note that Contrast detection uses the imaging sensor for (contrast based) focus determination, and the imaging sensor has a very strong IR blocking filter in front of it.
So could AF be influenced by the amount of IR in the light source? Well, yes, it certainly could be. Whether it is or not I don't know. I don't really know why the AF sensors need to be IR sensitive. In fact I'd have thought that ideally they'd have the same spectral response as the imaging sensor and human eyesight, i.e. visible light. Of course the variation in focus may be nothing at all to do with IR. It's just a guess. Just because a theory is consistent doesn't make it correct!
So at this point I don't know what the exact technical explanation is for what I'm seeing. However the consequence of it is that if you are doing focus testing, and if you are setting focus microadjustment on the basis of sharpness tests, you need to be aware that the nature of the light you are using could influence your results. It may depend on which camera you are using and/or which lens you are using, but it's certainly possible that if you calibrate focus indoors under some types of artificial light, outdoor focus in sunlight may be different. If you are critically concerned about focus, it's something you might want to check on.
To try to better understand what is happening with focus under different light sources I obtained a B+W 486 filter. This filter passes visible light but blocks both UV and IR light. The filter transmission spectrum is shown below (red trace):
Visible light is unaffected and no color or exposure correction is required (the filter absorbs less than 1/3 stop of visible light).
I then took a series of shots in sunlight using a Canon EOS 70D and Canon EF 85/1.8 at f1.8. 10 shots (refocusing each time) with no filter and 10 shots (refocusing each time) with the B+W 468 filter on the lens. Looking at where the focus fell in each case I saw the following:
This shows the full frame and just demonstrates that the filter doesn't change color or exposure. White balance was set to daylight for both shots.
The above plot shows relative focus position for the two sets of shots. There's some scatter (as expected) but every one of the unfiltered shots focus in front of every shot with the filter. To see what this actually looked like in terms of focus position the next image is an enhanced crop from each showing the area on the slanted scale which was in best focus:
I can make the same point again using a Tungsten light source rather than daylight. Here are enhanced crops of the slanted scale section of the focusing target.
Again when IR (and UV) is present, focus moves forward. You can pretty much rule out a UV effect because (a)-Tungsten light contains very little UV, (b)-lens glass is a good absorber of UV and (c)- Silicon based Pixels have low UV sensitivity. In contrasts Silicon based pixels (as used in AF sensors) is inherently more sensitive to IR than visible light, Tungsten light is very rich in IR and lens glass is very transparent to IR.
So the conclusion is the same (but based on slightly firmer evidence). The phase sensitive TTL-SIR AF sensors are responding to IR light. The more IR that's present in the light, the more visible light is backfocused. Saying the same thing in a different way, the more IR that's present in the illuminating light, the further forward visible light is focused.
Does it matter? Well, if you are trying to get focus microadjustment it does. You will get different settings depending on what light source you use to illuminate your focusing target. The largest difference will be between a light source rich in IR, such as a Tungsten (or QH) light and a light source low in IR, such as an LED or Fluorescent light. Daylight comes somewhere in between!
With a fast lens shot at wide aperture, the difference in focus exceed the depth of field of the lens and there will be a significant and easily seen difference in image sharpness when switching from an IR rich light source (e.g. Tungsten) to an IR poor light source(e.g. Fluorescent). At smaller apertures, increased depth of field may minimize the effect of the focus difference.
The AF sensors respond to IR light, but this is probably not something the average photographer needs to worry about. It will be most noticeable when shooting with fast lenses wide open under different light sources (e.g. fluorescent and tungsten). However average photographers probably don't try to optimize the focus microadjustment settings for all their lenses on all their cameras. In the case of the latter group, attention to what light source is used to illuminate the focusing target would seem to be required.
I now think I know why Canon made the AF sensors of EOS DSLRs sensitive to IR light. Clearly they don't need any IR sensitivity for normal visible light photography, so why make them IR sensitive? The answer appears to be that the AF assist light in a number of Canon speedlites operates in the near-IR region. It looks red, but the red you can see is only the tail of the output spectrum. I measure the output spectrum of the AF assist light in the Canon Speedlight 550EX and a plot of the data is shown below:
When you look at the AF assist light all you can see by eye is the weak tail at ~650-660nm. Your eye can't see the peak at 700nm (IR) which is at least 50x brighter than the deep red your eye can see. So Canon had to make the AF sensors sensitive to IR light out to at least 700nm, probably to 720nm or so. This explains why you can focus through a Hoya R72 IR pass filter, which passes light above 700nm and has a 50-60% transmission at 720nm.
The only remaining question is how far into the IR the sensitivity of the AF sensors extends. I don't have the equipment to map out AF sensitivity as a function of wavelength. However I did manage to get AF to operate under target illumination by a 940nm IR LED light source. Sensitivity seemed low, but I had a Hoya R72 filter on the lens just to block any stral visible light (even though the room was dark to my eyes) and the only source of illumination was a low power 940nm LED, positioned next to the focus target. The camera did correctly lock focus on the target after a little hunting.