Tuesday, June 17, 2008

Correcting Auto-Focus Errors on the Pentax K10D 1.30 Firmware

I got the suitably-impressive sounding Pentax smc P-DA 16-45mm F4 wide-angle zoom from Francis from the DPP forum for half the local price (and I got free shipping, his cousin Louie carried it here from the US).

It's not as sharp, as weather-proof, or as luxurious as the Canon 17-40mm F4 L that I wrote about in March 2007 but at less than one-third the local price, I am hardly complaining!

The Pentax has the benefit of being slightly wider (25-70 mm equivalent). It has a "quick focus clutch mechanism" which is like a poor man's Ultrasonic Motor, focuses quite close, is decently sharp at F4.. I couldn't be more pleased.

What was less than pleasing was my discovery that it mis-focused a bit. I took a series of photos with autofocus and manual focus (checking with my Chinese split-image focusing screen) and I discovered that the manual focus shots were always, consistently, sharper:

Taken with auto-focus:

and with manual focus:

The amount of mis-focus seems disconcertingly large, but the above shots are at 100%. The actual area shown above are inside the yellow box in this photo:

So the amount of mis-focus is really not a killer; all digital SLR's have some degree of mis-focus; in fact Canon has an "AF shift compensation" menu in their flagship DSLR's (the ones which cost $5,000 to $8,000) so that you can dial in focus corrections for up to twenty lenses. Canon doesn't provide this feature in their lower-end DSLR's (anything that is not an EOS 1-something) because the lower-end models do not officially support split-image focusing screens, so lower-end users can't see in the viewfinder if their cameras are mis-focusing.

Pentax also has such a feature in their $1,000 K20D but only for up to five lenses if I'm not mistaken. The K10D, which is what I have, used to have this focus correction available in the debug menu, but in firmware version 1.11 Pentax disabled the debug menu.

Current firmware is 1.30 so there's no option at all for debug menu. What some people have done is downgrade to a hacked 1.10 firmware, apply the focus shift, then upgrade back to 1.30 afterward to get the Supersonic Drive Motor feature and ISO on the OK button. But it's a hassle.

Thanks however to the famous (or infamous) Pentax blogger RiceHigh, I learned about a Russian utility that enables debug mode on the 1.30 K10D firmware without any firmware downgrades: you simply connect your camera to your computer (which must have the Pentax Laboratory software and the Russian utility) via USB, run the utility software, and et voila, debug mode is enabled.

The trouble is, the debug mode utility was written by some Russians; and my copy of Windows doesn't have Cyrillic font support; and even if it did, I cannot read Russian. This is how the utility screen looks like:

I basically guessed which buttons to push to enable and disable the debug mode; I've numbered the screen so I can explain.

Firstly, you must connect the K10D to the computer (with Pentax drivers) with the supplied USB cable.

Second, always press button 1. Once this button is pressed, the radio buttons (UI elements 2, 3, and 5) become enabled.

Next, select radio button 5, to enable debug mode. To disable debug mode, select radio button 2.

Press button 3 to save your settings.

Press button 4 to exit.

It is necessary to power-cycle the K10D in order to get rid of debug mode (once you've disabled it via the utility).

When debug mode is enabled, disconnect the camera so that you can access the debug menu (press Menu, then select the Setup tab, then scroll to the bottom). The appropriate setting is the AF SHIFT setting.

I did some trial-and-error, and eventually settled on +120um focus correction; this gets the 16-45 AF to agree with the split screen (more or less) and gives relatively sharp photos.

And the final result:

Which is not bad at all! a little more correction (I also tried +160um and +240um) actually works better, but causes mis-focusing at other focusing distances, so the figure I chose was the best compromise I could work out in twenty minutes.