Patent Publication Number: US-7711201-B2

Title: Method of and apparatus for generating a depth map utilized in autofocusing

Description:
FIELD OF THE INVENTION 
     The present invention relates to the field of imaging. More specifically, the present invention relates to improved autofocusing. 
     BACKGROUND OF THE INVENTION 
     A variety of techniques for generating depth maps and autofocusing on objects have been implemented in the past. One method conventionally used in autofocusing devices, such as video cameras, is referred to a hill-climbing method. The method performs focusing by extracting a high-frequency component from a video signal obtained by an image sensing device such as a CCD and driving a taking lens such that the mountain-like characteristic curve of this high-frequency component is a maximum. In another method of autofocusing, the detected intensity of blur width (the width of an edge portion of the object) of a video signal is extracted by a differentiation circuit. 
     A wide range of optical distance finding apparatus and processes are known. Such apparatus and processes may be characterized as cameras which record distance information that are often referred to as depth maps of three-dimensional spatial scenes. Some conventional two-dimensional range finding cameras record the brightness of objects illuminated by incident or reflected light. The range finding cameras record images and analyze the brightness of the two-dimensional image to determine its distance from the camera. These cameras and methods have significant drawbacks as they require controlled lighting conditions and high light intensity discrimination. 
     Another method involves measuring the error in focus, the focal gradient, and employs the focal gradient to estimate the depth. Such a method is disclosed in the paper entitled “A New Sense for Depth Field” by Alex P. Pentland published in the Proceedings of the International Joint Conference on Artificial Intelligence, August, 1985 and revised and republished without substantive change in July 1987 in IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume PAMI-9, No. 4. Pentland discusses a method of depth-map recovery which uses a single image of a scene, containing edges that are step discontinuities in the focused image. This method requires the knowledge of the location of these edges, and this method cannot be used if there are no perfect step edges in the scene. 
     Other methods of determining distance are based on computing the Fourier transforms of two or more recorded images and then computing the ratio of these two Fourier transforms. Computing the two-dimensional Fourier transforms of recorded images is computationally very expensive which involves complex and costly hardware. 
     Other methods have been implemented by comparing multiple images to determine a depth. One method includes using an image that is in-focus and an image that is out-of-focus where the in-focus value is zero, hence the mathematics are very simple. Another method utilizes two separate images, with different focuses, where the distance between the images is the blur of the first image minus the blur of the second image. Computations are performed to determine the depth, although there are significant drawbacks with the past methods implemented in these computations. 
     SUMMARY OF THE INVENTION 
     A method of and an apparatus for determining a depth map utilizing a movable lens and an image sensor are described herein. The depth information is acquired by moving the lens a short distance and acquiring multiple images with different blur quantities. An improved method of simulating gaussian blur and an approximation equation that relates a known gaussian blur quantity to a known pillbox quantity are used in conjunction with a non-linear blur difference equation. The blur quantity difference is able to be calculated and then used to determine the depth map. Many applications are possible using the method and system described herein, such as autofocusing, surveillance, robot/computer vision, autonomous vehicle navigation, multi-dimensional imaging and data compression. 
     In one aspect, an apparatus for determining depth information comprises a lens for acquiring an image signal, an image sensor for receiving the image signal, wherein one or more of the lens and the image sensor are movable in relation to each other and a processing module coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference. The lens, the image sensor and the processing module are contained within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The lens is movable and acquires the image signal at a first position and then at a second position. The processing module simulates gaussian blur. The processing module simulates gaussian blur using iterations of a convolution kernel. The processing module relates a gaussian blur quantity to a pillbox blur quantity. 
     In another aspect, a method of determining depth information comprises receiving a first image signal with a first blur quantity at an image sensor after the first image signal passes through a lens at a first position, receiving a second image signal with a second blur quantity at the image sensor after the second image signal passes through the lens at a second position, computing a non-linear blur difference using the first blur quantity and the second blur quantity and generating a depth map from the non-linear blur difference. The method is performed within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The method further comprises simulating gaussian blur. Simulating gaussian blur uses iterations of a convolution kernel. The method further comprises relating a gaussian blur quantity to a pillbox blur quantity. 
     In another aspect, a method calculating depth information comprises simulating a gaussian blur quantity using a convolution kernel, relating the gaussian blur quantity to a pillbox blur quantity, computing a non-linear blur difference and generating a depth map from the non-linear blur difference. The method is performed within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. Simulating gaussian blur uses iterations of a convolution kernel. 
     In yet another aspect, a capture and display device comprises a lens for receiving an image signal, an image sensor for receiving the received image signal, wherein one or more of the lens and the image sensor are movable in relation to each other and a program coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference. The lens, the image sensor and the program are contained within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The lens is movable and acquires the image signal at a first position and then at a second position. The program simulates gaussian blur. The program simulates gaussian blur using iterations of a convolution kernel. The program relates a gaussian blur quantity to a pillbox blur quantity. 
     In another aspect, an apparatus for determining depth information comprises a lens for receiving an image signal, an image sensor for receiving the received image signal, wherein one or more of the lens and the image sensor are movable in relation to each other and a processing module coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference, wherein a gaussian blur is simulated. The lens, the image sensor and the processing module are contained within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The image sensor is movable and acquires the image signal at a first position and then at a second position. The processing module simulates the gaussian blur using iterations of a convolution kernel. The processing module relates the gaussian blur quantity to a pillbox blur quantity. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  illustrates an exemplary arrangement of a lens in a first position and in a second position to receive two images with different blur quantities on a sensor. 
         FIG. 2A  illustrates an example of gaussian blur in continuous time. 
         FIG. 2B  illustrates an example of gaussian blur in discrete time. 
         FIG. 2C  illustrates an example of gaussian blur in discrete time. 
         FIG. 3  illustrates an exemplary arrangement of a lens and a sensor to receive two images with different blur quantities. 
         FIG. 4  illustrates two images with different blur quantities. 
         FIG. 5  illustrates two images with different blur quantities. 
         FIG. 6  illustrates a lens with designated lengths used for determining the blur quantity. 
         FIG. 7  illustrates a graphical representation of an imaging device. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     A method of and an apparatus for determining a depth map are described herein. The depth information is acquired by moving a lens a short distance and acquiring multiple pictures with different blur quantities or functions. A more accurate gaussian blur implementation, in addition to a non-linear version of the blur difference allow a better determination of the depth map. By telescoping between the two blurred functions using the gaussian blur implementation, a depth map is determined. In the ideal optical scenario, the two functions are pillbox blur functions. 
       FIG. 1  illustrates an example of a lens  100  in a first position and in a second position to generate two images with different blur quantities on a sensor  102 . With the lens  100  in focus position A, the distance from a scene (not shown) to the lens  100  is the distance d 0  and the distance between the lens and the focal point is the distance d 1 , where the distance d 0  is much greater than the distance d 1 . The distance between the lens  100  and the sensor  102  is the distance D J . Furthermore, the blur radius with the lens  100  in focus position A is radius r 1 . When the lens  100  is in focus position A+\delta, the distance from the scene (not shown) to the lens  100  is still the distance d 0 , however the distance between the lens and the focal point is the distance d 2  where the distance d 0  is much greater than the distance d 2 . The distance between the lens  100  and the sensor  102  is the distance D 4 . Hence, the blur radius with the lens  100  in focus position A+\delta is the radius r 2 . Once the different blur radii, r 1  and r 2 , are known, depths of objects in the scene are able to be determined for use in a number of applications. 
       FIGS. 2A-C  illustrate examples of gaussian blurs. In  FIG. 2A , a well known result is shown in continuous time where σ 1 =1 and σ 1   2 =1; σ 2 =2 and σ 2   2 =4; σ 1 +σ 2 =√{square root over (5)} and σ 1   2 +σ 2   2 =5. Each section of equation (1), shown below, is shown in graph form in  FIG. 2A . The section with σ 1   2  reaches a maximum of 0.3989, the section with σ 2   2  reaches 0.1995 and the section with σ 1   2 +σ 2   2  reaches 0.1784. 
                       1       2   ⁢           ⁢     πσ   1   2           ⁢     ⅇ     -     (       x   2       2   ⁢     σ   1   2         )         *     1       2   ⁢           ⁢     πσ   2   2           ⁢     ⅇ     -     (       x   2       2   ⁢     σ   2   2         )           =       1       2   ⁢           ⁢     π   ⁡     (       σ   1   2     +     σ   2   2       )             ⁢     ⅇ     -     (       x   2       2   ⁢     (       σ   1   2     +     σ   2   2       )         )                   (   1   )                 FIG. 2B  shows the gaussian blur calculated in discrete time using sampled data. The result is similar to that in  FIG. 2A .
 
                       1       2   ⁢           ⁢     πσ   1   2           ⁢     ⅇ     -     (       x   i   2       2   ⁢     σ   1   2         )         *     1       2   ⁢           ⁢     πσ   2   2           ⁢     ⅇ     -     (       x   i   2       2   ⁢     σ   2   2         )           =       1       2   ⁢           ⁢     π   ⁡     (       σ   1   2     +     σ   2   2       )             ⁢     ⅇ     -     (       x   i   2       2   ⁢     (       σ   1   2     +     σ   2   2       )         )                   (   2   )                 FIG. 2C  is also in discrete time using sampled data. However, the result is not same as in  FIGS. 2A and 2B . The section of equation (3) with σ 1   2 +σ 2   2  does not reach 0.1784. Hence, there are issues with accuracy using this method.
 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             1 
                             
                               
                                 2 
                                 ⁢ 
                                 
                                     
                                 
                                 ⁢ 
                                 π 
                                 ⁢ 
                                 
                                     
                                 
                                 ⁢ 
                                 
                                   σ 
                                   1 
                                   2 
                                 
                               
                             
                           
                           ⁢ 
                           
                             ⅇ 
                             
                               - 
                               
                                 ( 
                                 
                                   
                                     x 
                                     k 
                                     2 
                                   
                                   
                                     2 
                                     ⁢ 
                                     
                                       σ 
                                       1 
                                       2 
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                           * 
                         
                       
                     
                     
                       
                         
                           
                             1 
                             
                               
                                 2 
                                 ⁢ 
                                 
                                     
                                 
                                 ⁢ 
                                 π 
                                 ⁢ 
                                 
                                     
                                 
                                 ⁢ 
                                 
                                   σ 
                                   1 
                                   2 
                                 
                               
                             
                           
                           ⁢ 
                           
                             ⅇ 
                             
                               - 
                               
                                 ( 
                                 
                                   
                                     x 
                                     k 
                                     2 
                                   
                                   
                                     2 
                                     ⁢ 
                                     
                                       σ 
                                       2 
                                       2 
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                   = 
                   
                     
                       1 
                       
                         
                           2 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             π 
                             ⁡ 
                             
                               ( 
                               
                                 
                                   σ 
                                   1 
                                   2 
                                 
                                 + 
                                 
                                   σ 
                                   2 
                                   2 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                     ⁢ 
                     
                       ⅇ 
                       
                         - 
                         
                           ( 
                           
                             
                               x 
                               k 
                               2 
                             
                             
                               2 
                               ⁢ 
                               
                                 ( 
                                 
                                   
                                     σ 
                                     1 
                                     2 
                                   
                                   + 
                                   
                                     σ 
                                     2 
                                     2 
                                   
                                 
                                 ) 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
     The accuracy of determining the gaussian blur is able to be improved by using the following method based on differential equations. 
     In one dimension:
 
f: R→R
 
L: R×R + →R
 
 L ( x; 0)= f ( x )
 
g: R×R + \{0}→R
 
where f is the one dimensional signal and L is defined by L(x;0)=f(x) and convolution with g, the gaussian blur kernel. Then:
 
                       L   ⁡     (     x   ;   t     )       =       ∫     -   ∞       +   ∞       ⁢       1       2   ⁢           ⁢   π   ⁢           ⁢   t         ⁢     ⅇ       ξ   2       2   ⁢   t         ⁢           ⁢     f   ⁡     (     x   -   ξ     )       ⁢     ⅆ   ξ           ,     t   &gt;   0             (   4   )               
and is defined by the diffusion equation:
 
                         ∂   L       ∂   t       =       1   2     ⁢         ∂   2     ⁢   L       ∂     x   2             ,       L   ⁡     (     x   ;   0     )       =     f   ⁡     (   x   )                 (   5   )               
Using Euler&#39;s method, the continuous equation:
 
                       ∂   L       ∂   t       =       1   2     ⁢         ∂   2     ⁢   L       ∂     x   2                   (   6   )               
can be discretized and rewritten in the following form:
 
                       L     i   ,     k   +   1         =           Δ   ⁢           ⁢   t     2     ⁢     L       i   +   1     ,   k         +       (     1   -     Δ   ⁢           ⁢   t       )     ⁢     L     i   ,   k         +         Δ   ⁢           ⁢   t     2     ⁢     L       i   -   1     ,   k             ,       Δ   ⁢           ⁢   t     ≤     1   2               (   7   )               
For example, if Δt=½, it is easy to realize the implementation above using the following convolution kernel:
 [¼ ½ ¼] 
Although the example where Δt=½ is used above and below for clarity, it should be understood that values for Δt less than ½ such as ¼ are able to be used as well in one dimension. For instance, if Δt=¼, then the kernel obtained is [⅛ ¾ ⅛]. By reducing the Δt value from ½ to ¼, the number of iterations needed to have the same effect increases. The equations below utilize the assumption that Δt=½ for one dimension. The Central Limit Theorem shows that the repeated iteration of the kernel quickly yields a gaussian function:
 [¼ ½ ¼]*[¼ ½ ¼]* . . . *[¼ ½ ¼] 
Equation (8) is the old, less accurate version of determining the blur.
 
                             1       2   ⁢           ⁢   π   ⁢           ⁢     σ   start   2           ⁢     ⅇ     -     (       x   m   2       2   ⁢     σ   start   2         )         *                 1       2   ⁢           ⁢   π   ⁢           ⁢     σ   ?   2           ⁢     ⅇ     -     (       x   m   2       2   ⁢     σ   ?   2         )                 =       1       2   ⁢           ⁢     πσ   finish   2           ⁢     ⅇ     -     (       x   m   2       2   ⁢     σ   finish   2         )                   (   8   )               
Equation (9) is an improved version. Using the number of iterations of [¼ ½ ¼] needed to be applied to telescope between and σ start    2  and σ finish   2 , the σ ?   2  is able to be calculated accurately.
 
                       1       2   ⁢           ⁢   π   ⁢           ⁢     σ   start   2           ⁢     ⅇ     -     (       x   m   2       2   ⁢     σ   start   2         )         *     [       1   /   4     ⁢           ⁢     1   /   2     ⁢           ⁢     1   /   4       ]     *   …   *     [       1   /   4     ⁢           ⁢     1   /   2     ⁢           ⁢     1   /   4       ]       =       1       2   ⁢           ⁢     πσ   finish   2           ⁢     ⅇ     -     (       x   m   2       2   ⁢     σ   finish   2         )                   (   9   )               
Using a similar numerical analysis approach shown in the ID case, we obtain the following convolution kernel for the 2D case for Δt=¼. It should be understood that values for Δt less than ¼ such as ⅛ are able to be used as well in two dimensions. By reducing the Δt value from ¼ to ⅛, the number of iterations needed to have the same effect increases.
 
     
       
         
           
             
               
                 
                   1 
                   48 
                 
               
               
                 
                   1 
                   12 
                 
               
               
                 
                   1 
                   48 
                 
               
             
             
               
                 
                   1 
                   12 
                 
               
               
                 
                   7 
                   12 
                 
               
               
                 
                   1 
                   12 
                 
               
             
             
               
                 
                   1 
                   48 
                 
               
               
                 
                   1 
                   12 
                 
               
               
                 
                   1 
                   48 
                 
               
             
           
         
       
     
     Fast implementation of the convolution kernel is possible using vector shifts, multiplication and addition. 
     In one dimension for example:
 
h=[¼ ½ ¼]
 
data=[a1 a2 a3 a4 a5 a6 a7 a8 a9 a10]
 
result=data*h, such that:
 
result=¼*[a2 a3 a4 a5 a6 a7 a8 a9 a10 a1]+½*[a1 a2 a3 a4 a5 a6 a7 a8 a9 a10]+¼*[a10 a1 a2 a3 a4 a5 a6 a7 a8 a9]
 
Furthermore, the one dimensional version is easily generalized to two dimensions. The following relationship exists for the one dimensional and two dimensional kernels:
 
                                 One Dimension   Two Dimensions                  Blur Variance → Iterations Needed   Blur Variance → Iterations Needed       σ 2  = 1 → 2   σ 2  = 1 → 4       σ 2  = 4 → 8   σ 2  = 4 → 16       σ 2  = 9 → 18   σ 2  = 9 → 36       σ 2  = 16 → 32   σ 2  = 16 → 64                    
Thus, a unique relationship exists for the one dimensional and two dimensional cases.
 
One Dimension:
         Δσ 2 =3→Δiterations=6   Δσ 2 =5→Δiterations=10×2   Δσ 2 =7→Δiterations=14
 
Two Dimensions:
   Δσ 2 =3→Δiterations=12   Δσ 2 =5→Δiterations=20×4   Δσ 2 =7→Δiterations=28
 
The above relationship is true for the “non-linear” variance quantity σ 2   2 −σ 1   2 =Δσ 2  where σ 2   2 &gt;σ 1   2 . Thus, it is possible to accurately simulate and compute the change in Gaussian blur utilizing the method described above.
       
     From  FIG. 3 , equations are able to be derived to determine the blur difference.  FIG. 3  shows a lens  100 , with a distance of D 2  between the lens  100  and the sensor  102 . Since the lens  100  is movable, the distance between the lens  100  and the sensor  102  is variable such that the distances are represented by the distance D 2  and the distance D 1 . The distance from the scene (not shown) and the lens  100  is the distance d 0  which is much larger than the distance between the lens  100  and the focal point designated as the distance d i . Depending on the distance of the lens  100  from the sensor  102 , the blur radius varies. In  FIG. 3 , the lens  100  moves a short distance and two radii are determined and designated as the radius r 1  and the radius r 2 . The value f is designated the focal length. 
                           r   1     =           d   0     ⁢     D   1       -       d   0     ⁢     f   l       -       f   l     ⁢     D   1           2   ⁢     d   0     ⁢     f   num                     =     &gt;       (     r   1     )     2                   =       (           d   0     ⁢     D   1       -       d   0     ⁢     f   l       -       f   l     ⁢     D   1           2   ⁢     d   0     ⁢     f   num         )     2                   (   10   )                       r   2     =           d   0     ⁢     D   2       -       d   0     ⁢     f   l       -       f   l     ⁢     D   2           2   ⁢     d   0     ⁢     f   num                     =     &gt;       (     r   2     )     2                   =       (           d   0     ⁢     D   2       -       d   0     ⁢     f   l       -       f   l     ⁢     D   2           2   ⁢     d   0     ⁢     f   num         )     2                   (   11   )               
Assuming r 1  is larger than r 2 , the following positive valued quantity is able to be computed:
 
                         (     r   1     )     2     -       (     r   2     )     2       =                 (         d   0     ⁢     D   1       -       d   0     ⁢     f   l       -       f   l     ⁢     D   1         )     2     -                 (         d   0     ⁢     D   2       -       d   0     ⁢     f   l       -       f   l     ⁢     D   2         )     2             2   ⁢     d   0     ⁢     f   num                 (   12   )               
Equation (12) is a non-linear version of the blur difference. Re-arranging equation (12) results in the following equation:
 
                         [         -     (       -       (     r   1     )     2       +       (     r   2     )     2       )       ⁢       (     2   ⁢     f   num       )     2       +       (       D   2     -     f   l       )     2     -       (       D   1     -     f   l       )     2       ]     ⁢     d   0   2       +       [     2   ⁢     f   1     ⁢     {         (       D   2     -     f   l       )     ⁢     D   2       -       (       D   1     -     f   l       )     ⁢     D   1         }       ]     ⁢     d   0       -     [         (       f   l     ⁢     D   1       )     2     -       (       f   l     ⁢     D   2       )     2       ]       =   0           (   13   )               
Then, using the quadratic formula, the depth d 0  is able to be determined:
   ax   2   +bx+c= 0   a =[−(−( r   1 ) 2 +( r   2 ) 2 )(2 f   num ) 2 +( D   2   −f   1 ) 2 −( D   1   −f   1 ) 2 ]  (14)   b=[ 2 f   1 {( D   2   −f   1 ) D   2 −( D   1   −f   1 ) D   1 }]   c =[( f   1   D   1 ) 2 −( f   1   D   2 ) 2 ] 
       FIG. 4  illustrates two images with different blur quantities. A first image  400  has a narrower blur quantity  404  than a second image  402  having a wider blur quantity  406 . Using a telescoping gaussian blur, the blur quantity  404  of the first image  400  is related to the blur quantity  406  of the second image  402 . In the ideal optical scenario, the two blur quantities or functions are pillbox blur functions. 
       FIG. 5  illustrates a first image  500  with a blur radius  r 1    and a second image  502  with a blur radius  r 2   . A number of equations are implemented utilizing the difference in blur of the two images. Based on the first image  500 : 
                 r   _     1     ←         r   _     1     ≈         2   ⁢           ⁢     σ   1       _     ⁢     
     ↓     
     ⁢       (     r   1   2     )     _               
From the second image  502 :
 
                           ⁢           r   2     _     ←         r   2     _     ≈         2   ⁢           ⁢     σ   2       _     ⁢     
     ↓     
     ⁢       (     r   2   2     )     _           ⁢     
     ⁢     Then   ,     
     ⁢       Δ   ⁢       (     r   2     )     _       =         (     r   2   2     )     _     -       (     r   1   2     )     _                     (   15   )                 Δ   ⁢           ⁢   Iterations     =       4   ⁢           ⁢   Δ   ⁢       (     σ   2     )     _       =         4   ⁢     (         (     σ   2   2     )     _     -       (     σ   1   2     )     _       )       ≈     Δ   ⁢       (     r   2     )     _         =         (     r   2   2     )     _     -       (     r   1   2     )     _                   (   16   )               
The overbar denotes quantities in pixel based/pixel reference units.
 
       FIG. 6  illustrates a lens with designated parameters. Equation (17) is derived from  FIG. 6  where changing the distance of the lens to the object and to the sensor affect the parameters used to compute the blur difference. 
                                   ⁢       r   _     =       ⁢         lens   -&gt;   D     2     *       abs   ⁡     (     lens   -&gt;       f_   ⁢   just     -   f_defocus       )         lens   -&gt;   f_just       *                       ⁢       lens   -&gt;   pixel_num       lens   -&gt;   imager_size               ⁢     
     ⁢     LPN   =     Lens   -&gt;   pixel_num       ⁢     
     ⁢     LIS   =     Lens   -&gt;   imager_size               (   17   )                           (     LPN   LIS     )       -   2       ⁢   4   ⁢           ⁢   Δ   ⁢       (     σ   2     )     _       =       ⁢         (     LPN   LIS     )       -   2       ⁢   4   ⁢     (         (     σ   2   2     )     _     -       (     σ   1   2     )     _       )                   ≈       ⁢         (     LPN   LIS     )       -   2       ⁢   Δ   ⁢           ⁢       (     r   2     )     _                   =       ⁢         (     LPN   LIS     )       -   2       ⁢     (         (     r   2   2     )     _     -       (     r   1   2     )     _       )                   =       ⁢       (     r   2   2     )     -     (     r   1   2     )                   =       ⁢     Δ   ⁢           ⁢     (     r   2     )                     (   18   )               
Therefore, using equation (18) the blur difference Δ(r 2 ) is able to be determined.
 
     Hence, a first image with a first blur quantity and a second image with a second blur quantity are able to be used to determine a variance delta Δ  (σ 2 )  after a number of iterations. From the variance delta, a blur difference Δ(r 2 ) is determined from equation 18. Using the quadratic formula and the blur radius delta, a depth d 0  is able to be determined, as shown below. 
     
       
         
           
             
               
                 
                   
                     Δ 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       ( 
                       
                         r 
                         2 
                       
                       ) 
                     
                   
                   → 
                   
                     
                       
                         
                           - 
                           b 
                         
                         ± 
                         
                           
                             
                               b 
                               2 
                             
                             - 
                             
                               4 
                               ⁢ 
                               ac 
                             
                           
                         
                       
                       
                         2 
                         ⁢ 
                         a 
                       
                     
                     → 
                     
                       d 
                       0 
                     
                   
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
           
         
       
     
     By determining the depth d 0 , a device is able to utilize the depth information for applications such as autofocusing. 
     The pillbox (r) and gaussian (σ) blur kernels have the following approximate relationship with respect to filtered energy: r˜2σ. 
     Therefore, taking a first image with pillbox blur equal to the value r 1  and convolving it with the approximate telescoping solution of [3×3 kernel] for 1 to n iterations yields a pillbox blur equal to the value r 2 . 
     Through observations, better performance occurs when the difference in blur in the first image to the second image is small. Furthermore, it is helpful for the blur quantities to be small. 
       FIG. 7  illustrates a graphical representation of an imaging device implementing the method described herein. The imaging device  700  is utilized to capture an image from a scene (not shown) as would any typical imaging device. One or more input signals  704  are acquired from the scene (not shown) and pass through the movable lens  100 . The one or more signals  704  are then received at the image sensor  102  which is coupled to a computing module  702  including, but not limited to, a processor and data storage. Within the computing module  702  are one or more programs for performing the methods described herein. The imaging device  700  includes, but is not limited to cameras, video cameras, camcorders, digital cameras, cell phones, and PDAs. 
     There are a number of devices that are able to utilize the method of receiving multiple blurred images to generate a depth map. Such a device obtains a signal of an image from a scene. The signal passes through a lens and is received by an image sensor. The lens is then moved a short distance and the signal passes through again and is received by the image sensor. With different distances between the lens and the sensor, the signals of the images arrive at the sensors with differing blur quantities. An improved method of simulating gaussian blur and an approximation equation that relates a known gaussian blur quantity to a known pillbox quantity are used in conjunction with a non-linear blur difference equation. The blur quantity difference is able to be calculated and then used to determine the depth map. With the depth information, tasks like image segmentation and object detection are better performed. Many applications are possible with the method and system described herein, including, but not limited to autofocusing, surveillance, robot/computer vision, autonomous vehicle navigation, multi-dimensional imaging and data compression. For a user of the device which implements the method described herein, the functionality is similar to that of other related technologies. For example, a person who is taking a picture with a camera which implements the method to receive multiple blurred images, uses the camera as a generic autofocusing camera. The camera generates a depth map, and then automatically focuses the lens until it establishes the proper focus for the picture, so that the user is able to take a clear picture. However, as described above, the method and system described herein have significant advantages over other autofocusing devices. 
     In operation, the method and system for receiving multiple blurred images to determine a depth map improve a device&#39;s ability to perform a number of functions such as autofocusing. As described above, when a user is utilizing a device which implements the method and system described herein, the device functions as a typical device would from the user&#39;s perspective. The improvements of being able to compute a depth map using multiple blurred images received at a sensor by moving a lens a short distance enable more accurate and improved autofocusing. An improved method of simulating gaussian blur assists in determining the depth for autofocusing. Using non-linear blur difference instead of linear provides better accuracy as well. The approximate depth map is generated by implementing a pillbox blur based imaging system using an algorithm based on a gaussian blur approximation. 
     In other embodiments, the image sensor is moved in addition to or instead of the lens to acquire pictures with different blur quantities. 
     The present invention has been described in terms of specific embodiments incorporating details to facilitate the understanding of principles of construction and operation of the invention. Such reference herein to specific embodiments and details thereof is not intended to limit the scope of the claims appended hereto. It will be readily apparent to one skilled in the art that other various modifications may be made in the embodiment chosen for illustration without departing from the spirit and scope of the invention as defined by the claims.