The Naked Scientists

The Naked Scientists Forum

Author Topic: How does the auto-focus on a camera work?  (Read 8595 times)

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does the auto-focus on a camera work?
« on: 21/02/2007 13:24:50 »
How do they work? Is there an invisible imp inside who runs out very fast with a tape measure, or is it something a bit more scientific?
« Last Edit: 15/09/2007 22:04:23 by chris »


 

Offline eric l

  • Hero Member
  • *****
  • Posts: 514
    • View Profile
Re: How does the auto-focus on a camera work?
« Reply #1 on: 21/02/2007 14:10:35 »
In some cases there is indeed a little imp leaving the camera and comming back with the measurement.  That imp is either an ultrasonic wave, in which case the time delay between emission of the pulse and reception of the reflection is the tape measure.  If your imp is an infra red light beam, it works more along the line of the split image (or double image) rangefinders (Leica, early Contax models...), that is by triangulation.  In those cases, focussing is independent of the camera lens.
In other cases, the little imp looks at the image in the camera, and searches for maximum contrast or maximum "neatness" of the image.
I know there is also a system called "phase detection" but I have to leave it to others for explaining that.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
Re: How does the auto-focus on a camera work?
« Reply #2 on: 21/02/2007 21:55:44 »
I was wondering about IR or ultrasound but I didn't see how that could work in a really jumbled environment. I suppose if the beam is narrow enough it would be OK though.

I still prefer the imp theory though  ;D
 

Offline eric l

  • Hero Member
  • *****
  • Posts: 514
    • View Profile
Re: How does the auto-focus on a camera work?
« Reply #3 on: 22/02/2007 15:29:03 »
In most cases it focusses on a circle or oval in the centre of the image (very much like the microprism ring in "analog" SLR cameras).  If you want to focus on something that is not in the centre, point first with the object in the centre and fix the focussing while you compose your image as you want to have it.
In a jumbled environment, focussing is done on the object closest to the camera (and within that foussing centre of the image).
Most problems occur when you want to take a picture through a window, e.g. from the inside of a touring car. 
 

another_someone

  • Guest
Re: How does the auto-focus on a camera work?
« Reply #4 on: 22/02/2007 16:02:45 »
In most cases it focusses on a circle or oval in the centre of the image (very much like the microprism ring in "analog" SLR cameras).  If you want to focus on something that is not in the centre, point first with the object in the centre and fix the focussing while you compose your image as you want to have it.
In a jumbled environment, focussing is done on the object closest to the camera (and within that foussing centre of the image).
Most problems occur when you want to take a picture through a window, e.g. from the inside of a touring car. 

A car window is relatively a simpler problem (many autofocus cameras will still allow you to force the camera to focus to infinity), but focusing through a shop window can be far more problematic (especially because the low lighting often creates difficulties cameras that use TTL focusing (contrast detection, etc.).

Some modern digital cameras will actually allow you to select focus areas away from the centre of the screen (not tried using one, so I cannot say if it actually is any simpler to use than simply pointing the camera at what you want to focus on, locking the focus, and the recomposing the image), and one of the latest cameras actually has a mode that tries to identify any human faces in the image and choose that as the focus point (what it does when it detects multiple faces, I don't know - then again, it may, if there is enough light, simply try and expend the depth of field).
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
Re: How does the auto-focus on a camera work?
« Reply #5 on: 23/02/2007 13:52:18 »
Thank you all for your erudite replies. I am enlightened.  :)
 

Offline Pumblechook

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
How does the auto-focus on a camera work?
« Reply #6 on: 27/10/2008 13:39:23 »
Guessing here but maybe one system just looks at the file size of the image.  When in focus there will be more detail and the number of bytes will peak.
 

Offline Don_1

  • Neilep Level Member
  • ******
  • Posts: 6890
  • Thanked: 7 times
  • A stupid comment for every occasion.
    • View Profile
    • Knight Light Haulage
How does the auto-focus on a camera work?
« Reply #7 on: 27/10/2008 14:07:27 »
This is usually a phase detection system in SLR cameras and contrast detection in non SLRs.

In the old film SLRs' the focus was centre weighted but in modern digital SLRs' (DSLR) there will usually be nine or more centre of focus points to choose from. My Nikon D300 has 51 points of focus to choose from, so you do not have to have the main subject in focus in the middle of your frame.

This will roughly explain how it works: http://www.luminescentphoto.com/articles/CAM2000/cam2000.html
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does the auto-focus on a camera work?
« Reply #8 on: 27/10/2008 17:01:15 »
My Canon EOS has lots of points of focus too. That's 1 of the things that prompted this question.
 

lyner

  • Guest
How does the auto-focus on a camera work?
« Reply #9 on: 27/10/2008 21:49:49 »
Guessing here but maybe one system just looks at the file size of the image.  When in focus there will be more detail and the number of bytes will peak.
That is effectively what they do in most systems,nowadays. But you don't need to JPEG code the image to tell when it's in focus.. You just need to look for the focus setting which gives you maximum detail - highest spatial frequency content - which would give the biggest file
There are small areas of striped sensor at different (selectable) places in the focal plane of the lens. The autofocus system waggles the focus motor until it gets the maximum signal, which is the sharpest picture. This system works through glass or anything. It does, however, tend to need a fair amount of light and can fail in dim scenes. It also tends to maximise vertical edges and can miss out with diagonal details.
 

The Naked Scientists Forum

How does the auto-focus on a camera work?
« Reply #9 on: 27/10/2008 21:49:49 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums