Newsgroups: comp.robotics
Path: brunix!sgiblab!swrinde!cs.utexas.edu!howland.reston.ans.net!wupost!udel!rochester!pelz
From: pelz@cs.rochester.edu (Jeff Pelz)
Subject: Re: Anybody know about Auto Focus
Message-ID: <1994Feb10.143317.12044@cs.rochester.edu>
Organization: University of Rochester Computer Science Department
References: <2jbkajINN3sv@vision.uccs.edu>
Date: Thu, 10 Feb 1994 14:33:17 GMT
Lines: 91

In article <2jbkajINN3sv@vision.uccs.edu>,  <news@vision.uccs.edu> wrote:
>Hello all,
>
>	I'm building a robot that uses a camera to see with.  Can
>anyone give any advice about "auto focus"?  
>		......
>						Sincerely yours,
>
>						Joseph R. Melow

There are several techniques used in cameras now -

- ultrasonic ranging systems measure the time-of-flight for the pressure
  wave to reach the subject and return to the camera.

- IR systems use triangulation to determine the distance to the object. 
  Either the IR beam is 'swept' across the field to determine the angle
  at which the maximum signal is returned to a small area detector, or
  a linear CCD detector is used with a fixed mirror.  In this case the 
  position (on the linear array) of maximum response determines the angle 
  (and distance).


                * object                         * object
               /|                                |\
              / |                                | \
             /  |                                |  \
            /   |                                |   \
           /    |                                |    \
          /     |                                |     0 (lens)
     source    point                           fixed    \
    sweeps   detector                          source    \
                                                        +++++++++
                                                     linear CCD array

     1)  swept beam                             2) fixed beam


- image contrast systems rely on high contrast edges in the object plane.
  The best focus is determined by finding the focus position that provides
  the highest contrast at the image plane (with a CCD array).  A disadvantage
  of these systems is that when they are out of focus, they don't "know" which
  way to go to find higher contrast.

- phase detection systems look *behind* the image plane to see how far apart
  the divergent rays are:

          *             |          |
                 *      |          |
                       *|         *|  Out of focus
                        |   * *    |  (focus behind image plane)
                        |   * *    |  
                       *|         *|
                 *      |          |
          *             |          |
                    image plane      CCD array



     *                  |          |
             *          |         *|
                  *     |    *     |
                       *|*         |  In focus
                       *|*         |
                  *     |    *     |
             *          |         *|
     *                  |          |



                        |         *|
*                       |          |
        *               |     *    |
             *          |*         |  Out of focus
                  **    |          |  (focus in front of image plane)
                  **    |          |
              *         |*         |
        *               |     *    |
*                       |          |
                        |         *|


  (yes you need a micro lenslet array between the image plane and the CCD
   array, but I'm not going to try to do THAT in ASCII!)

----------------------------------------------------------------------------
Jeff Pelz                  | "The danger already exists that mathematicians
Center for Visual Science  |  have made a covenant with the Devil to darken the
University of Rochester    |  spirit and to confine man in the bonds of Hell."
[jeff@cvs.rochester.edu]   |                              - St. Augustine
----------------------------------------------------------------------------
