Information
-
Patent Application
-
20040234124
-
Publication Number
20040234124
-
Date Filed
March 12, 200420 years ago
-
Date Published
November 25, 200420 years ago
-
Inventors
-
Original Assignees
-
CPC
-
US Classifications
-
International Classifications
Abstract
The stereo calibration apparatus includes an image input device inputting an image from each of two image pickup devices, a straight-line detector detecting at least four straight lines from each of two input images, a straight-line correspondence detector detecting at least four sets of corresponding lines by using an image feature in a neighboring area of the straight line, and a transformation matrix calculator calculating a transformation matrix between two image pickup devices from the sets of corresponding lines.
Description
[0001] This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No.2003-68835 filed on Mar. 13, 2003 and Japanese Patent Application No.2003-165757 filed on Jun. 10, 2003; the entire contents of which are incorporated herein by reference.
BACKGROUND OF THE INVENTION
[0002] 1. Field of the Invention
[0003] The present invention relates to a stereo calibration apparatus for acquiring the image transformation parameters between a plurality of image pickup devices, and a stereo image monitoring apparatus using the same stereo calibration apparatus.
[0004] 2. Description of the Related Art
[0005] In an image monitor for automatically detecting a suspicious person, employing an image pickup device such as a CCD camera, and an active safety device or a vehicle guidance system for finding an obstacle on the road or recognizing the traffic lane, employing an image pickup device mounted on the vehicle, a higher detection performance can be easily attained by monitoring a common field of view, employing a plurality of image pickup devices rather than one image pickup device.
[0006] The reason is that there are virtually an infinite number of variations for the target such as an invader or obstacle, and that it is actually impossible to obtain the specifications encompassing all the variations. Hence, in the environment where there is a false detection factor such as a texture similar to the target or an unexpected image change on the road surface, it is very difficult to correctly distinguish the target based on an image pattern alone. On the other hand, if a plurality of image pickup devices can be used, information regarding the three dimensional position or structure of the object in the common field of view is obtained on the basis of a stereoscopic principle. This makes it possible to easily distinguish the target from the false detection factor.
[0007] In order to obtain the three dimensional information of the object accurately, a stereoscopic matching problem must be solved for all positions in an image, but is very difficult to solve, especially when there are complex and many environmental disturbances such as in the outdoor environment. However, in cases of using a method as described in JP-A-Hei.11-328365or JP-A-2000-293693, although precise three dimensional information on a structure of an object is not obtained, it becomes possible to correctly detect only an image area having a height with respect to a certain plane in the three dimensional space, which is used as a reference, such as the ground or road surface. Even in the outdoor environment, it becomes possible to detect presence/absence of a target and a position of the target precisely.
[0008] The principle of these methods is as follows.
[0009] Suppose now that two image pickup devices of cameras are installed to monitor a monitoring region as the common field of view. The monitoring region without invader or obstacle is assumed to be a plane within the three dimensional space such as the road surface, which is called a reference plane. If a point X on the reference plane is photographed by two cameras at the same time, where an image of X photographed by one camera has the image coordinates (x, y) and an image of X photographed by the other camera has the image coordinates (x′, y′), and the cameras have the focal length f and f′, respectively. A transformation from one camera image to the other is the projection transformation, represented by the following relation.
1
[0010] Herein, supposing that the coordinates of each image are represented as X=(x, y, f)T and X′=(x′, y′, f′)T, employing a homogeneous coordinate representation (T denotes a transposition), and H is a 3×3 matrix consisting of H11, . . . , H33 elements, the image transformation X to X′ is represented such as,
sx′=Hx (2)
[0011] where s is a non-zero constant. Since s depends on X and H has the degree of freedom 8, H is represented without losing generality as follows.
2
[0012] As far as X is on the reference plane, H can be obtained as constant irrespective of X. H is called a transformation matrix. When the transformation matrix H is known, the transformation X to X′ is calculated in accordance with the expression (2). The image feature (brightness value) near the coordinates (x, y) of one camera image and the image feature near the coordinates (x′, y′) of the other camera image are compared. If both are identical, it is judged that X is on the reference plane. On the contrary, if both the image features are different, it is judged that X is not on the reference plane, that is, some invader or obstacle having a height with respect to the reference plane exists at the position (x, y) or (x′, y′) in the image.
[0013] In this manner, if H is calculated in advance, it is possible to determine whether or not any object having a height is on the reference plane, and a high performance image monitor without falsely detecting any texture or object image on the road surface is realized.
[0014] A conventional method for calculating H will be described below.
[0015] If four or more sets of corresponding points (pixels) between two camera images {Xm=(xm, ym, f)T, X′m=(x′m, y′m, f)T}(m=1, . . . ,M) are known, H can be calculated. More specifically, for h=(H11, H12, H13, H21, H22, H23, H31, H32)T, the expression (2) is rewritten into a linear expression of h,
3
[0016] Substituting each set of corresponding points {Xm, X′m} into this expression, and solving the obtained simultaneous equations, h, that is, H can be calculated. From this, a method for calculating H not only uses the set of corresponding points but also detects the straight lines in the image and uses the line correspondences between the camera images is led as follows.
[0017] Now, suppose that together with the set of corresponding points {Xm, X′m}, a set of corresponding straight lines between camera images {anx+bny+cnf=0, a′nx′+b′ny′+c′nf′=0}(n=1, . . . ,N) are obtained. Representing the straight line with the parameters In=(an, bn, cn)T, I′n=(a′n,b′n,c′n)T, each straight line on the image is represented such that,
4
[0018] Since the expressions (5) and (2) hold at the same time, a projective transformation expression regarding the straight line
uIn=HTI′n (6)
[0019] is obtained (u is a non-zero constant). This expression (6) is expanded in the same manner as the expression (4). The simultaneous expressions of h obtained from the set of corresponding points {Xm, X′m} and the set of corresponding straight lines {In, I′n} are unified and finally represented such that,
5
[0020] Solving this expression (7), h, that is, H is calculated. If M+N is greater than or equal to four, His calculated, employing various solving methods as described in “W. H. Press et al, Numerical Recipes in C, ISBN 0-521-43108-5”.
[0021] In order to obtain the projective matrix in the above manner, it is presumed that the set of corresponding points (pixels) and the set of straight lines between the camera images are obtained in advance.
[0022] However, many conventional image monitoring apparatuses required that a operator manually calculated the set of corresponding points and the set of corresponding straight lines when installing the image monitors, whereby the operator had to make the operation carefully without mistaking the correspondence, and calculate a great number of corresponding points and corresponding straight lines to acquire the transformation matrix at high precision, which took a lot of time.
[0023] When the image monitoring apparatus is mounted with some “deviation” in a place where vibration often occurs or uses a camera mounted on a vehicle, a situation may arise that is less favorable for a user who uses the image monitoring apparatus before recalibration is made by the coordinator, for example, the image monitoring apparatus may cause a malfunction, or the operator is needed to dispatch to the installed place.
[0024] As described above, to realize a high performance image monitoring apparatus or an obstacle detecting apparatus as described in JP-A-Hei.11-328365 and JP-A-2000-293693, it is required to make beforehand a stereo calibration for acquiring the image transformation parameters between the image pickup devices.
[0025] In the conventional stereo calibration apparatus, a manual operation of designating the corresponding points by the operator is essential, and enormous manpower cost and a lot of operation time are needed. Particularly, when a number of stereo calibrations are needed to be made, or the mounting of camera is unexpectedly changed, there is a problem that the manpower cost and the operation time are further increased.
BRIEF SUMMARY OF THE INVENTION
[0026] The present invention has been achieved in the light of the above-mentioned problems. It is an object of the invention to provide a stereo calibration apparatus and a stereo image monitoring apparatus using the stereo calibration apparatus, in which a stereo calibration is automated by automatically acquiring the set of corresponding straight lines between images to calculate a transformation matrix even if there is a difference between the picked up images due to difference between the mounting positions of a plurality of image pickup devices, and image transformation parameters with high precision are acquired in a short time without intervention of the operator.
[0027] According to the embodiment of the invention, a stereo calibration apparatus obtains a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area. The stereo calibration apparatus includes an image input device to which a pair of images is input from the one pair of image pickup devices, a straight-line detector detecting at least four straight lines from each of images output from the image input device, a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines, and a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines.
[0028] According to the embodiment of the invention, a stereo calibration method obtains a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area. The method includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines, and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
[0029] According to the embodiment of the invention, a program which is executed by a computer to perform a process for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area. The process includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines, and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
[0030] According to the embodiment of the invention, a stereo image monitor for detecting an object includes a pair of image pickup devices configured to photograph images containing a common area, a straight-line detector detecting at least four straight lines from each of the images, a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines, a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines, and a monitor transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
[0031] According to the embodiment of the invention, a stereo image monitoring method monitors a common area, which photographed by a pair of image pickup devices. The stereo image monitoring method includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images using an image feature in neighboring areas of the straight lines, calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines, and transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
[0032] According to the embodiment of the invention, a program which is executed by a computer to perform a process for monitoring a common area, which photographed by a pair of image pickup devices. The process includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines, calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines, and transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
[0033] According to the embodiment of the invention, a stereo calibration apparatus obtains a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area. The stereo calibration apparatus includes an image input device to which a pair of images is input from the one pair of image pickup devices, a straight-line detector detecting at least four straight lines from each of images output from the image input device, a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines, and a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines.
[0034] According to the embodiment of the invention, a stereo calibration method obtains a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area. The method includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines, and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
[0035] According to the embodiment of the invention, a program causes a computer to perform a process for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area. The process includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines, and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
[0036] According to the embodiment of the invention, a stereo image monitor for detecting an object includes a pair of image pickup devices configured to photograph images containing a common area, an image input device to which a pair of images is input from the image pickup devices, a straight-line detector detecting at least four straight lines from each of images output from the image input device, a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines, a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines, and a monitor transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
[0037] According to the embodiment of the invention, a stereo image monitoring method monitors a common area, which photographed by a pair of image pickup devices. The method includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines, calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines, and transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
[0038] According to the embodiment of the invention, a program which is executed by a computer to perform a process for monitoring a common area, which photographed by a pair of image pickup devices. The process includes inputting a pair of images from the image pickup devices, detecting at least four straight lines from each of input images, detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines, calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines, and transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
BRIEF DESCRIPTION OF THE DRAWINGS
[0039]
FIG. 1 is a schematic block diagram of an obstacle detecting apparatus according to an embodiment of the present invention.
[0040]
FIG. 2 is a typical view showing a monitoring region and an installed state of the image pickup devices.
[0041]
FIG. 3 is a typical view showing an installed state of the image pickup devices mounted on a vehicle.
[0042]
FIG. 4 is a typical diagram showing a method for acquiring the brightness gradient in the straight-line detecting section.
[0043]
FIG. 5 is a typical view showing the edge pixels acquired in the straight-line detecting section.
[0044]
FIG. 6 is a typical view showing the straight lines acquired in the straight-line detecting section.
[0045]
FIG. 7 is a typical view showing a correspondence relation between the straight lines in the monitoring region.
[0046]
FIG. 8 is a typical view showing a method for acquiring the straight line correspondence by the image correlation in the straight-line correspondence detecting section.
[0047]
FIG. 9 is a typical view showing a method for acquiring the straight line correspondence by a dynamic programming in the straight-line correspondence detecting section.
[0048]
FIG. 10 is a typical view showing a method for acquiring the straight line correspondence by the dynamic programming in the straight-line correspondence detecting section.
[0049]
FIG. 11 is a typical view showing an instance where the straight line correspondence is not uniquely obtained from the image features.
[0050]
FIG. 12 is a typical view showing the exemplary straight lines acquired in the straight-line detecting section.
[0051]
FIG. 13 is the typical diagrams for representing the geometrical relation between the straight lines as numerical values.
[0052]
FIG. 14 is a schematic diagram showing a stereo image monitor according to the embodiment of the invention.
[0053]
FIG. 15 is a view showing an object detection processing performed by the stereo image monitor according to the embodiment of the invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
FIRST EMBODIMENT
[0054] Referring to FIGS. 1 to 9, a first embodiment of the present invention will be described below.
[0055]
FIG. 1 is a schematic block diagram of a stereo calibration apparatus according to an embodiment of the invention.
[0056] The stereo calibration apparatus of this embodiment includes an image input section 11, a straight-line detecting section 12, a straight-line correspondence detecting section 13, and a transformation matrix calculating section 14. A program stored in a computer implements functions of the sections 11 to 14.
[0057] (1) Image Input Section 11
[0058] The image input section 11 is supplied with an image from image pickup devices 101.
[0059] In this embodiment, image pickup devices 101 are two image pickup devices such as a CCD camera. For example, two image pickup devices may be installed at two upper locations in a monitoring region as shown in FIG. 2. Alternatively, in case that the two image pickup devices are mounted on a vehicle, the two image pickup devices may be mounted on left and right sides in the front part of the vehicle as shown in FIG. 3.
[0060] Herein, during the stereo calibration apparatus is operating, a plane (e.g., road surface) in the three dimensional space such as the monitoring region of FIG. 2 is photographed by both cameras and it is assumed that there is no object having a height on the plane.
[0061] Hence, it is supposed that all the straight lines detected by the straight-line detecting section 12 at a later stage are acquired from texture on the plane.
[0062] The image input section 11 serially A/D-converts a video signal output from the image pickup device 101, and accumulates a digital image or a series of images in a memory within the image input section 11. Then, an image requested for any area at any time is output to the straight-line detecting section 12 and the straight-line correspondence detecting section 13.
[0063] (2) Straight-line detecting section 12
[0064] The straight-line detecting section 12 detects the straight line in a plurality of images, which are output from the image pickup device 101 and accumulated in the image input section 11.
[0065] Herein, a method for detecting what contains pixels having large brightness gradient and arranged linearly as a straight line will be described below.
[0066] The “brightness gradient” means a degree of brightness change near the pixel. In the monitoring region of FIG. 2, the brightness gradient has a larger value in a boundary area of a structure within the image such as a boundary of a white line on the road surface (simply called an edge).
[0067] One of the methods for calculating the brightness gradient involves applying a filter such as a Sobel operator on the image.
[0068] A method for acquiring the edge pixel with the Sobel operator will be described below.
[0069] Assuming that the brightness at a position (x,y) in the image is I(x,y), and filter elements Fx(i,j) and Fy(i,j) are set up as shown in FIG. 4, values Gx and Gy of the image on which this filter is applied,
6
[0070] represent the degree of brightness change in the horizontal and vertical directions near the position (x,y), respectively. Therefore, the brightness gradient intensity G(x,y) is given such as,
7
[0071] Hence, the edge pixel is acquired by extracting only pixels in which the brightness gradient intensity is greater than a preset threshold value. FIG. 5 shows examples of edge pixels acquired from each camera image when the cameras a and b are installed as shown in FIG. 2.
[0072] Besides, there are other filters for acquiring the brightness gradient such as Laplacian, Robinson, and Canny, any of which may be employed. The known brightness gradient calculating method was described in detail in “Image Analysis Handbook, supervised by Takagi and Shimoda, Tokyo University Press, ISBN4-13-061107-0”.
[0073] After the edge image is obtained, the straight line passing through the edge pixels is detected, employing a method called a Hough transformation. The Hough transformation is known as a method for detecting the straight line in the image (see the above “Image Analysis Handbook”) . In short, when the edge pixel position (x,y) is transformed into a trigonometric function curve in the (ρ,θ) space, employing
ρ=x cos θ+y sin θ (10)
[0074] the points of intersection between a plurality of curves generated by the edge pixels correspond to the straight line, whereby the line parameters (a,b,c) are calculated from the (ρ,θ) value at the point of intersection and the expression (10) when the straight line is expressed in ax+by+c=0.
[0075] Also, a line fitting with a robust estimation of RANSAC as described in a “Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography, M. A. Fischler et al, Communications of the ACM, Vol.24, No.6, pp.253-267, 1981” is effective for detecting the straight line in the edge image. Briefly, the line fitting is made for a group of edge pixels by least square, when a plurality of edge pixels selected randomly are given as initial values. The pixels having large deviation value (distance) off the straight line are removed and the edge pixels having small deviation value are newly included. Then, the line fitting is made again in a similar manner. If the above line fitting is repeated until the maximum deviation value falls within a permissible range, the straight line passing through the edge pixels arranged thereon is detected. Even if the group of edge pixels may be discontinuous or may be continuously bent like an L-character as shown in FIG. 5, the straight line is correctly obtained as shown in FIG. 6 by using these methods.
[0076] The above straight line detecting process is performed for each image from two image pickup devices to obtain four or more straight lines for each image. Assuming that the parameter of the straight line is I=(a, b, c)T and that the image coordinate is the homogeneous coordinate representation X=(x, y, f)T (f is the focal length), the straight line is represented as ITX=0. If there are only the line parameters, it is unknown in which part of the image the edge pixels making up the straight line are present. Therefore, two end points in the group of edge pixels existing on the straight line or within the permissible range near the straight line are obtained for each straight line as indicated by round signs in FIG. 6.
[0077] (3) Straight-Line Correspondence Detecting Section 13
[0078] The straight-line correspondence detecting section 13 acquires a neighboring image area of the straight line, which the straight-line detecting section 12 detects from the image input section 11, and acquires a set of corresponding lines between two images by comparison of the image feature. The “image feature” means the physical quantity such as brightness, color or movement extracted from the image by which a distinction is permitted between the detected neighboring area of the straight line and the other area.
[0079] Herein, the “set of corresponding lines” means the set of straight lines in the images photographed by two cameras that are based on the same monitoring area. For example, the straight lines s and s′ are shown in the images of the cameras and b in FIG. 6. As shown in FIG. 7, when two straight lines are the images of the same straight line in the monitoring region, the straight lines s and s′ are the set of corresponding lines. On the other hand, the straight lines t and t′ of FIG. 6 are the images of different straight lines of FIG. 7 and not the set of corresponding lines.
[0080] (3-1) Method Using Area Matching
[0081] As a method for detecting the set of corresponding lines, area matching may be applied using the image feature near the straight line. The “area matching” means calculating a degree of coincidence between an image area, which is a comparison-source, and an image area, which a comparison-target.
[0082] The present inventors have originally created a method based on the simplest SAD (Sum of Absolute Difference), which will be described below.
[0083] Supposing that two image areas to be compared are represented as R because of being isomorphic, that a position in R is (x,y), and that the pixel brightness of the comparison source at the position is I (x,y) and that the pixel brightness of the comparison target at the position is I′(x,y),
8
[0084] is calculated. As this value is smaller, two image areas are more coincident.
[0085] When it is difficult to make the matching between the straight lines directly, the area matching may be performed for any area centered at arbitrary point on the straight line to compare the sums.
[0086]
FIG. 8 shows an example in which five rectangular areas are arranged at an equal spacing between two end points of the straight line.
[0087] Those rectangular areas are set for two different straight lines, and the matching calculation is conducted in due order to obtain ER. And if the sum ΣER is smaller, it is considered that the degree of coincidence between the straight lines is higher. Setting the straight line s in the image of camera a as the comparison source and the entire line in the image of camera b as the comparison target in FIG. 6, the above processing is performed. Then, the image pattern near the straight line has the highest similarity, whereby a line having the minimum sum ΣER, namely, that the line s′ being the most coincident to the straight line s is detected.
[0088] On the contrary, since the straight lines t and t′ that are not based on the same monitoring area have different image patterns near the straight lines, the straight lines having a low degree of coincidence, that is, having the large sum ΣER are only found. Hence, the straight lines t and t′ are excluded from the output of the straight-line correspondence detecting section 13, because the corresponding lines are not found for t, t′ by comparison with a present threshold value. This procedure is performed for all the straight lines in the image of camera a to acquire the corresponding lines in the image of camera b.
[0089] At least four sets of corresponding lines are acquired to obtain the transformation matrix H.
[0090] (3-2) Dynamic Programming
[0091] When two straight lines to be compared have different lengths (distances between the end points), or a part of one straight line is not included in the other straight line, it is often difficult to detect the corresponding lines by area matching. In such a case, the dynamic programming is effectively employed.
[0092] In “Dynamic Programming Algorithm Optimization for Spoken Word Recognition, H. Sakoe et al, IEEE Trans. on ASSP, Vol.26, No.1, pp.43-49, 1978”, an instance of applying the dynamic programming to the voice recognition was described. However, since this description involved a technique regarding the voice recognition, the present inventors have applied this dynamic programming to the image processing and originally created a technique for determining the degree of coincidence between the image features near the straight lines. In the following, the dynamic programming for the image processing will be described.
[0093] Now, it is supposed that a neighboring area is set up for the straight line, which is a comparison source, as shown in FIG. 9, that each of two areas on both sides of the straight line is equally partitioned at a regular preset width in the long side direction, and that a total of I minute sub areas are obtained from two areas, as shown to the right in FIG. 9.
[0094] The average value of pixel brightness is calculated for each of the minute sub areas, and the average values are arranged in arranged order of minute sub areas, whereby the data series A={ai} for I elements is obtained, indicating the image feature in the straight line neighboring area.
[0095] Likewise, the rectangular areas are set for the straight line, which is a comparison target, whereby the image feature data series B={bj} for J elements is obtained through the same operation.
[0096] When the lengths I of A and J of B are different, the data series A and B can not be compared by the matching operation. In the dynamic programming, i and j are represented as a function of another parameter k to avoid this drawback.
[0097] The correspondence state between the data series A and B is represented such as,
F={c
(1), c(2), . . . , c(k), . . . , c(k)} (c(k)=(i(k), j(k))) (12)
[0098] (F is called a warp function) . Herein, a data difference d(c)=|ai-bi| is defined, and assuming that a weight function for the data difference is w(k), the weighted sum of d(c) normalized by the weight sum
9
[0099] is considered as a normalized distance between the data series A and B in the warp function F. If DF(A,B) is repeatedly computed by changing w(k) in accordance with the correspondence state c(k) of data so that DF(A,B) may be smaller, the minimum value of DF(A,B) for F is searched. Consequently, the acquired minimum value
10
[0100] is regarded as indicating the distance between the data A and B. Since two straight lines are considered to be coincident when a small value of D is obtained between two straight lines, the corresponding lines between the images are detected in the same manner as the area matching process.
[0101] The method for setting the weight function w(k) depending on the correspondence state c(k) of data was described in detail in the above “Dynamic Programming Algorithm Optimization for Spoken Word Recognition”.
[0102] By the above method, the normalized distance is acquired by making all the straight lines detected in one image correspond to the straight lines detected in another image, whereby the straight line having the minimum normalized distance is stored as the corresponding line.
[0103] To obtain the transformation matrix H, at least four sets of corresponding lines are acquired.
[0104] (3-3) Other Methods
[0105] In addition, there are a variety of methods for acquiring the degree of coincidence between image areas, including SSD (Sum of Squared Difference), normalized correlation coefficient, and structure matching, any of which may be employed. Some of the well known methods were detailed in the above “Image Analysis Handbook”.
[0106] Also, the matching areas may be arbitrarily set up, such as long rectangles extending to the left and right of the straight line, as shown in FIG. 9.
[0107] (4) Transformation Matrix Calculating Section 14
[0108] The transformation matrix calculating section 14 calculates a transformation matrix H having the image transformation parameters between the image pickup devices from at least four sets of corresponding lines detected in the straight-line correspondence detecting section 13.
[0109] Suppose that the sets of corresponding lines {In=(an, bn, cn)T}, {I′n=(a′n, b′n, c′n)T} (n=1, . . . , N) are obtained from the straight-line correspondence detecting section 13. Assuming that the transformation matrix H is represented in the same manner as the expression (3), and h=(H11, H12, H13, H21, H22, H23, H31, H32)T, if only the part of the line parameters is extracted from the expression (7),
11
[0110] results. Solving this expression (15) by substituting all {In, I′n}, h, that is, H is obtained. Since the expression (15) is a general simultaneous linear equation, there are several well known solving methods as described in the above “Numerical Recipes in C”, a typical method of which will be briefly described below. Supposing that A is the 8×2N matrix on the left side of the expression (15) to operate on h and b is the 1×2N vector on the right side,
Ah=b (16)
[0111] is obtained. When A is the square matrix (N=4), an inverse matrix A−1 exists if A is non-singular. In accordance with h=A−1b (17)
[0112] h is obtained.
[0113] When A is not the square matrix (N>4), h is directly obtained from the following expression (18), if ATA is non-singular,
h
=(ATA)−1ATb (18)
[0114] When it is desired to calculate h with less error, the singular value decomposition of A, A=UWVT, is employed, where U is the 8×2N columnar orthogonal matrix, W is the 8×8 non-negative diagonal matrix (W=[diag(wk)], k=1, . . . ,8), and V is the 8×8 orthogonal matrix, and h is obtained as the least square solution such as,
h=V[
diag(1/wk)]UTb (19)
[0115] Other solving methods were detailed in the above “Numerical Recipes in C”. The expression (15) may be solved, employing any solving method, whereby h is obtained. When h has no solution or is not uniquely decided, such as when N<4 or the matrix is singular, the transformation matrix calculating section 14 outputs an indication that H is not calculated.
[0116] (5) Effects and Application Examples of Embodiments
[0117] In this manner, the stereo calibration is automated by automatically acquiring the set of corresponding lines between images and calculating the transformation matrix, greatly reducing the manpower cost and the operation time that were enormously needed with the conventional stereo calibration.
[0118] The transformation between one pair of images acquired by one pair of image pickup devices is enabled, employing the transformation matrix obtained by this stereo calibration apparatus. Accordingly, this stereo calibration apparatus is applied to the stereo image monitor for transforming one of images by using the transformation matrix to detect an obstacle.
MODIFICATION EXAMPLES
[0119] This invention is not limited to the above embodiments, but various variations or modifications may be made without departing the scope or spirit of the invention.
(1) Modification Example 1
[0120] For example, though two image pickup devices are employed in this embodiment, this embodiment may be applied to three or more image pickup devices, in which the stereo calibration is performed for all or any two of those image pickup devices. Consequently, the image transformation parameters can be acquired for any number of image pickup devices.
(2) Modification Example 2
[0121] If not only the set of corresponding lines acquired by the straight-line correspondence detecting section 13 but also the set of corresponding points are acquired at the same time, the transformation matrix calculating section 14 can calculate the transformation matrix, employing the set of corresponding lines and the set of corresponding points at the same time, in accordance with the expression (7), instead of the expression (15).
(3) Modification Example 3
[0122] Though the reference plane such as the road surface is assumed to be flat, when the reference plane is curved, it may be partially divided and approximated with flat surfaces. Thereby, this embodiment is applicable.
(4) Modification Example 4
[0123] Though in this embodiment, the area matching and the dynamic programming when the image feature is the pixel brightness or the average brightness of minute area have been exemplified. However, the image feature may be any quantity obtained from the image as below.
[0124] For example, when a color camera is used, it is possible to employ chroma and hue in the Munsell color system, the element values on the RGB plane, or the element values which are converted into any color system such as XYZ, UCS, CMY, YIQ, Ostwald, L*u*v*, or L*a*b*, as generally well known.
[0125] Also, the image feature may be resulted from a differential or integral operation on the image in space or over time.
[0126] More specifically, the image feature may be resulted by making a spatial differential operator such as Roberts, Robinson, Prewitt, Kirsch or Canny, Laplacian, Gaussian, or a moment operator, as well as Sobel, on the image, or making a noise removal process through an integral mean filter or a median filter.
[0127] Also, the image feature may be a statistical quantity obtained in the preset minute area for each pixel.
[0128] For example, in addition to the average brightness, the median, mode, range, variance, standard deviation, and mean deviation may be adopted.
[0129] Further, the image feature maybe a scalar or vector amount such as fillet diameter, area or movement amount that can be calculated from the image in the area resulted from making the object detection or segmentation in the image.
[0130] The above image features were detailed in the above “Image Analysis Handbook”.
(5) Modification Example 5
[0131] Though the straight-line detecting section 12 acquires the edge pixels using the brightness gradient, the gradient (i.e., spatial change rate) of any image feature adopted in the modification example 4 may be acquired, in addition to/in spite of the brightness.
[0132] Therefore, in the straight-line detecting section 12, the edge pixel is acquired as the pixel having a large rate of change for any image feature, or at the area boundary resulted from the segmentation process.
(6) Modification Example 6
[0133] As an object of the invention, the image transformation parameter is calculated for the image monitor, the obstacle detection for the vehicle, or an automotive safety device, but this invention is not limited to such purposes. However, this invention may be also applicable to a driving support system with image processing that is mounted on the airplane, helicopter, and industrial or home use robot, a media processing technique for producing one panorama image by splicing a number of images and other various purposes.
SECOND EMBODIMENT
[0134] Referring to FIGS. 10 to 13, a second embodiment of the invention will be described below.
[0135] A stereo calibration apparatus of the second embodiment includes the image input section 11, the straight-line detecting section 12, the straight-line correspondence detecting section 13, and the transformation matrix calculating section 14. The function of the sections 11 to 14 are implemented by a program stored in a computer.
[0136] Among them, the image input section 11, the straight-line detecting section 12 and the transformation matrix calculating section 14 have the same constitution of the first embodiment. Therefore, the straight-line correspondence detecting section 13 having a different constitution will be described below.
[0137] The straight-line correspondence detecting section 13 detects a set of corresponding lines between the images photographed by two image pickup devices among all the straight lines detected in the straight-line detecting section 12. When the image feature near the straight line is only employed, the same method of the first embodiment is usable, and will be roughly described below, though not detailed here.
[0138] The data series representing the image features near the straight line is obtained by calculating the image feature such as mean brightness for each minute area in a row of minute areas near the straight line, and arranging the image features in the order of minute areas, as shown in FIG. 10. By comparing the data series between the straight lines detected in the images photographed by two image pickup devices, it is possible to detect whether or not the straight lines have the correspondence.
[0139] Now consider an instance of finding a set of corresponding lines between the straight line s detected in an image (left image) output from a left image pickup device, and a plurality of straight lines detected in an image (right image) output from a right image pickup device, as shown in FIG. 11. When two straight lines t and t′ are detected in the right image (assuming that t″ is not detected), an image feature pattern near the straight line s is acquired in a neighboring area of FIG. 10, and similarly the image feature patterns near the straight lines t and t′ are acquired. Thereby, the straight lines s and t having the same order of light and shade have very close image feature patterns, while the straight lines s and t′ having different order of light and shade have different image feature patterns. Thereby, it will be found that the straight lines s and t are the corresponding lines in this case. However, when three straight lines t, t′ and t″ are detected, it may not be discriminated whether the straight line corresponding to s is t or t″, because the image feature patterns near t and t″ are the same. Since this situation is often seen in the scene having a repetitive pattern such as a crosswalk, an effective corresponding line detecting method is needed for the repetitive pattern.
[0140] To resolve the drawback in detecting the correspondence, a method for detecting the correspondence based on a geometrical relation with a plurality of surrounding straight lines, rather than simply comparing the information of two straight lines, is introduced.
[0141] More specifically, it is determined whether or not two straight lines to be compared correspond to each other, employing information indicating a positional relation between an intersection and surrounding straight lines (called an intersection pattern).
[0142] The principle is based on the fact that the geometrical relation between the straight lines such as the intersection pattern is preserved by the projective transformation of plane. That is, an intersection relation between lines is invariant between the left and right images, and a distance between intersections is invariant in respect of rough information such as an order of size, although the distances of the left and right images are not correctly equal due to the projective transformation. Accordingly, the information indicating the geometrical relation between the straight lines may be employed for comparison between the straight lines as the feature peculiar to the straight line.
[0143] Referring to FIGS. 12 and 13, the specific description is given.
[0144] Suppose that the straight lines in the left and right images as shown in FIG. 12 are given, and labeled with 1, . . . , 10, A, . . . , I, respectively. For example, for the straight line 1 in the left image and the straight line A in the right image, a distance between intersections is represented, as shown at the upper part in FIG. 13. Suppose now that the straight line 5 and the straight line D are the corresponding lines in some way (as will be described later) . If the distance to each intersection is plotted with taking the intersections between the straight lines 5, 1, and D, A, as references, an intersection pattern is obtained as shown on the lower left side and the lower central side in FIG. 13. This intersection pattern is quite similar, when the straight lines 5, D, which generate reference intersections, correctly correspond to each other, as shown in FIG. 13. Thereby, it can be found that detecting the straight lines 5, D as the corresponding lines is correct. On the contrary, in case that the straight lines, which generate reference intersections, incorrectly correspond to each other, for example, in case that the intersection pattern of the straight line 1 that is acquired with taking an intersection between the straight lines 1 and 7 as a reference (on the lower right side in FIG. 13), what is different from the intersection pattern of the straight line A with taking the intersection between the straight lines A and D as the reference is obtained. Hence, there is a higher error possibility in determining the straight lines 7, D as the corresponding lines than determining the straight lines 5, D as the corresponding lines. By comparison between the intersection patterns, the corresponding lines are determined correctly.
[0145] A specific method for comparing the intersection patterns, for example, in an instance as shown on the lower side in FIG. 13, if the data of the intersection patterns of the straight lines A and 1 have the same length, or can be made the same length (e.g., by ignoring d5), the numerical value indicating a data difference, such as the sum Σ|d′i-di| of absolute differences of each data, may be simply computed. Also, to compare the data of the intersection patterns having different lengths, the distance between the intersection patterns of the straight lines is acquired by making the DP matching as in the first embodiment to make the correspondence state clear.
[0146] As a method for deciding the corresponding lines, which are used as references, the image feature pattern may be employed as in the first embodiment, or any other suitable method may be employed.
[0147] Also, even if the corresponding lines are unknown in advance, the intersection patterns are compared for all the combinations, as described above, whereby it is possible to acquire the set of corresponding lines that are the most coincident, and thereby decide one-to-one the corresponding lines.
[0148] In calculating the distance between the intersection patterns by DP matching, the intersection patterns of two straight lines may be greatly different in the scale. To cope with this situation, a scale ratio of the intersection pattern (e.g., s=d1/(d1+d5) in FIG. 13) is calculated before calculating the distance, and the intersection pattern data may be normalized by this scale ratio.
[0149] Herein, there is a method for associating the straight lines with each other, employing an evaluation function having a brightness gradient direction incorporated into line parameters as described in “A tracker for broken and closely-spaced lines, N. Chiba and T. Kanade, IEICE Trans. Vol. J81-D-II, No. 8, pp. 1744-1751, 1998.”. However, information of two straight lines to be compared is only considered, and the geometrical relation with respect to a plurality of surrounding straight lines, which is taken into consideration in the embodiments of the invention, is overlooked. Thus, the correct correspondence between the straight lines in the repetitive image pattern as described above is not obtained in principle. Also, the brightness gradient direction is considered to be one direction from left to right of the straight line, or from right to left, and the image feature pattern in the neighboring area is not correctly reflected to the correspondence detection as in the first embodiment of this invention, resulting in a problem that the correct correspondence is not necessarily obtained. The embodiments of the invention provide the method for acquiring the correct correspondence between lines in any case not dealt with in the above “A tracker for broken and closely-spaced lines”.
[0150] The transformation matrix calculating section 14 calculates the transformation matrix H, which is the image transformation parameter between the image pickup devices, from the set of corresponding lines detected in the straight-line correspondence detecting section 13. Finally, H acquired by solving the expression (15) is output as a result.
[0151] Modification Example
[0152] This invention is not limited to the above embodiments, but various variations or modifications may be made without departing from the spirit or scope of the invention.
[0153] The specific modification examples may be the same as those described in the first embodiment.
THIRD EMBODIMENT
[0154] A stereo image monitor according to a third embodiment of the invention will be described with reference to FIGS. 14 and 15.
[0155] The stereo image monitor according to the third embodiment detects an object having a height with respect to a reference plane, such as an obstacle and an intruder, using the transformation matrix calculated by the stereo calibration apparatus as described above. FIG. 14 is a schematic view showing the stereo image monitor. In the figure, a portion surrounded by a dashed line perform the object detection process of the stereo image monitor and includes image pickup devices 201, an image input section 21, an image transformation section 25, and a result determination section 26. The image pickup devices 201 and the image input section 21 are same as those in the first and second embodiments. Also, cameras a and b of the image pickup devices 201 are installed to have a common field of view as shown in FIG. 2. The stereo image monitor further includes a straight-line detecting section 22, a straight-line correspondence detecting section 23, and a transformation matrix calculating section 24. Therefore, the stereo image monitor can perform the stereo calibration at any desired timing.
[0156] It is assumed that the transformation matrix H between the cameras a and b represents an image transformation from the camera a to the camera b and that such transformation matrix H has already been obtained. If image features in the neighborhood of arbitral X and X′, which satisfy the equation (2), are compared, it can be determined whether or not X or X′ is located on the reference plane. This determination will be described below in detail on the basis of a specific example.
[0157] The image transformation section 25 transforms an image viewed from the camera a into an image viewed from the camera b using the transformation matrix H obtained in advance and the equation (2). This is because the equation (2) transforms a point on the reference plane in the image of the camera a into a coordinate in the image of the camera b where the same point is displayed. With reference to FIG. 15, more detailed description will be given. FIG. 15A shows an example of the image of the camera a. FIG. 15B shows an example of the image of the camera b. In both of FIGS. 15A and 15B, a crosswalk, a person, and his shadow are shown. FIG. 15C shows an image into which the image of the camera a is transformed. All points on the load surface, which serves as the reference plane, are transformed to be same as that in the image of the camera b (FIG. 15B) . That is, the transformed crosswalk and person's shadow have the same position and the same shape as those in FIG. 15B. However, an object having a height with respect to the reference plane, that is, a portion where the person itself is shown does not satisfy the projective transformation expressed by the equation (2). Therefore, such portion is not transformed to be same as that in the image of the camera b.
[0158] The result determination section 26 compares the transformed image (FIG. 15C) of the camera a by the image transformation section 25 with the image (FIG. 15b) of the camera b to determine whether or not the object to be detected is present in the image. The determination method may simply calculate difference between the FIGS. 15B and 15C. That is, when a difference image there between is generated, we can obtain an image shown in FIG. 15D. Therefore, taking noise into consideration, the result determination section 26 determines an object is present when a difference region being larger than a predetermined area is obtained. In FIG. 15D, only a portion where an object having a height with respect to the reference plane is extracted, and the shadow and patterns on the load surface are not detected. In other words, it is found that an object detection method using the transformation matrix can detect an object having a height without obtaining a three dimensional position of the object or a structure of the object precisely. This is an advantage of the object detection method according to the embodiments of the invention. The determination may be made on the basis of the simple difference process as described above. Alternatively, the determination may be made on the basis of a similarity such as a correlation value between corresponding regions of the two images as disclosed in JP-A-11-328365. It goes without saying that the object detection determination may be made using various other methods disclosed in JP-A-11-328365 and JP-A-2000-293693, which are incorporated herein by reference in those entirety.
[0159] With this invention, since the transformation matrix is automatically calculated from the set of corresponding lines between the images, and the image transformation parameters are acquired at high precision in a short time without operation of the coordinator, the manpower cost or operation time is more greatly reduced than conventionally needed, while avoiding the inconveniences, such as a malfunction in the stereo image monitor and sending the operator when the mounting of the image pickup device is changed. Accordingly, there is the significant effect in practice.
Claims
- 1. A stereo calibration apparatus for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area, the stereo calibration apparatus comprising:
an image input device to which a pair of images is input from the one pair of image pickup devices; a straight-line detector detecting at least four straight lines from each of images output from the image input device; a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines; and a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines.
- 2. The stereo calibration apparatus according to claim 1, wherein the straight-line correspondence detector performs area matching by using the image feature in the neighboring areas of the straight lines to detect the sets of corresponding lines.
- 3. The stereo calibration apparatus according to claim 1, wherein:
the straight-line correspondence detector obtains data series regarding the image feature from the neighboring area of each straight line, obtains a normalized distance between the data series for each straight line detected from one of the images and the data series for each straight line detected from the other of the images, and obtains the sets of corresponding straight lines sets in such a manner that one straight line in the other of the images, which has the minimum normalized distance with respect to one straight line in the one of the images, is set as a corresponding line to the one straight line in the one of the images.
- 4. The stereo calibration apparatus according to claim 1, wherein the transformation matrix calculator calculates the transformation matrix in accordance with a linear expression by using the sets of corresponding lines and a projective transformation expression regarding the straight lines.
- 5. A stereo calibration method for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area, the method comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines; and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
- 6. A program which is executed by a computer to perform a process for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area, the process comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines; and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
- 7. A stereo image monitor for detecting an object, the stereo image monitor comprising:
a pair of image pickup devices configured to photograph images containing a common area; a straight-line detector detecting at least four straight lines from each of the images; a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines; a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines; and a monitor transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
- 8. A stereo image monitoring method for monitoring a common area, which photographed by a pair of image pickup devices, the method comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images using an image feature in neighboring areas of the straight lines; calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines; and transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
- 9. A program which is executed by a computer to perform a process for monitoring a common area, which photographed by a pair of image pickup devices, the process comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images by using an image feature in neighboring areas of the straight lines; calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines; and transforming one of the pair of images by using the transformation matrix to detect an object in the common area
- 10. A stereo calibration apparatus for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area, the stereo calibration apparatus comprising:
an image input device to which a pair of images is input from the one pair of image pickup devices; a straight-line detector detecting at least four straight lines from each of images output from the image input device; a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines; and a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines.
- 11. The stereo calibration apparatus according to claim 10, wherein the straight-line correspondence detector obtains the geometrical relation among the straight lines by using an intersection between one of the straight lines in each image and the others of the straight lines in each image.
- 12. The stereo calibration apparatus according to claim 10, wherein the straight-line correspondence detector uses an image feature in neighboring areas of the straight lines and the geometrical relation to obtain the sets of corresponding lines.
- 13. A stereo calibration method for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area, the method comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines; and calculating the transformation matrix between the image pickup devices by using the sets of corresponding lines.
- 14. A program causing a computer to perform a process for obtaining a transformation matrix, which is an image transformation parameter between a pair of image pickup devices for photographing a preset common area, the process comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines; and calculating the transformation matrix between the image pickup devices on by using the sets of corresponding lines.
- 15. A stereo image monitor for detecting an object, the stereo image monitor comprising:
a pair of image pickup devices configured to photograph images containing a common area; an image input device to which a pair of images is input from the image pickup devices; a straight-line detector detecting at least four straight lines from each of images output from the image input device; a straight-line correspondence detector detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines; a transformation matrix calculator calculating the transformation matrix by using the sets of corresponding lines; and a monitor performing transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
- 16. A stereo image monitoring method for monitoring a common area, which photographed by a pair of image pickup devices, the method comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; obtaining at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines; calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines; and transforming one of the pair of images by using the transformation matrix to detect an object in the common area.
- 17. A program which is executed by a computer to perform a process for monitoring a common area, which photographed by a pair of image pickup devices, the process comprising:
inputting a pair of images from the image pickup devices; detecting at least four straight lines from each of input images; detecting at least four sets of corresponding lines between the images by using a geometrical relation among the straight lines; calculating a transformation matrix between the image pickup devices by using the sets of corresponding lines; and transforming one of the pair of images by using the transformation matrix to detect an object in the common area on the basis of a stereoscopic principle.
Priority Claims (2)
Number |
Date |
Country |
Kind |
P2003-068835 |
Mar 2003 |
JP |
|
P2003-165757 |
Jun 2003 |
JP |
|