A driving way judging device and method

Abstract: This invention relates to a device and a process for judging a contour of a road by processing data of an image taken of the road by a camera. In the data processing, Hough transform is used to obtain a plurality of straight lines approximate to the edges of the road. In order to recognize a contour of a road, it is most important to recognize the edges of the road. For the recognition of a road, for example, an image taken of the road is divided into upper and lower regions (A2,A1). In the lower region, two straight lines (g2,g1) are given approximate to the right and the left edges of the road. In the upper region as well, two straight lines (g4,g3) are given approximate to the right and the left edges of the road. Then, positional relationships between the intersection of the former two straight lines and that of the latter two straight lines are determined. Based on the positional relationships, it can be judged very easily whether the road is straight, curves, inclines or declines.

Description: This invention relates to a device and a method for judging a driving way, specifically to a driving way judging device and method which judge contours, such as straights, curves, inclines, declines, etc. by image processing. In order to computer-control a drive of an automobile, it is necessary to recognize in real time the contour of a driving way, such as a road. To this end, it is proposed for example to draw optical or magnetic judging lines on driving ways for an optical sensor or magnetic sensor provided on the automobile to sense the judging lines. But this needs drawing judging lines on driving ways, and the automatic drive control systems for such use are not universal. Then, what is proposed here is taking an image of a driving way by a television camera installed in a vehicle and computer-processing the image data so as to recognize the contour of the driving way in real time. There are various methods for processing the image data. One example of the methods uses Hough transform as described in Japanese Patent Laid-Open Publication No 24310/1987 and Japanese Patent Laid-Open Publication No. 70916/1987. But this method has the following disadvantages. The image data prepared by taking a picture of a driving way includes not only data corresponding to the edges of the driving way but also data of buildings, trees around the driving way and data corresponding to the center line. Accordingly it takes a long data processing time to process the data accurately to distinguish the contour of the driving way. In speeding up the data processing, the computer system has to be complicated and becomes expensive. But what is firstly necessary to perform the automatic drive control of a vehicle is to distinguish the macroscopic contour of a driving way. This macroscopic judgment facilitates microscopic judgment of the contour of the driving way. On the other hand, in the method described in the above-mentioned references, Hough transform is performed on respective characteristic points on an image taken by the camera to thereby give groups of straight lines corresponding to characteristics of characteristic point distributions. To be specific, the contours of white shoulder lines drawn on the edges of a driving way, the center line at the center thereof, guard rails along the driving way, and buildings along the driving way are given as characteristic points on the image. But the straight line groups include such a large number of straight lines that it is not easy to judge which straight lines correspond to the edges of the driving way. It is necessary especially to the case where this method is adapted to an automobile drive control to recognize the contour of a driving way in real time. Accordingly straight lines corresponding to the edges of the driving way have to be extracted in a very short period of time. But it has been difficult for the above-described method to perform such extraction. Although a large number of straight lines are thus obtained, they include a number of straight lines having different attributes, i.e., a number of straight lines having different positions and directions. This makes it difficult to judge a direction of continuous run of the driving way in the image, i.e., to judge the direction of continuous run of the driving way. When an image of the driving way taken by the camera is studied in terms of straight arrangements of characteristic points, the image has regions in which characteristic straight arrangements of characteristic points appear, and in which they do not clearly appear. Generally it is easy in the former region to extract an approximate straight line to an arrangement of characteristic points. In the latter region it is difficult to extract an approximate straight line. But in the above-described prior art method, basically the data in both regions are processed collectively, not separately. Consequently it has been impossible to distinguish the contour of a driving way at high speed and with ease. IEE Journal of Robotic and Automation, Vol. RA-3, No 2, April 1987, New York US, Pages 124-141, A. Waxman, J. Lemoigne et al describes a system for visual navigation by an autonomous land vehicle. The preambles to the independent claims are based on this document. Computer Vision, Graphics and Image Processing. Vol.39, No 1, July 1987, New York US, Pages 116-130; S. P. Liou & R.C. Jain and IEE Journal of Robotics and Automation. Vol. 4, No 4, August 1988, New York US, Pages 419-427; "Domain-dependent Reasoning for Visual Navigation of Roadways" describe other prior art visual navigation methods and systems. A first object of this invention is to provide a device and method for judging the macroscopic contour of a driving way at high speed and with ease. A second object of this invention is to provide a device and a method for extracting at high speed and with ease a pair of straight lines opposed to each other on the right and left edges of a driving way, based on a number of straight lines obtained by processing an image data. A third object of this invention is to provide a device and a method for accurately judging inclines, declines and curves of a driving way, based on positional relationships between a pair of straight lines corresponding to the edges of the driving way. A driving way judging device according to this invention comprises image dividing means for dividing the data into at least two regions including a lower region of the image taken of the driving way and an upper region thereof; lower straight line extracting means for extracting a first lower straight line approximate to a characteristic point distribution appearing corresponding to one of the edges of the driving way in the lower region; upper straight line extracting means for extracting a first upper straight line approximate to a characteristic point distribution appearing corresponding to one of the edges of the driving way in the upper region; and is characterized in that it further comprises: lower straight line selecting means for selecting a second lower straight line out of a group of straight lines approximate to a characteristic point distribution appearing corresponding to the other of the edges of the driving way, based on a position of the first lower straight line and preset width information of the driving way; upper straight line selecting means for selecting a second upper straight line out of a group of straight lines approximate to a characteristic point distribution appearing corresponding to the other of the edges of the driving way, based on a position of the first upper straight line and preset width information of the driving way; and judging means for judging a contour of the driving way based on a lower straight line intersection of the first and second lower straight lines, and an upper straight line intersection of the first and the second upper straight lines. In this device, an image is divided into a first and a second region so as to find straight lines in the respective regions. In the lower region on the near side is an image of substantially only a driving way. Accordingly under no influence of buildings along the driving way in extracting straight lines, the contour of the driving way can be judged accurately and easily. This device can extract straight lines corresponding to both edges of a driving way based on preset width information of the driving way. That is, a second straight line corresponding to one of the edges of the driving way can be decided in relationship with a first straight line corresponding to the other of the edges, based on the width information of the driving way. A driving way judging process for judging a contour of a driving way by processing data of an image taken of the driving way according to this invention comprises a first step of dividing the data into at least two regions including a lower region and an upper region of the image taken of the driving way; a second step of extracting a straight line approximate to characteristic point distributions appearing corresponding to one of the edges of the driving way in the lower region; a third step of extracting a straight line approximate to that of the characteristic point distribution appearing corresponding to one of the edges of the driving way in the upper region; and is characterized in that said second step comprises extracting a pair of straight lines approximate to characteristic point distributions appearing corresponding to one and the other of the edges of the driving way in the lower region; and said third step comprises extracting a pair of straight lines approximate to those of the characteristic point distributions appearing corresponding to one and the other of the edges of the driving way in the upper region; and in that the process comprises a fourth step of judging a contour of the driving way, based on a positional relationship between an intersection of the lower straight lines of the lower pair of straight lines, and an intersection of the upper straight lines of the upper pair of straight lines. Preferably, in this process a first straight line is extracted in the lower region (the first region) where a straight line corresponding to a characteristic point distribution can be easily extracted, and based on the first straight line, a second straight line is extracted in the upper region (the second region) where a straight line cannot be extracted easily corresponding to a characteristic point distribution. The first and second straight lines preferably intersect each other near a boundary between the first and the second regions. In a preferred embodiment of this process, out of a number of straight lines given by the image processing the one corresponding to one of the edges of a driving way is decided, and a straight line corresponding to the other of the edges is predicted based on relationships between a horizon and a width of the driving way (a road). Based on this prediction, a straight line corresponding to the other of the edges is extracted from the straight lines. The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus are not to be considered as limiting the present invention. Brief Description of the Drawings Fig. 1 is a functional block diagram of the device according to one embodiment of this invention; Fig. 2 is a flow chart of the general processing of the driving way judging method according to one embodiment of this invention; Figs. 3(a) and (b) are views explaining positions where a camera is mounted on an automobile; Figs. 4(a) - (c) are views explaining relationships of locations of the automobile on a driving way and images taken by the camera; Fig 5 is a view explaining the setting of a first region A1 and a second region A2 in the image; Figs. 6(a) and (b) are views explaining Hough transform used in the method and device according to the embodiment; Fig. 7 is a view explaining filtering used in the method and the device according to the embodiment; Fig. 8 is a view explaining results of the Hough transform and sorting; Fig. 9 is a flow chart explaining the steps of clustering: Fig. 10 is a view specifically explaining a result of the clustering; Fig. 11 is a flow chart of extraction and selection of straight lines in a first region A1 of an image; Fig. 12 is a flow chart of selecting a straight line; Fig. 13 is a flow chart of extraction and selecting of straight lines in a first region A2 of an image; Fig. 14 is a view explaining in an image the extraction and selection of straight lines g₁ - g₄ corresponding to the edges of a driving way; Figs. 15 (a) - (d) are views explaining judgment of contours of a driving way, such as a straight, right curve, incline and decline; Figs. 16(a) - (e) are views explaining the steps of selecting, based on a first straight line corresponding to one of the edges of a driving way, a second straight line corresponding to the other of the edges of the driving way; and Figs. 17(a) - (f) are views explaining the steps of extracting and selecting straight lines corresponding to the edges of a driving way with an image divided in a plurality of regions. As shown in Fig. 1, an analog image data of a driving way taken by a camera 1 mounted on a vehicle is converted into digital data by an A/D converter 2 to be temporarily stored in an image memory 3. Digital image data read from the image memory 3 is supplied to a pretreating unit 4. In the pretreating unit 4, on this digital image data are performed a differentiation for the edge detection, a threshold treatment based on a look-up table (LUT), a setting of regions to be treated, a transformation of coordinate system, etc. A DDA unit 5 performs the so-called digital differential analysis (DDA). Here in the DDA unit 5 Hough transform is conducted in the pipe-line system. This Hough transform gives groups of straight lines corresponding to characteristics of the image. Data of the straight line groups given by the Hough transform are supplied to a neighboring peak filtering unit 6. In the unit 6, eight-neighboring peak filtering, for example, is performed to select peak data. The selected peak data are supplied to a peak sorting unit 7 to be arranged in decreasing order of magnitude. Subsequently in a clustering unit 8 a representative value of the peak data is selected. This representative value is supplied to a straight line extracting/selecting unit 9. Data of the extracted/selected straight lines are supplied to a judging unit 10. In the judging unit 10 the contour of the driving way, such as a width, curve, incline, decline, etc., are judged. A judged output is supplied to an outside device(not shown), e.g., an automatic drive controller, while supplied to a monitor control unit 11 to be displayed by a CRT monitor 12 in a live image of the driving way and also in line components. The operations of the above-described units are controlled by a controller 13. An initial value setting unit 14 is for setting initial data of the width of a driving way, etc. The operation of the device according to the above-described embodiment will be explained below. The flow chart of Fig. 2 shows the general procedure of a processing operation. When a processing operation is started, an initial setting is performed (Step 201). In this initial setting step, a driving way width WR, an elevation angle ϑ₀, a focal length f of the lens of the camera 1, a height H c of the position of the camera 1 are set. This procedure will be explained with reference to Figs. 3 and 4. Assuming that, as shown in Fig. 3(a), a vehicle 32 is driving on a driving way 31 with the camera 1 secured to the vehicle 32, an elevation angle ϑ₀ of the camera 1, and a height H c of a position of the camera can be set as known values, based on the structure of the vehicle 1. A focal length f can be set as a known value, based on the structure of the camera 1. Fig. 3(b) is an enlarged view of the positional relationship of the optical system of Fig. 3(a). A driving way width WR is set as shown in Fig. 4. With the above-described data set, a driving way width wr at the lower end of an image can be given. That is, a driving way width wr on the image can be given by wr = (WR′·f) / {(L low + H c · tanϑ₀) cosϑ₀} A distance L low which can be covered at the lower end of the image is given L low = H c /tan(ϑ₀ + tan⁻¹(y low /f)) A driving way width WR′ for the case that the direction of the driving way is slant to the camera 1 is given based on an inclination angle ψ by WR′ = WR/sinψ. Subsequently a position of a horizon on the image is computed (Step 202 in Fig. 2). A position H₀ of the horizon can be given as shown in Fig. 3(b) by H₀ = f · tanϑ₀. Then a first region A1 and a second region A2 of the image are set (Step 204 in Fig. 2). That is, as shown in Fig. 5, the first region A1 covers the near side of the driving way 31, and the second region A2 covers the far side of the driving way 31. The first and the second regions A1, A2 are set in a ratio of 3:2 so that the upper end of the second region A2 substantially agrees with a position H₀ of the horizon. When these preparatory steps are finished, image data are inputted and the processing of the data are repeatedly executed for judgment of the driving way. That is, analog image data is converted into digital data by an A/D converter 2. This digital data is inputted through an image memory 3 in Fig. 1 to a pretreating unit 4 for required pretreatment (Step 205 in Fig. 2). In the pretreating unit 4 the digital data is edge-detected by, e.g., a Sobel. The resultant edged data is Hough transformed by a DDA unit 5 in Fig. 1. The Hough transform is conducted in the pipe-line system by a plurality of serially connected DDA circuits (not shown). The processing of the edged data is explained in, e.g., U.S. Patent No. 3069654. That is, in an image showing a distribution of edge points, a straight line passing through the edge points is imaged, and a perpendicular is drawn to this straight line from a required origin. If the length of the perpendicular is ρ, the angle of this perpendicular to the horizontal axis of the coordinate system on the image is ϑ, and the value of ϑ is varied, the straight line group is converted into a sine curve which is called Hough curve. This sine curve is drawn in the ρ-ϑ plane. This Hough curve varies depending on an edge point, and edge points aligned on the same straight line on the image have one intersection in the ρ-ϑ plane. This makes it possible to obtain the position and inclination of a straight line g approximate to an arrangement of edge points in the ρ and ϑ values by checking the overlap of the Hough curves in the ρ-ϑ plane. This will be explained below with reference to Fig. 6. It is assumed that there are three edge points EP₀, EP₁, EP₂ in x-y plane, an image plane, as shown in Fig. 6(a). Then one Hough curve (sine curve) is drawn through each edge point EP₀, EP₁, EP₂ in the x-y plane. Two Hough curves through the edge points EP₀, EP₁ intersect at coordinates (ρ₁,ϑ₁), two Hough curves through EP₀, EP₂ intersect at coordinates (ρ₂, ϑ₂). Here is assumed that fifteen edge points EP₀ - EP₁₄ are arranged as shown in Fig. 16(b). One Hough curve is drawn through each edge point in the ρ - ϑ plane. It is seen that nine Hough curves through the edge points EP ₀ - EP₈ intersect at coordinates (ρ c ,ϑ c ), the three Hough curves through the edge points EP₈ - EP₁₀ at coordinates (ρ b ,ϑ b ), and the five Hough curves EP₁₀ - EP₁₄ intersect at coordinates (ρ a ,ϑ a ). As seen from the above explanation, a straight line is given, based on the coordinate values (ρ,ϑ) of those of the intersections of the Hough curves where the intersection takes place more frequent, approximately to the arrangement of the edge points. Based on the thus obtained straight line, a characteristic arrangement of data on the image, i.e. a characteristic point distribution can be recognized. Next, the filtering in Step 210 in Fig. 2 will be explained below with reference to Fig. 7. Fig. 7 shows count values in the ρ-ϑ coordinate system, i.e., overlaps of Hough curves corresponding to respective edge points. The eight-neighboring peak filtering is conducted by comparing a count value C i,j at coordinates (ρ i ,ϑ j ) with the count values at eight coordinates neighboring the coordinates (ρ i ,ϑ j ). That is, when the count value C i,j is larger than count values C i-1,j-1 - C i+1,j+1 at coordinates (ρ i-1 ,ϑ j-1 ) - (ρ i+1 ,ϑ j+1 ), the count value C i,j is selected as peak data. Thus, in the area in Fig. 7 indicated by F1, for example, the count value 7 at coordinates (ρ₃,ϑ₃) is extracted as peak data, but in the area indicated by F2 the count value 6 at coordinates (ρ₄,ϑ₆) is not extracted as peak data. The filtering is followed by the sorting. In the sorting, peak data based on ρ,ϑ coordinate values and count values described above are rearranged in decreasing order of the count values C. The sorting is conducted by a software or by an exclusive hardware. This sorting is followed by clustering in which representative values are selected (Step 213 in Fig. 2). Fig. 8 shows an example of sorted peak data. In Fig. 8, the count values C₀, C₁, C₂, ..., C n-1 have been arranged by the sorting in the order of C₀>C₁>C₂>....>C n-1 . In the clustering, as shown by the flow chart of Fig. 9, firstly k=0, and i=1 are set (Step 501). Then the processings of Steps 502 - 515 are repeated. The clustering will be generally explained with k and i set as above. First, it is checked whether an i-th straight line with i>k has already been associated with other straight lines (Step 502). When not, it is checked whether coordinate values ρ, ϑ have the relationships ρ k - Δρ ≦ ρ i ≦ ρ k + Δρ ϑ k - Δϑ ≦ ϑ i ≦ ϑ k + Δϑ (Step 504). Only when the above-described relationships hold, the i-th straight line is recognized as associated with a k-th straight line (Step 505). Next, 1 is added to i (Step 507), and only when data is present (Step 508), it is checked whether the i-th count value C i is too small compared with a maximum count value C₀ (Step 510). This comparison is based on the fact that a too small count value does not much need the data processing. When the count value C₁ is not too small, the processing returns again to Step 502. When the count value C₁ is too small, 1 is added to k (Step 511), and another clustering processing is started in Step 513. That is, it is checked whether the k-th straight line has been already associated with other straight lines (Step 513). If it has, 1 is added to k in Step 511, and Step 513 is again executed. If the k-th straight line has not been associated with other straight lines, an i-th next to the k-th (=k+1) straight line (Step 515) is processed again by Step 502. Fig. 10 shows a result of the above-described clustering. In Fig. 10, first representative values are ρ=200 [dots], ϑ=45 [deg.] at a count value of 1000. Second representative values are ρ=240 [dots], ϑ=123 [deg.] at a count value of 780. This processing is followed by extraction of straight lines in the first region A1 of Step 214 in Fig. 2. Figs. 11 - 13 show the flow chart of the extraction of Step 214. In extracting straight lines in the first region A1, firstly a straight line corresponding to N-th representative values is taken out as a first straight line g₁ (Step 551), and it is checked whether this straight line corresponds to the edge of the driving way on the left or the right side with respect to the camera 1 (Step 552). When the straight line is on the right side, a second straight line g₂ is supposed to be on the left side, and theoretical values of the second straight line are given (Step 554). When the straight line is on the left side, the second straight line g₂ is supposed to be on the right side, and the theoretical values of the second straight line are given (Step 555). The above-described processing is repeated (Step 558) until representative values other than those corresponding to the first straight line g₁ which are approximate to the theoretical values are found (Step 557). If a first straight line is represented by g₁=(ρ₁,ϑ₁), theoretical values ρ 2r ,ϑ 2r of a straight line g 2r =(ρ 2r ,ϑ 2r ) on the right side are given by ρ 2r = H₀·sinϑ 2r ϑ 2r = tan⁻¹{[(ρ₁ / cosϑ₁) + wr ] / H₀} On the other hand, theoretical values ρ₂₁, ϑ₂₁ of a straight line g₂₁=(ρ₂₁,ϑ₂₁) on the left side are given by ρ₂₁ = H₀·sinϑ₂₁ ϑ₂₁ = tan⁻¹{[(ρ₁ / cosϑ₁) - wr] / H₀}. Here, if it is assumed that the first straight line g₁ is as shown in Fig. 14, the theoretical values are given based on the relationship between a width wr of the running way and a position H₀ of the horizon in the image. Further if it is assumed that a straight line of the representative values corresponding to the thus given theoretical values is the straight line L₂ in Fig. 14 as a result of the processing of Step 560, an operation is performed for deciding the straight line L₂ as a candidate straight line for the second straight line g₂ (Step 561). The processing of Step 561 is shown by the flow chart of Fig. 12. A group of candidate straight lines for the second straight line g₂ is formed (Step 571). The group is formed by, e.g., collecting those representative values which are in a required range, a method in which the Hough transform is conducted at smaller angles, or other methods. In any method, in addition to the straight line L₂ approximate to theoretical values, a group including the second straight line g₂ is formed (see Fig. 14). Next, numbers of edge points EP below respective candidate straight lines are counted (Step 572). A straight line having a largest number of edge points therebelow is accepted as the second straight line g₂. Thus, free from the influence of the straight lines L₂, L₂′, the real straight line g₂ can be selected. When the processing on the first region A1 as described above is over, the processing on the second region A2 is started following the steps of the flow chart of Fig. 13. First, intersections P, Q of the first and the second straight lines g₁, g₂ in the first region A1 with the upper end of the first region A1 are found (Step 581). Next, a straight line passing near the intersection P is selected as a candidate for a third straight line g₃ (Step 582). The processing of the flow chart of Fig. 12 is performed on this candidate straight line for the decision of a straight line (Step 584), which enables the real third straight line g₃ to be extracted under no influence of neighboring straight lines, e.g., the straight line L₃ in Fig. 14. Then the step of extracting a fourth straight line g₄ follows (Step 585). This step is the same as Steps 551 - 560 in Fig. 11. Finally, the processing of Fig. 12 for deciding a straight line is performed, and the fourth straight line g₄ can be extracted under no influence of, e.g., the straight line L₄ in Fig. 14. The above-described processing is followed by judging a contour of the driving way (Step 217 in Fig. 2). This judgment is made based on the relative positional relationship between the intersection R₁ of the first and the second straight lines g₁, g₂, and the intersection R₂ of the third and the fourth straight lines g₃, g₄ as shown in Fig. 15(a). That is, when the driving way is straight and flat, the coordinates of the intersections R₁, R₂ substantially agree. In contrast to this, as shown In Fig. 15(b), when the driving way curves right, the intersection R₂ appears right of the intersection R₁. When the driving way curves left, the intersection R₂ appears left of the intersection R₁. As shown in Fig. 15(c), when the driving way is an upward slope, the intersection R₂ appears above the intersection R₁. As shown in Fig 15(d), when the driving way is a downward slope, the intersection R₂ appears below the intersection R₁. Accordingly, by obtaining coordinates of the intersections R₁ and R₂, and comparing them, a contour of a driving way can be judged. Next, examples of the extraction and selection of a straight line in another embodiment will be explained below with reference to Figs. 16 and 17. It is assumed that a view taken by a camera mounted on a vehicle is as shown in Fig. 16(a). In this view, the driving way has edges 51, 51, a guard rail 52 running along the left edge, footpaths running among fields, and mountain 55 ranging on the horizon 54.The image of this view taken by the camera is differentiated to obtain edged data, and the edged data are shown in dots 56 in, e.g., Fig. 16(b). The Hough transform is conducted on the respective dots 56 and the process ings are conducted to extract line components. Then a group of straight lines including straight lines L₁ - L₅, g₁, g₂ as shown in Fig. 16(c) is given. On this result of the Hough transform the filtering, sorting and clustering are conducted, and a straight line approximate to the most characteristic arrangement of the image data (dots 56) is given in representative values. If it is assumed that a straight line g₁ corresponding to the right edge 51 of the driving way corresponds to maximum representative values, the straight line g₁ is drawn as in Fig. 16(d), and the straight line g₁ intersects the horizon position H₀ and the lower parallel line H w . The horizon position H₀ can be computed based on camera positional information, such as a position of the camera, inclinations of the camera, etc. A distance between the edges 51, 51 of the driving way at the lower parallel line H w can be computed based on the camera positional information and driving way information, such as driving way widths. It is theoretically given that the other edge 51 is either of straight lines L L and L R in Fig. 16(d). Then the representative values are checked to see whether the left straight line corresponds to the other edge 51, and a second straight line g₂ can be given as shown in Fig. 16(e). Fig. 17 shows another example of the extraction and selection of a straight line in the embodiment. It is assumed that an image taken by the camera is as shown in Fig. 17(a) for example. This image is processed in the same way as Figs. 16(a) - (c) to be expressed in dots in Fig. 17(b). By counting intersections of Hough curves, a group of straight lines including straight lines L₁ - L₅ as shown in Fig. 17(c) is found. As seen from Fig. 17 (c) the characteristics of the straight lines corresponding to the edges 51, 51 of a driving way are comparatively clear at the lower side (near side) of the image, whereas at the upper side (far side) of the image the straight lines corresponding to the edges 51, 51 of the driving way are mixed with straight lines corresponding to the other objects in the image, and it is difficult to judge characteristics of the straight lines corresponding to the edges 51, 51. Then as shown in Fig. 17(d), a first region A1 is set on the lower side (near side) of the image where the dots 56 arrange characteristically, and straight lines corresponding to the edges 51, 51 of the driving way are searched. This search may be made by checking representative values. In most cases, straight lines of maximum representative values correspond to the edges 51, 51. Here, if it is assumed that the straight lines g₁, g₁′, corresponding to the edges 51, 51 correspond to the maximum representative values and a next maximum representative values, these straight lines g₁, g₁′ can be depicted as shown in Fig. 17(d). Then a second region A2 which is adjacent to the first region A1 is set as shown in Fig. 17(e). The second region is so set that the straight lines g₁, g₁′ in the first region A1 continue. Straight lines g₂, g₂′ corresponding to the edges 51, 51 in the second region A2 are extracted. Since intersections P₁, Q₁ of the straight lines g₁, g₁′ and g₂, g₂′ are supposed to be located near the boundary between the first and the second regions A1 and A2 as shown in Fig. 17(e), straight lines g₂, g₂′ in the second region can be found out of straight lines passing near the intersections P₁, Q₁. Besides, since an intersection between the straight lines g₂, g₂′ is supposed to be near to a horizon H₀, the straight lines g₂, g₂′ can be easily extracted. Subsequently, a third region A3 is set continuous to the second region A2 as shown in Fig. 17(f) to find straight lines g₃, g₃′ corresponding to the edges 51, 51. These straight lines g₃, g₃′ can be easily obtained in the same way as the straight lines g₂, g₂′ in the second region A2. In this example, first of all, the processing is performed so as to extract approximate straight lines in a region (the first region A1) where arrangements of image data (dots) are characteristic, and then, based on the processing result, approximate straight lines are given in other regions (the second region A2, and following regions).

Claims: A driving way judging device for judging a contour of a driving way by processing data of an image taken of the driving way, the device comprising: image dividing means for dividing the data into at least two regions including a lower region (A1) of the image taken of the driving way and an upper region (A2) thereof; lower straight line extracting means (4,5,6,7,8,9) for extracting a first lower straight line approximate to a characteristic point distribution appearing corresponding to one of the edges of the driving way in the lower region; upper straight line extracting means (4,5,6,7,8,9) for extracting a first upper straight line approximate to a characteristic point distribution appearing corresponding to one of the edges of the driving way in the upper region; and characterized in that it further comprises: lower straight line selecting means for selecting a second lower straight line out of a group of straight lines approximate to a characteristic point distribution appearing corresponding to the other of the edges of the driving way, based on a position of the first lower straight line and preset width information of the driving way; upper straight line selecting means for selecting a second upper straight line out of a group of straight lines approximate to a characteristic point distribution appearing corresponding to the other of the edges of the driving way, based on a position of the first upper straight line and preset width information of the driving way; and judging means (10) for judging a contour of the driving way based on a lower straight line intersection of the first and second lower straight lines, and an upper straight line intersection of the first and the second upper straight lines. A driving way judging device according to claim 1, wherein the judging means (10) judges that the driving way curves right when the upper straight line intersection is right of the lower straight line intersection and that the driving way curves left when the upper straight line intersection is left of the lower straight line intersection. A driving way judging device according to claim 1 or 2, wherein the judging means (10) judges that the driving way declines when the upper straight line intersection is below the lower straight line intersection, and that the driving way inclines when the upper straight line intersection is above the lower straight line intersection. A driving way judging process for judging a contour of a driving way by processing data of an image taken of the driving way, the process comprising: a first step of dividing the data into at least two regions including a lower region (A1) and an upper region (A2) of the image taken of the driving way; a second step of extracting a straight line (g₁) approximate to characteristic point distributions appearing corresponding to one of the edges of the driving way in the lower region; a third step of extracting a straight line (g₂) approximate to that of the characteristic point distribution appearing corresponding to one of the edges of the driving way in the upper region; and characterized in that: said second step comprises extracting a pair of straight lines (g₁,g₂) approximate to characteristic point distributions appearing corresponding to one and the other of the edges of the driving way in the lower region; and said third step comprises extracting a pair of straight lines (g₃,g₄) approximate to those of the characteristic point distributions appearing corresponding to one and the other of the edges of the driving way in the upper region; and in that the process comprises a fourth step of judging a contour of the driving way, based on a positional relationship between an intersection of the lower straight lines of the lower pair of straight lines, and an intersection of the upper straight lines of the upper pair of straight lines. A driving way judging process according to claim 4, wherein the fourth step judges that the driving way curves right when the intersection of the upper straight lines is right of the intersection of the lower straight lines, and judges that the driving way curves left when the former is left of the latter. A driving way judging process according to claim 4 or 5, wherein the fourth step judges that the driving way declines when the intersection of the upper straight lines is below the intersection of the lower straight lines, and judges that the driving way inclines when the former is above the latter. A driving way judging process according to claim 4, 4 or 6, wherein the second and third step are characterized in that the second straight line is extracted out of two of the groups of straight lines which are spaced on the right and the left sides from a position of the first straight line on the image by a distance corresponding to the width information of the driving way. A driving way judging process as claimed in claim 4, 5, 6 or 7, the process further comprising: a step of computing a position of a horizon (Ho) on the image, based on the preset position information of the camera; and wherein said third step comprises extracting a second straight line out of those of the groups of straight lines passing near an intersection of a position of the horizon and the first straight line and spaced from the first straight line by a distance corresponding to preset width information of the driving way. A driving way judging process as claimed in claim 4, 5, 6, 7 or 8, wherein the lower region comprises a first region (A1) in which characteristic point distributions on the image appear more characteristically and the upper region comprises a second region (A2) which is adjacent to the first region in the direction of continuation of the characteristic point distributions; said process comprises a step of giving straight line groups of a plurality of straight lines corresponding to the characteristic point distributions on the image; and said third step comprises extracting a second pair of straight lines (g₃,g₄) approximate to those of the characteristic point distributions appearing corresponding to one and the other of the edges of the driving way in the second region out of those of the straight line groups passing near an intersection of a boundary of the first and the second regions and the first pair of straight lines. A driving way judging process according to claim 9, wherein the step of giving straight line groups is executed before the step of dividing the image into at least two regions. A driving way judging process according to claim 9 or 10, wherein the third step includes the step of extracting one of the first pair of straight lines (g₁, g₂) approximate to the one of the characteristic point distributions appearing corresponding to one of the edges of the driving way in the first region, and the step of selecting the other of the first pair of straight lines appearing corresponding to the other of the edges of the driving way, based on a position of the first straight line and preset width information of the driving way; and the fourth step includes the steps of extracting one of the second pair of straight lines (g₃,g₄) approximate to the one of the characteristic point distributions appearing corresponding to one of the edges of the driving way in the second region out of those of the straight line groups passing near an intersection of a boundary between the first and the second regions, and said one of the first group of straight lines, and selecting the other of the second pair of straight lines appearing corresponding to the other of the edges of the driving way, based on a position of the second straight line and preset width information of the driving way.

Inventors: HASEGAWA HIROSHI, NAKAYAMA SHIGETO, HASEGAWA, HIROSHI, NAKAYAMA, SHIGETO
Applicants: HONDA MOTOR CO LTD, HONDA GIKEN KOGYO KABUSHIKI KAISHA
Application year: 1989
Main classification: G05D1
IPC codes: G06K9, G05D1, G06T7