Abstract:
An image processing apparatus performs predetermined processing for images captured by a plurality of image capturing apparatuses. In the image processing apparatus, the images captured by the image capturing apparatuses are as a base image and at least one reference image. Evaluation values representing correspondence in pixels in each reference image to the pixels of the base image are computed. The images captured by the image capturing apparatuses are assigned to groups so that each group includes the base image and at least one reference image. From groups obtained by the grouping, a group having highest base-image to reference-image correspondence is selected. A distance to a point on an object by determining parallax is computed based on the evaluation values for the selected group.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    1. Field of the Invention  
           [0002]    The present invention relates to image processing apparatuses and methods, and in particular, to an image processing apparatus and method, an image capturing apparatus, and an information provision medium in which a pair of stereographic images is used to perform three-dimensional distance determination.  
           [0003]    2. Description of the Related Art  
           [0004]    Stereographic processing using a plurality of cameras is known as a method for measuring a distance to a subject. In such stereographic processing, among images of the same subject captured at a plurality of viewpoints (cameras), corresponding pixels are specified, and the distance between the corresponding pixels is used to determine the distance from the cameras to the subject based on the principles of triangulation.  
           [0005]    In order that the corresponding pixels in two stereographic images (i.e., a pair of stereographic images) may be specified, area-base matching must be performed.  
           [0006]    General stereographic processing will be described below with reference to FIGS. 1A to  1 C.  
           [0007]    Stereographic Image Processing  
           [0008]    [0008]FIGS. 1A to  1 C show general stereographic processing.  
           [0009]    Stereographic processing correlates pixels with one another among a plurality of images of the same object captured from two or more directions by cameras, and transforms parallax information between corresponding pixels into distance information from the cameras to the object; the distance to the object, its shape, or both may thereby be determined.  
           [0010]    By using two cameras A  110   1  and B  110   2  to capture the image of an object  122  as shown in FIG. 1A, an image (base image)  124   a  from camera A  110   1  including the image  220   a  of the object  122 , and an image (reference image)  124   b  from camera B  110   2  including the image  220   b  of the object  122  are obtained as shown in FIG. 1B. The images  220   a  and  220   b  of the object  122  include pixels (corresponding points k and k′) of an identical portion of the object  122 .  
           [0011]    By detecting corresponding points between the base image  124   a  and the reference image  124   b , the parallax between the corresponding points k and k′ can be found in units of pixels.  
           [0012]    Based on the obtained parallax between the corresponding points k and k′, the angles (camera angles) of the two cameras A  110   1  and B  110   2 , and the distance between the cameras, the principles of triangulation may be applied to determine the distance between each point on the object  122  and camera A  110   1  or camera B  110   2 , and the shape of the object  122  can be analyzed based on the distance to each point on the object  122 .  
           [0013]    Area-base Matching  
           [0014]    In the stereographic processing, a method employed that correlates point (pixel) k in the object image  220   a  in the base image  124   a  with the corresponding point (pixel) k′ in the object image  220   b  in the reference image  124   b  is, for example, area-base matching.  
           [0015]    In area-base matching, an epipolar line is first computed. As shown in FIG. 1B, the epipolar line is, for example, a virtual straight broken line drawn in the reference image  124   b  based on the distance between the cameras A  110   1  and B  110   2 , their angles (positional relationship), and the position of a pixel in the object image  220   a  in the reference image  124   a , and represents a range where point k′ corresponding to pixel k exists in the reference image  124   b . Next, the correlation between a square pixel block in the reference image  124   b  including n×n pixels (where, e.g., n=5), with each pixel on the epipolar line used as a central pixel, and a square pixel block in the base image  124   a  including n×n pixels, with pixel k used as a central pixel, is evaluated using a predetermined evaluation function, and the central pixel in the pixel block having the highest correlation in the reference image  124   b  is detected as point k′ corresponding to pixel k.  
           [0016]    The reason the n×n pixel block is used to detect the corresponding point is that the effects of noise are reduced, and the correlation between a feature of a pixel pattern around pixel k and a feature of a pixel pattern around corresponding point k′ in the reference image  124   b  is clarified and evaluated, and corresponding point detection can thereby be performed reliably. In particular, the larger the pixel block used for the base image  124   a  and the reference image  124   b , which differ slightly, the greater the certainty of corresponding point detection.  
           [0017]    In other words, this stereographic processing uses area-base matching to perform the steps of sequentially finding the correlations between pixel blocks in the base image  124   a  and the reference image  124   b , while changing parallax along the epipolar line in the reference image  124   b  corresponding to pixel k in the reference image  124   a ; detecting a pixel in the reference image  124   b  having the highest correlation as point k′ corresponding to pixel k; and computing the parallax between the detected corresponding points k and k′.  
           [0018]    The distance from camera A  110   1  or camera B  110   2  to each point on the object  122  can be computed based on the obtained parallax, and the positional relationship of cameras A  110   1  and B  110   2 .  
           [0019]    When the above-described processing is performed to compute the distance, if errors occur in specifying corresponding points (i.e., false correlations are generated), accurate distance cannot be computed. In particular, false correlations easily occurs when performing area-base matching for stereographic images having as a subject similar objects arranged in parallel (i.e., elements in a repeating pattern). A method for solving this problem is known in which a base camera  3  and reference cameras  4 - 1  and  4 - 2  that are aligned capture the image of a subject. An image captured by the base camera  3  is referred to as “J 0 ” (base image), and images captured by the reference cameras  4 - 1  and  4 - 2  are referred to as “J 1  and J 2 ” (reference images), respectively. A base line for the base camera  3  and the reference camera  4 - 1  is referred to as “L 1 ”, and a base line for the base camera  1  and the reference camera  4 - 2  is referred to as “L 2 ”. The base line is the interval (distance) between a pair of cameras.  
           [0020]    Next, a method for computing the distance from cameras to a subject will be described with reference to FIG. 3. For measuring distance Z from a base camera  3  to object point P, the base camera  3  and a reference camera  4  are positioned with predetermined distance L provided therebetween so that the optical axis of the base camera  3  and the optical axis are parallel. In the reference camera  4 , distance (parallax) d between point P 0  at which the optical axes on a screen cross, and point P P  at which the image object point P is formed, is determined using the above-described area-base matching. Distance Z is computed based on Z=LF/d where F represents the distance between a viewpoint in the reference camera  4  and the screen.  
           [0021]    [0021]FIGS. 4A to  4 D show correlation functions of pairs of stereographic images. The horizontal axis represents parallax d. The vertical axis represents values of correlation. The greater the values, the higher the correlation (the higher the probability of being a corresponding pixel). It is known that precision of area-base matching is increased by adding correlation functions of pairs of stereographic images.  
           [0022]    [0022]FIG. 4A shows a correlation function of a pair of stereographic images composed of base image J 0  and reference image J 1 . Base image J 0  and reference image J 1  are obtained by capturing the image of a repetitive-pattern subject. Accordingly, a maximum correlation value appears repetitively in FIG. 4A. d 1  represents a first high value of parallax.  
           [0023]    [0023]FIG. 4B shows a correlation function of a pair of stereographic images composed of base image J 0  and reference image J 2 . In addition, base image J 0  and reference image J 2  are obtained by capturing the image of a repetitive-pattern subject. Accordingly, a maximum correlation value appears repetitively in FIG. 4B. d 2  represents a first high value of parallax.  
           [0024]    In the functions shown in FIGS. 4A and 4B, as well as in the sum of these functions, a maximum value of correlation appears repetitively.  
           [0025]    Here, as shown in FIG. 4C, in order to set d 1  in FIG. 4A and d 2  in FIG. 4B at the same position, the horizontal axis (parallax) in FIG. 4B is multiplied by d 1 /d 2 . Since base line L and parallax d have a relationship of L 1 :L 2 =d 1 :d 2 , parallax d may be multiplied by L 1 /L 2 .  
           [0026]    A function obtained by adding the functions shown in FIGS. 4A and 4B as described above is shown in FIG. 4D. As shown in FIG. 4D, a maximum value of correlation appears at only parallax d 1 . Thus, correct parallax d can be found. In other words, by performing area-base matching with two or more pairs of stereographic images having different base lines B, correct parallax can be found for a repetitive-pattern subject.  
           [0027]    Concerning the arrangement of cameras, in addition to the one described above, reference cameras  4 - 1  to  4 - 4  may be arranged at regular intervals in four directions from base camera  3  as shown in FIG. 5.  
           [0028]    The camera-aligned arrangement shown in FIG. 2 is useful in area-base matching for a subject having a repeating pattern parallel to the camera row. However, it causes a maximum value of correlation to appear repetitively in the correlation function for subjects having vertical and horizontal repeating patterns as shown in FIGS. 6A and 6B. As a result, false correlations may be disadvantageously generated, which would preclude finding the correct parallax.  
           [0029]    The camera arrangement shown in FIG. 5 may also cause a problem in that correct parallax for a subject having a repeating pattern cannot be found because the distances from the base camera  3  to the reference cameras  4 - 1  to  4 - 4  are equal (one base line).  
         SUMMARY OF THE INVENTION  
         [0030]    Accordingly, the present invention has been made in view of the foregoing circumstances, and an object thereof is to provide an image processing apparatus and method, an image capturing apparatus, and an information provision medium in which pairs of stereographic images captured on two or more base lines are used, whereby error in measurement for a subject having a repeating pattern is reduced.  
           [0031]    To this end, according to an aspect of the present invention, the foregoing object has been achieved through the provision of an image processing apparatus for performing predetermined processing for images captured by a plurality of image capturing apparatuses, comprising: input means for inputting as a base image and at least one reference image the images captured by the image capturing apparatuses; evaluation means for computing evaluation values representing correspondences in pixels in each reference image to the pixels of the base image; selecting means for assigning the images captured by the plurality of image capturing apparatuses to groups so that each group includes the base image and at least one reference image, and selecting from among the groups a group having highest base-image to reference-image correspondence; and distance computation means for computing based on the evaluation values for the group selected by the selecting means a distance to a point on an object by determining parallax.  
           [0032]    According to another aspect of the present invention, the foregoing object has been achieved through the provision of an image processing method for performing predetermined processing for images captured by a plurality of image capturing apparatuses, comprising the steps of: inputting as a base image and at least one reference image the images captured by the plurality of image capturing apparatuses; computing evaluation values representing correspondences in pixels in each reference image to the pixels of the base image; assigning the images captured by the plurality of image capturing apparatuses to groups so that each group includes the base image and at least one reference image; selecting from among the groups a group having highest base-image to reference-image correspondence; and computing based on the evaluation values for the selected group a distance to a point on an object by determining parallax.  
           [0033]    According to a further aspect of the present invention, the foregoing object has been achieved through the provision of an information provision medium for providing control commands for performing predetermined image processing to images captured by a plurality of image capturing apparatuses, the control commands comprising the steps of: inputting as a base image and at least one reference image the images captured by the plurality of image capturing apparatuses; computing evaluation values representing correspondences in pixels in each reference image to the pixels of the base image; assigning the images captured by the plurality of image capturing apparatuses to groups so that each group includes the base image and at least one reference image; selecting from among the groups a group having highest base-image to reference-image correspondence; and computing based on the evaluation values for the selected group a distance to a point on an object by determining parallax.  
           [0034]    According to a still further aspect of the present invention, the foregoing object has been achieved through the provision of an image processing apparatus for performing predetermined processing for images captured by a plurality of image capturing apparatuses, comprising: input means for inputting the images captured by the plurality of apparatuses; and distance computing means for determining parallax based on the images input by the input means, and computing a distance to a point on an object, wherein around a first image-capturing apparatus among the plurality of image capturing apparatuses, the image capturing apparatuses excluding the first image-capturing apparatus are positioned, and among the plurality of image capturing apparatuses, second and third image-capturing apparatuses used as processing units in the parallax determination are positioned in different directions with respect to the first image-capturing apparatus so as to have different distances with respect to the first image-capturing apparatus.  
           [0035]    According to an even further aspect of the present invention, the foregoing object has been achieved through the provision of an image-capturing system composed of a plurality of image capturing apparatuses including a base image-capturing apparatus and a plurality of reference image-capturing apparatuses positioned around the base image-capturing apparatus, wherein among the reference image-capturing apparatuses, first and second reference image-capturing apparatuses are positioned at different angles with respect to the base image-capturing apparatus, and are positioned having different distances with respect to the base image-capturing apparatus.  
           [0036]    According to the present invention, error in measurement for a subject having a horizontal and vertical repeating pattern can be reduced. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0037]    [0037]FIGS. 1A to  1 C are views showing stereographic image processing.  
         [0038]    [0038]FIG. 2 is a view showing a conventional arrangement of a base camera  3  and reference cameras  4 - 1  and  4 - 2 .  
         [0039]    [0039]FIG. 3 is a drawing illustrating a method for computing distance Z between a base camera  3  and object point P.  
         [0040]    [0040]FIGS. 4A to  4   d  are graphs showing pixel correlation.  
         [0041]    [0041]FIG. 5 is a view showing another conventional arrangement of a base camera  3  and reference cameras  4 - 1  and  4 - 2 .  
         [0042]    [0042]FIGS. 6A and 6B are drawings showing subjects having repeating patterns.  
         [0043]    [0043]FIG. 7 is a block diagram showing an image processing system to which the present invention is applied.  
         [0044]    [0044]FIG. 8 is a flowchart illustrating the operation of the image processing system shown in FIG. 7.  
         [0045]    [0045]FIG. 9 is a view showing an arrangement of a base camera  3  and reference cameras  4 - 1  to  4 - 4 .  
         [0046]    [0046]FIGS. 10A to  10 D are views showing the grouping of a base camera  3  and reference cameras  4 - 1  to  4 - 4 .  
         [0047]    [0047]FIG. 11 is a view showing another arrangement of a base camera  3  and reference cameras  4 - 1  to  4 - 4 . 
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT  
       [0048]    An image processing system to which the present invention is applied will be described with reference to FIG. 7. The image processing system includes an image processing circuit (workstation)  1 , a cathode-ray-tube (CRT) monitor  2 , a base camera  3 , reference cameras  4 - 1  to  4 - 4  (hereinafter referred to as “cameras  4 ” in the case where the reference cameras  4 - 1  to  4 - 4  do not need to be distinguished), and a hard disk drive (HDD)  5 . In this specification, the word “system” means a combination of apparatuses and means.  
         [0049]    The image processing circuit  1  includes a central processing unit (CPU)  21 , a read-only memory (ROM)  22 , a random access memory (RAM)  23 , and an interface (I/F)  24 . The image processing circuit  1  performs predetermined processing for an image signal input from the base camera  3  and the reference cameras  4 .  
         [0050]    The CPU  21  controls the units of the image processing circuit  1 , and can carry out predetermined operations in accordance with programs. Programs to be executed are stored in the ROM  22  and the RAM  23 . The interface  24  performs appropriate data format transformation in the case where data are sent and received between the image processing circuit  1  and external units (the base camera  3 , etc.).  
         [0051]    The CRT monitor  2  displays an image output from the image processing circuit  1 . The base camera  3  and the reference cameras  4  can convert the optical image of a subject into the corresponding electric signal (image signal) before outputting it.  
         [0052]    The image signal output from the base camera  3  and the reference cameras  4  and various programs are recorded to or reproduced from the HDD  5 . In the HDD  5 , a program for performing the following processing is stored.  
         [0053]    Next, a process performed by the image processing system will be described with reference to the flowchart shown in FIG. 8. An image signal output by the base camera  3  is referred to as “G 0 ”, and image signals output by the reference cameras  4 - 1 ,  4 - 2 ,  4 - 3 , and  4 - 4 , are referred to as “G 1 , G 2 , G 3 , and G 4 ”, respectively.  
         [0054]    In step S 1 , the base camera  3  and the reference cameras  4 - 1  to  4 - 4  convert optical signals based on a subject into image signals, and output them to the image processing circuit  1 . The image processing circuit  1  outputs the input image signals G 0  to G 4  to the HDD  5 . The HDD  5  holds the input image signals G 0  to G 4 .  
         [0055]    In step S 2 , the image processing circuit  1  groups image signals G 0  to G 4  into two pairs of stereographic images.  
         [0056]    The details of the grouping into pairs of stereographic images in step S 2  will be described with reference to FIGS.  9 , and  10 A to  10 D. FIG. 9 shows an arrangement of five cameras: the base camera  3 , and the reference cameras  4 - 1  to  4 - 4 . The base camera  3  is positioned in the center. The reference camera  4 - 1  is positioned having distance L 3  in the upper left direction from the base camera  3 . The reference camera  4 - 2  is positioned having distance L 4  in the upper right direction from the base camera  3 . The reference camera  4 - 3  is positioned having distance L 3  in the lower right direction from the base camera  3 . The reference camera  4 - 4  is positioned having distance L 4  in the lower left direction from the base camera  3 .  
         [0057]    Using the five cameras, sets each composed of three cameras are formed. For eliminating effects of occlusion (meaning that an object point that is viewed by one camera of a set cannot be viewed by the other cameras)(See Transactions of the Institute of Electronics, Information and Communication Engineers, D-2, Vol. J80-D-2, No. 6, pp. 1432-1440, June 1997), one base camera  3  must be included in three cameras constituting one set. Four sets of three cameras are shown in FIGS. 10A to  10 D.  
         [0058]    For example, the set shown in FIG. 10A consists of a base camera  3 , reference cameras  4 - 1  and  4 - 4 . In the set shown in FIG. 10A, image signal G 0  output by the reference camera  3  and image signal G 1  output by the reference camera  4 - 1  are combined to form a first pair of stereographic images, and image signal G 0  output by the base camera  3  and image signal G 4  output by the reference camera  4 - 4  are combined to form a second pair of stereographic images.  
         [0059]    In step S 3 , evaluation value SAD representing correlation between the pairs of stereographic images is computed using the following equation:  
         SAD        (     x   ,     y                 ζ     ,   ξ     )       =       ∑     i   ,     j   ∈   w              |       f        (       x   +   i     ,     y   +   j       )       -     g        (       x   +   i   +       R   k        ζ       ,     y   +   j   +       R   k        ξ         )         |                             
 
         [0060]    where W represents an area-base matching region, x and y represent the x and y coordinates of object point P on image signal G 0  captured by the base camera  3 , f(X,Y) represents the brightness level of GO output from the base camera  3 , g(X,Y) represents the brightness level of an image signal other than image signal G 0  in the stereographic-image pair, ζ and ξ represent parallax in the x and y directions, L n  represents the longest base line in all pairs of stereographic images, L k  represents the base line of the pair of stereographic images which is being referred to, and R k  represents a base-line ratio of R k =L k /L n .  
         [0061]    For example, in the set shown in FIG. 10A, based on two pairs of stereographic images having different base lines (one stereographic-image pair composed of image signals G 0  and G 1 , and one stereographic-image pair composed of image signals G 0  and G 4 ), two SADs are computed. This also applies to the sets shown in FIGS. 10B to  10 D.  
         [0062]    In step S 4 , the image processing circuit  1  computes SSAD, namely, the sum of SADs corresponding to the pairs of stereographic images computed in step S 3 , using the following equation:  
         SSAD        (     x   ,     y                 ζ     ,   ξ     )       =         ∑     k   =   1       n          (       ∑     i   ,     j   ∈   w              |       f        (       x   +   i     ,     y   +   j       )       -     g        (       x   +   i   +       R   k        ζ       ,     y   +   1   +       R   k        ξ         )         |       )                             
 
         [0063]    It is known that the higher the correlation, the smaller the value of SSAD. (See Transactions of the Institute of Electronics, Information and Communication Engineers, D-2, Vol. J75-D-2, No. 8, pp. 1317-1327, August 1992)  
         [0064]    In the case of the set shown in FIG. 10A, by adding two SADs computed based on the pair of stereographic images composed of image signals G 0  and G 1 , and the pair of stereographic images composed of G 0  and G 4 , an SSAD is obtained. This also applies to the sets shown in FIGS. 10B to  10 D.  
         [0065]    In step S 5 , four SSADs computed from the respective sets are compared, and the distance between the base camera  3  and object point P is computed using as correct parallax the parallax ζ and ξ corresponding to the least SSAD.  
         [0066]    Next, an arrangement of the five cameras will be described with reference to FIG. 11. As shown in FIG. 11, reference cameras  4 - 1  to  4 - 4  are positioned having different distances from a base camera  3 . The base camera  3  is positioned in the center. The reference camera  4 - 1  is positioned having distance L 5  in the upper left direction from the base camera  3 . The reference camera  4 - 2  is positioned having distance L 6  in the upper right direction from the base camera  3 . The reference camera  4 - 3  is positioned having distance L 7  in the lower left direction from the base camera  3 . The reference camera  4 - 4  is positioned having distance L 8  in the lower left direction from the base camera  3 .  
         [0067]    In this arrangement, by combining image signal G 0  output from the base camera  3 , and image signals G 1  to G 4  output from the reference cameras  4 - 1  to  4 - 4 , four pairs of stereographic images are formed, and four SADs are computed. the sum of the four SADs is found as an SSAD, and the distance between the base camera  3  and object point P is computed using as correct parallax the parallax ζ and ξ corresponding to the least SSAD.  
         [0068]    Although the above-described embodiment uses one base camera and four reference cameras, three, or five or more reference cameras may be used.  
         [0069]    Although the above-described embodiment finds an evaluation values based on SAD values, the sum of other values representing correlation may be used as evaluation values. By way of example, by using the following sum-of-squared difference (SSD) function:  
         SSD        (     x   ,   y   ,   η   ,   ξ     )       =       ∑     i   ,     j   ∈   w                {       I        (       x   +   i     ,     y   +   j       )       -     J        (       x   +   i   +       R   k        η       ,     y   +   j   +       R   k        ξ         )         }     2                             
 
         [0070]    the following sum-of-SSDs (SSSD):  
         SSSD        (     x   ,   y   ,   η   ,   ξ     )       =         ∑     k   =   1       n          (       ∑     i   ,     j   ∈   w                {       I        (       x   +   i     ,     y   +   j       )       -     J        (       x   +   i   +       R   k        η       ,     y   +   j   +       R   k        ξ         )         }     2       )                             
 
         [0071]    is used as an evaluation value.  
         [0072]    In the above-described embodiment, a program for executing image processing according to the present invention is supplied from the HDD  5 . However, the program may be supplied using the interface  24  connecting to another information processing apparatus via a transmission medium such as a network.