Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
12-17-2009, 11:08 AM   #1
Veteran Member
VaughnA's Avatar

Join Date: Feb 2009
Location: Virginia
Photos: Gallery | Albums
Posts: 1,363
Auto AF Calibration?

From my understanding both the K-X and K-7 will do contrast focus detection in live view. Live view uses the sensor to focus so it should have basically perfect focus without back or front focus.

Why couldn't pentax create firmware with a calibrate function that would use live view to get the 'correct' focus on a contrasty subject then focus again with the mirror down and apply an offset to correct for the difference? You would basically point at an object with the camera on a tripod and press calibrate. It could do a live view focus, then a 'normal' focus and get the offset and save it.


Last edited by VaughnA; 12-17-2009 at 11:51 AM.
12-17-2009, 02:27 PM   #2
Senior Member




Join Date: Dec 2009
Location: United States
Posts: 112
You can do it manually in the debug mode on the K-X. Not that difficult, just a minor inconvenience.

The K7 can do it on a per-lens basis.
12-17-2009, 02:31 PM   #3
Veteran Member
VaughnA's Avatar

Join Date: Feb 2009
Location: Virginia
Photos: Gallery | Albums
Posts: 1,363
Original Poster
I'm aware of the ability to enter the offsets. But you have to go through the hassle of charts and alignment tools, then looking at the results and tweaking. By letting the camera focus using live view, then refocus using the 'normal' system you should be able to generate the offset and put it into the calibration table You should be able to automatically calibrate as good or better than using a focusing calibration aid.
01-19-2010, 04:23 PM   #4
Site Supporter




Join Date: Oct 2009
Photos: Gallery | Albums
Posts: 243
QuoteOriginally posted by VaughnA Quote
I'm aware of the ability to enter the offsets. But you have to go through the hassle of charts and alignment tools, then looking at the results and tweaking. By letting the camera focus using live view, then refocus using the 'normal' system you should be able to generate the offset and put it into the calibration table You should be able to automatically calibrate as good or better than using a focusing calibration aid.

Could you please elaborate on this? I get how this works in principle, but not sure how you could deduce the offset by doing so. Thank you!

01-19-2010, 05:22 PM   #5
Pentaxian
Aegon's Avatar

Join Date: Jan 2008
Location: Portland, OR
Posts: 1,413
Here's how:

Add a new mode for lens focus auto adjust, click the button
The camera focuses uses live view contrast detection

then the camera switches to OVF and adjusts the focus one tick at a time until the optical focus is "perfect". The amount of adjustments is your lens offset.

This is all high level. But I've asked myself why they don't do this, too.
01-19-2010, 08:28 PM   #6
Veteran Member
VaughnA's Avatar

Join Date: Feb 2009
Location: Virginia
Photos: Gallery | Albums
Posts: 1,363
Original Poster
QuoteOriginally posted by Aegon Quote
Here's how:

Add a new mode for lens focus auto adjust, click the button
The camera focuses uses live view contrast detection

then the camera switches to OVF and adjusts the focus one tick at a time until the optical focus is "perfect". The amount of adjustments is your lens offset.

This is all high level. But I've asked myself why they don't do this, too.
Exactly, it should be trivial in software with any camera with live view.
01-19-2010, 08:54 PM   #7
Igilligan
Guest




A great idea... and I would not think it would be all that difficult to implement.

This would work really well with all AF prime lenses. And Pentax would get big kudos for doing it.

Not to useful for zooms unless they created a program that set a wide / mid / long zoom points and and then did some averaging... a little more code intensive but still possible.

But I would take it just for the primes.

Patent it up and get rich.
01-20-2010, 11:21 AM   #8
Pentaxian
Aegon's Avatar

Join Date: Jan 2008
Location: Portland, OR
Posts: 1,413
I am a computer programmer and I love these replies. No offense is intended toward anyone who thinks this is easy. In fact, I bet that most non-programmers would think something like this is easy, so it is probably more abnormal to think it is difficult.

But I've sat and thought of a dozen different ways to do this, to make it work as efficiently and accurately as possible. There are a variety of tricks that could be performed to optimize for a variety of goals. I'll make a short list of tricks in a moment.

But first, I want to add that writing firmware using some form of assembly language for distribution to millions of paying customers who expect everything to work properly is never an easy task. You need a good team of engineers who understand minutia of focusing methods, a good team of computer programmers, and good QA to pull something like this off. If you are lucky, then you'll have a few people who are knowledgeable, skilled, motivated, and have the time to do this job. And these people will be making good salaries, so the corporation will have to weigh the value of this program against the value of whatever else these engineers could be working on otherwise. Maybe it is more important to keep Jimmy Nerdgoggles working on the DA* 16-135 with SDM Mark II and a new optical formula that reduces the chances of decentering flaws.

Back to the topic of goals and tricks, here are a few off the top of my head.

You could zero-in on the offset number using something like newton-raphson to quickly find the zero. Your reference points would be something like a first forward estimated derivative, assuming that the focal mechanism measures quality in some consistent magnitude. Or you could do something like a binary search. Or you could approximate the camera's zero point by averaging previous offsets, so that your searches have a better initial guess.

You could calibrate a "neutral" body and lens combination at the factory, and then use the body to compare offsets for a particular lens, and then the offset could be burned into the lens itself before shipping. Similarly, each camera could be tested with the neutral lens to get a sense for its body-offset. Together, the system could get either a really good initial guess at a zero point, or it could actually work out to be good enough most of the time.

Once an offset is determined, you could do some further shots to prove that the offset is right by switching back to EVF, contrast focusing, reverting to OVF, adjust the focus to the offset, and check that this focus is better than the neighbor's focus in either direction.

If adjacent focal offsets are mechanically indistinguishable at the focus sensor, then you could spin the focus until a different answer is achieved. One method of determining the proper zero amongst the given choices is to take the middle approved value. Another way might be to take the middle as determined by the point whose depth of field would encompass all of the approved values.

What I'm saying is that there are a lot of different characteristics that you'd have to determine, and then you'd have to test a group of ideas to see if you are doing it right. You could just pick a good-enough method. Or you could pick a point and then spend some time verifying that it is the best point.

I'm just mentioning the tip of the iceberg. There are a lot of things you'd have to know about the specific camera, its mechanical features and limitations, and your tolerance for errors before you can even choose a good method. You'll have to decide if you want it done very quickly, with as few shots as possible, or if you are willing to take a sample at every possible focal length. You'd have to know details about the focal sensor's ability to distinguish between 100% focus and 99.99%, and then you'd have to decide how you can distinguish the two. You could spend a lot of time on this problem.

I'm not going to spend more time on it. So I'll leave the best implementation as an exercise for the reader.

01-21-2010, 01:53 AM   #9
Veteran Member
blende8's Avatar

Join Date: Feb 2007
Location: Bremen, Germany
Photos: Albums
Posts: 1,484
Perhaps a first step would be to have the stepping from +10 to -10 done automatically. Perhaps repeating it four times.

Then transferring the images to the computer and having them analyzed automatically. I think it should be possible to select the sharpest images automatically. If not, present the center of each image and let the user select.

Somethink like the way you calibrate your printer when inserting a new color cartridge.
01-21-2010, 05:42 AM   #10
Veteran Member
VaughnA's Avatar

Join Date: Feb 2009
Location: Virginia
Photos: Gallery | Albums
Posts: 1,363
Original Poster
Aegon,

I'm an embedded programmer as well and still think that overall it would be trivial to do a simple calibration as I described which should be a big improvement over the current system. Don't make it more complex than it needs to be. There is no need for complex algorythms. The following list should produce results as good or better than pixel peeping with a brick wall and is fairly simple. This wouldn't need to be a master's thesis on algorythms, this is basic addition and subtraction. No need to use a jackhammer to drive in a thumbtack.

Go to Live View
Focus
Save Focus 'value'(D/A or similar Value for focus motor).
Go to Optical View
Focus
Save Focus 'value'
Subtract values to get offset.
Save the offset in the table for lens.

That should be trivial for a decent programmer to do. Probably calling routines to do the focusing and setting of live view. Not first grade trivial but it should be straightforward for a compitent programmer.
01-21-2010, 07:02 AM   #11
Pentaxian




Join Date: Apr 2007
Location: Sweden
Posts: 1,940
I'm with VaughnA here. This seems like a pretty straightforward thing to do. (And yes, I'm a programmer too).
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
auto af, calibrate, camera, dslr, focus, live, offset, photography, view
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Revuenon MC Japan 200 mm f3,3 MC & MC Revue 2 x AUTO Teleconvertor K sadsun73 Pentax SLR Lens Discussion 1 11-07-2010 10:47 PM
Calibration ; what gives! mba1971 Digital Processing, Software, and Printing 12 11-18-2009 07:12 AM
IS there Auto Focus assist in Auto with the Metz 58? madman6767 Pentax DSLR Discussion 5 01-26-2009 06:27 AM
Monitor calibration? Shogo Digital Processing, Software, and Printing 7 06-16-2008 09:21 PM
Sears Auto 1:1.4 55mm vs. Nikkor-S Auto 1:1.4 50mm carpents Pentax SLR Lens Discussion 8 06-28-2007 03:29 AM



All times are GMT -7. The time now is 08:31 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top