Vehicle attitude angle calculating device, and lane departure warning system using same

A vehicle attitude angle calculating device finds a yaw angle of a vehicle with reference to a lane stably without using information on a road vanishing point even in the state where a vehicle pitch angle varies. The vehicle attitude angle calculating device includes: a dividing line detection unit that detects a dividing line from image information received from a vehicle-mounted imaging device, the image information being a captured image of an outside of a vehicle; a distance calculation unit that calculates a distance between the dividing line and the optical axis of the vehicle-mounted imaging device every predetermined processing period; and a vehicle angle calculation unit that calculates a dividing line angle based on the calculated distance between the dividing line and the optical axis of the vehicle-mounted imaging device and a vehicle proceeding distance where the vehicle proceeds during a predetermined processing period.

TECHNICAL FIELD

The present invention relates to a method of calculating a vehicle attitude angle with reference to a lane during traveling using a vehicle-mounted camera.

BACKGROUND ART

Various techniques have been proposed to capture an image of the surrounding of a vehicle using a vehicle-mounted camera and recognize objects (such as vehicles and pedestrians) and road markings and signs (paint on a road surface such as dividing lines and signs such as stop) in the captured image. For example, if a dividing line as paint on a road can be recognized using a vehicle-mounted camera and a vehicle position in a lane can be found, then warning can be issued to a driver when the vehicle departs from the lane or a steering and a brake can be controlled to suppress the departure.

As such a system issuing warning when a vehicle departs from a lane, lane departure warning systems (LDWS) specified by JIS D 0804 of JIS (Japanese Industrial Standard) are available. In order to implement this standard using a vehicle-mounted camera configured to capture an image in the rear of a vehicle and recognize a dividing line in the captured image, information on a dividing line recognized in the rear of the vehicle has to be corrected to be that at a position of front wheels of the vehicle. To this end, a yaw angle of the vehicle with reference to a lane has to be found precisely as information to be used for the correction.

For instance, Patent Document 1 discloses a device configured to find a road vanishing point that is a point where two parallel road lines cross each other and vanish in an image captured by a vehicle-mounted camera and to calculate an attitude parameter (attitude angle (yaw angle)) of the vehicle-mounted camera on the basis of these two parallel road lines and the road vanishing point.Patent Document 1: JP Patent Publication (Kokai) No. 07-147000 A (1995)

DISCLOSURE OF THE INVENTION

Problem to be Solved by the Invention

In Patent Document 1, however, it would be difficult to find a road vanishing point if a traveling road is not linear nor flat, and even when a road vanishing point can be found, a relationship between the road vanishing point and the road parallel lines will vary with a change in vehicle pitch angle (due to a change in the number of passengers, fuel consumption or the like), and so an error will occur in the vehicle yaw angle with reference to a lane.

It is an object of the present invention to provide a vehicle attitude angle calculating device capable of finding a vehicle yaw angle with reference to a lane stably without using information on a road vanishing point even in the state where a vehicle pitch angle varies.

Means for Solving the Problem

In order to cope with the aforementioned problems, a vehicle attitude angle calculating device of the present invention includes: a dividing line detection unit that detects a dividing line from image information received from a vehicle-mounted imaging device having an optical axis, the image information being a captured image of an outside of a vehicle; a distance calculation unit that calculates a distance between the dividing line and the optical axis of the vehicle-mounted imaging device every predetermined processing period; and a vehicle angle calculation unit that calculates a dividing line angle on the basis of the calculated distance between the dividing line and the optical axis of the vehicle-mounted imaging device and a vehicle proceeding distance where the vehicle proceeds during a predetermined processing period.

Effects of the Invention

According to the present invention, a vehicle attitude angle calculating device can be provided, capable of finding a vehicle yaw angle with reference to a lane stably without using information on a road vanishing point even in the state where a vehicle pitch angle varies.

BEST MODE FOR CARRYING OUT THE INVENTION

The following describes embodiments in detail with reference to the drawings.

FIG. 1schematically illustrates a vehicle attitude angle calculating device100according to Embodiment1.

To begin with, the configuration of and the processing by the vehicle attitude angle calculating device100are described.

The vehicle attitude angle calculating device100includes a dividing line detection unit3, a distance-to-dividing line calculation unit4, a distance storage unit5, a dividing line angle calculation unit6, an angle storage unit7, an angle change rate calculation unit8, a dividing line non-detection number of times measurement unit9, a dividing line angle average unit10, a vehicle yaw angle calculation unit11, a yaw angle storage unit12and a yaw angle change rate calculation unit13, and is programmed on a computer not illustrated in the vehicle attitude angle calculating device100and is repeatedly executed with a predetermined period.

The vehicle attitude angle calculating device100is further configured to receive an image captured by an imaging device1as an input as well as a vehicle speed detected by a vehicle-speed detection unit2as an input to output a vehicle yaw angle with reference to a lane or the like externally.

The imaging device1captures an image of an outside of the vehicle using image sensor elements such as a CCD (Charge Coupled Device) image sensor or a CMOS (Complementary Metal Oxide Semiconductor) image sensor and applies digital processing to the captured image to convert it into image data that can be dealt with by a computer.

The vehicle-speed detection unit2detects a speed that the vehicle proceeds, which may be configured, for example, to detect a vehicle speed by averaging values obtained through wheel-speed sensors attached to front-and-rear and left-and-right wheels of the vehicle or to calculate a vehicle speed by integrating values of acceleration of the vehicle that are obtained by an acceleration sensor mounted on the vehicle.

The dividing line detection unit3detects a dividing line (a pair of left and right lines residing on the left and right of the vehicle, a lane edge line or the like) that is paint on a road using image data (image information) obtained by capturing an image outside the vehicle with the vehicle-mounted imaging device1.

The distance-to-dividing line calculation unit4calculates a distance (distance to dividing line) between the dividing line detected by the dividing line detection unit3and an optical axis of the imaging device1. This calculation is performed a plurality of times with a predetermined processing period.

The distance storage unit5stores a past plurality of distances to a dividing line calculated by the distance-to-dividing line calculation unit4. Typical examples of a storage medium therefore include a RAM (Random Access Memory) inside a computer.

The dividing line angle calculation unit6includes the angle storage unit7, the angle change rate calculation unit8and the dividing line non-detection number of times measurement unit9, and uses a past plurality of distances to a dividing line stored in the distance storage unit5and a detected vehicle speed (or a vehicle proceeding distance during a calculation period found from the vehicle speed) to calculate a dividing line angle.

The angle storage unit7stores a past plurality of dividing line angles calculated by the dividing line angle calculation unit6. Similarly to the distance storage unit5, typical examples of a storage medium therefore include a RAM (Random Access Memory) inside a computer.

The angle change rate calculation unit8calculates a rate of change of dividing line angles using the past plurality of dividing line angles stored in the angle storage unit7.

The dividing line non-detection number of times measurement unit9measures the number of times (non-detection counter) when the distance-to-dividing line calculation unit4continuously fails to calculate a distance to a dividing line.

When the distance-to-dividing line calculation unit4calculates a plurality of distances to a dividing line, the dividing line angle calculation unit6also calculates a plurality of dividing line angles. Therefore, the dividing line angle average unit10averages these plurality of dividing line angles. Herein, when the distance-to-dividing line calculation unit4calculates only one distance to a dividing line for one dividing line, the averaging processing by the dividing line angle average unit10is not performed and the value is directly output.

The vehicle yaw angle calculation unit11calculates a yaw angle of the vehicle with reference to the dividing line on the basis of the calculated dividing line angle. More specifically, the dividing line angle subjected to averaging by the dividing line angle average unit10is converted into a yaw angle of the vehicle with reference to a lane. The vehicle yaw angle calculation unit11further may predict a current yaw angle of the vehicle using a rate of change of the vehicle yaw angle.

The yaw angle storage unit12stores a past plurality of yaw angles of the vehicle calculated by the vehicle yaw angle calculation unit11. Similarly to the distance storage unit5and the angle storage unit7, typical examples of a storage medium therefore include a RAM (Random Access Memory) inside a computer.

The yaw angle change rate calculation unit13uses the past plurality of yaw angles of the vehicle stored in the yaw angle storage unit12to calculate a rate of change of the yaw angle of the vehicle.

Note here that the dividing line angle calculation unit6, the dividing line angle average unit10and the vehicle yaw angle calculation unit11make up a vehicle angle calculation unit, and an output from the vehicle angle calculation unit shows a yaw angle of the vehicle. Depending on conditions, however, the dividing line angle calculated by the dividing line angle calculation unit6and the yaw angle of the vehicle calculated by the vehicle yaw angle calculation unit11may be the same. In that case, the dividing line angle is directly output from the vehicle angle calculation unit as a yaw angle of the vehicle.

Next the following describes the processing by the vehicle attitude angle calculating device as a whole.

FIG. 2is a flowchart showing the processing by the vehicle attitude angle calculating device100.

Firstly, at Step201, digital processing is applied to an image captured by the imaging device1, and the resultant is imported as image data.

Then, at Step202, a dividing line that is paint on a road is detected from the image data imported at Step201by the dividing line detection unit3. Referring toFIG. 3, a method of detecting the dividing line is specifically described below.FIG. 3(a) shows image data imported at Step201where two dividing lines301and302exist. As one method to detect these dividing lines, there is a method to extract a dividing line by calculating edge strength in the image. An edge herein refers to a point where a brightness value abruptly changes in the image.FIG. 3(b) shows a result of detecting edge strength from A to B ofFIG. 3(a), where peaks303and305are points of a change from a road to a dividing line (a point where the brightness value abruptly changes from dark to bright), and peaks304and306are points of a change from a dividing line to a road (a point where the brightness value abruptly changes from bright to dark). In this way, a combination of303and304or a combination of305and306is found, whereby a dividing line can be detected.

Next at Step203, a distance from the dividing line detected at Step202to the optical axis of the imaging device1(a distance to a dividing line) is calculated by the distance-to-dividing line calculation unit4. Referring toFIG. 4, a method of calculating the distance to the dividing line is specifically described below. Similarly toFIG. 3(a),FIG. 4(a) shows image data imported at Step201, andFIG. 4(b) is a plan view viewed from the above in the same state asFIG. 4(a). In this example, two dividing lines401and402exist, and an arrow403denotes the optical axis of the imaging device1and405denotes the imaging device1. For example, as indicated by an arrow404, a distance to the dividing line402is a distance from the optical axis403to point A of the dividing line402, and the distance may be calculated by finding coordinates of point A onFIG. 4(a) using the peak of the edge strength and converting the same into the actual coordinate system ofFIG. 4(b). Instead of using coordinates inside the dividing line as a distance to the dividing line, coordinates outside the dividing line or at the center of the dividing line may be used as long as they follow the same definition consistently. A distance to a dividing line calculated may not be one for each dividing line in an image but a plurality of (e.g., 10) distances for each dividing line.

Next at Step204, the distance to the dividing line calculated at Step203, a detected vehicle speed and a vehicle proceeding distance during a calculation period are stored in a RAM inside a computer by the distance storage unit5. In this example, a past plurality of times (e.g., past10times) processing results are stored. Herein, when a plurality of distances to a dividing line are calculated at Step203, each of the plurality of distances is stored a plurality of times in the past.

Next at Step205, a dividing line angle is calculated by the dividing line angle calculation unit6using the past plurality of distances to a dividing line stored at Step5204. Referring toFIG. 5, specific processing is described below. Herein when a plurality of distances to a dividing line are calculated at Step203, a dividing line angle is calculated for each of the plurality of distances.

Firstly at Step501, determination is made as to whether, among the past plurality of distances to a dividing line stored at Step204, a latest distance to a dividing line is valid or not, i.e., whether the latest distance has been calculated or not. When the latest distance to the dividing line is valid, the procedure proceeds to Step502. On the other hand, when the latest distance to the dividing line is not valid, the procedure proceeds to Step506. Herein, a valid latest distance to a dividing line refers to the case where a distance to a dividing line has been calculated at Step203, and when a type of a dividing line is broken, such as a broken line or a dotted line, a distance to a dividing line may not be calculated.

At Step502, determination is made as to whether, among the past plurality of distances to the dividing line stored at Step S204, N points or more are valid or not among M points when they are counted from the latest value (e.g., four points or more among eight points), i.e., whether a first predetermined number of plurality of distances or more have been calculated or not. When N points or more are valid among M points (when it is determined that calculation of the predetermined number or more has been performed), the procedure proceeds to Step503, and when N points or more are not valid among M points, the procedure proceeds to Step506. Herein M and N may be determined in advance and stored in a storage device or the like.

At Step503, a dividing line angle is calculated using valid values of the distance to the dividing line determined at Step502. More specifically, as shown inFIG. 6, a regression line601is found by a least squares method using past six points counted from the latest value of the distance to a dividing line to calculate the dividing line angle. The horizontal axis of this graph represents a position (a vehicle proceeding distance during calculation period), which can be found by the vehicle speed and the calculation period.

Next at Step504, the dividing line angle calculated at Step503is stored in a RAM inside a computer by the angle storage unit7.

Next at Step505, a non-detection counter that is incremented when the calculation of a distance to a dividing line fails at Step203is reset, and at Step512, the dividing line angle φ calculated at Step503is substituted into the last value φzof the dividing line angle to complete the series of processing.

At Step506, the non-detection counter that is incremented when the calculation of a distance to a dividing line fails at Step203is incremented.

Next at Step507, determination is made as to whether the non-detection counter shows 1 or not. When the non-detection counter shows 1, the procedure proceeds to Step508, and when the non-detection counter does not show 1, the procedure proceeds to Step510.

At Step508, determination is made as to whether, among the past plurality of dividing line angles stored at Step S504, Q points or more are valid among P points when they are counted from the latest value (e.g., three points or more among six points), i.e., whether a predetermined number of plurality of dividing line angles or more have been calculated or not in the past. When Q points or more are valid among P points (when it is determined that calculation of a predetermined second number or more has been performed), the procedure proceeds to Step509, and when Q points or more are not valid among P points, the procedure proceeds to Step511. Herein P and Q may be determined in advance and stored in a storage device or the like.

At Step509, a rate of change of the dividing line angles (a value obtained by differentiation of the dividing line angle with a vehicle proceeding distance during calculation period) is calculated using valid values of the dividing line angle determined at Step508. More specifically, similarly to the method described inFIG. 6, the vertical axis is replaced with the dividing line angle, and a regression line is found by a least squares method or the like to calculate a rate of change of the dividing line angles.

At Step511, the rate of change of the dividing line angles is set at 0.

Herein a distinction between Step509and Step511is based on the number of valid values of the dividing line angle determined at Step508, and this is because the lack of a predetermined number or more (i.e., three points or more) of dividing line angles to calculate the rate of change of the dividing line angles degrades the reliability of a calculation result of the rate of change of the dividing line angles.

Next at Step510, using the rate of change of the dividing line angles calculated at Step509or Step511, a dividing line angle is predicted. More specifically, the dividing line angle φ can be calculated by Expression (1) using the last value of the dividing line angle φz, the rate of change of the dividing line angles α and the calculation period Δt.
[Expression 1]
φ=φz+α×Δt(1)

Finally at Step512, the dividing line angle φ calculated at Step510is substituted into the last value of the dividing line angle φzto complete the series of processing.

Subsequently at Step206, when a plurality of dividing line angles are calculated at Step205, these plurality of dividing line angles are averaged by the dividing line angle average unit10. As a specific method for this, (a) arithmetic average, (b) arithmetic weighted average based on distance resolution of the imaging device and (c) arithmetic weighted average based on the degree of freshness of information are available, each of which may be combined. The following describes (a) to (c) specifically.

For instance, when four dividing line angles φ1, φ2, φ3and φ4are calculated, the average value φave of the dividing line angle can be calculated by Expression (2):
[Expression 2]
φave=(φ1+φ2+φ3+φ4)÷4   (2).

(b) Arithmetic Weighted Average Based on Distance Resolution of Imaging Device

An imaging device has a character that distance resolution thereof is degraded as a position on an image becomes farther from the imaging device. For instance, when four dividing line angles φ1, φ2, φ3and φ4are calculated and when distance resolution in the horizontal direction at their calculation positions are 1 cm, 2 cm, 3 cm and 4 cm, respectively, then the average φave of the dividing line angle can be calculated by Expression (3) using their reciprocals (1, ½, ⅓, ¼) as the weight:
[Expression 3]
φave=(1×φ1+½×φ2+⅓×φ3+¼×φ4)÷(1+½+⅓+¼)   (3).

(c) Arithmetic Weighted Average Based on Degree of Freshness of Information

When the determination at Step501and Step502results in NO, the current dividing line angle is predicted using the rate of change of the dividing line angles. However, as the non-detection counter that is incremented at Step506shows a larger number, an error of the prediction will be accumulated more. That is, since a large value of the non-detection counter means decline of the freshness of information, arithmetic weighted average based on the value of the non-detection counter is effective. For instance, when four dividing line angles φ1, φ2, φ3and φ4are calculated and when their non-detection counters show the value of 0, 1, 2 and 3, respectively, the average value φave of the dividing line angles can be calculated as in Expression (4) using the values (20, 19, 18, 17) obtained by subtracting the values of the non-detection counter from a predetermined value (e.g., 20) as the weight. Herein, when the weight becomes 1 or less, it may be replaced with 1:
[Expression 4]
φave=(20×φ1+19×φ2+18×φ3+17×φ4)÷(20+19+18+17)   (4).

When (b) and (c) are combined, an average may be calculated by multiplying the respective found weights, or an arithmetic average may be calculated after finding the weights individually.

Finally at Step207, a yaw angle of the vehicle with reference to a lane is calculated by the vehicle yaw angle calculation unit11using the dividing line angle calculated at Step206to complete the series of processing. When the vehicle is travelling in a lane of a road, two dividing lines will be detected at Step202, and the angles for the two dividing lines will be calculated at Step206. Therefore, a yaw angle of the vehicle with reference to the lane is calculated using the angles for the two dividing lines. Basically the yaw angle of the vehicle can be calculated by averaging the angles for the two dividing lines. However, an average may be calculated by adding weights to the angles for the two dividing lines. When one dividing line only is detected, the angle of the dividing line may be the yaw angle of the vehicle. Since at Step205the dividing line angle is calculated using the past information, the yaw angle of the vehicle may include time delay. To cope with this, yaw angles of the vehicle may be retroactively stored by the yaw angle storage unit12and a rate of change of the yaw angle of the vehicle may be calculated by the yaw angle change rate calculation unit13using the stored past plurality of yaw angles of the vehicle, and a future value may be predicted using this rate of change of the yaw angle of the vehicle with consideration given to the time delay. This can solve the time delay due to the usage of past information.

Herein at Step202, when any dividing line cannot be detected even after the vehicle travels for a predetermined time (e.g., 5 seconds) or in a predetermined distance (e.g., 20 m), the calculation of Step203or later is stopped and a notice may be given to report that the current yaw angle of the vehicle cannot be calculated.

As described above, using a past plurality of distances to a dividing line, a yaw angle of a vehicle with reference to a lane can be calculated on the basis of a change of a relative distance, and therefore a vehicle yaw angle with reference to a lane can be found stably even in the state where a vehicle pitch angle varies. Further a plurality of distances to a dividing line are calculated and dividing line angles are calculated corresponding thereto and are averaged, whereby a vehicle yaw angle with reference to a lane can be calculated more stably.

Next, the following describes an embodiment where the output from the vehicle attitude angle calculating device according to the present invention is applied to another system.

FIG. 7schematically illustrates a lane departure warning system in the case where the output from the vehicle attitude angle calculating device100according to Embodiment1is applied to a lane departure warning device700. Herein the image-capturing direction of the imaging device1in the present embodiment is the rearward of the vehicle.

To begin with, the configuration of and the processing by the lane departure warning device700are described.

The lane departure warning device700includes a distance-to-dividing line correction unit701and a lane departure warning issuance unit702, and is programmed on a computer not illustrated in the lane departure warning device700and is repeatedly executed with a predetermined period. Herein, it is assumed that the lane departure warning in this example conforms to JIS standard (JIS D 0804). That is, the lane departure warning device700determines the necessity of issuance of warning on lane departure on the basis of the vehicle yaw angle the distance between the dividing line and the optical axis of the vehicle-mounted imaging device input from the vehicle attitude angle calculating device100.

The distance-to-dividing line correction unit701receives the vehicle yaw angle and the distance to the dividing line calculated by the vehicle attitude angle calculating device100as an input to correct the distance to the dividing line. Herein, according to JIS standard, the necessity of issuance of warning is determined on the basis of a distance between the outside of a front wheel of the vehicle and a dividing line, and therefore the distance to a dividing line detected from the image in the rear of the vehicle captured by the imaging device1has to be corrected to a distance from the outside of a front wheel of the vehicle to the dividing line. This is described more specifically with reference toFIG. 8.

FIG. 8assumes the case where a vehicle801travels on a road where two dividing lines802and803exist.

In order to correct distance d1to a left dividing line calculated by an imaging device804installed at a rear part of the vehicle into distance D1from the outside of the left front wheel of the vehicle to the left dividing line (corrected distance to dividing line), calculation may be performed by Expression (5) using distance L from the position where distance d1to the left dividing line is calculated to the vehicle front wheel, distance Cl from the imaging device804to the outside of the left front wheel of the vehicle and the vehicle yaw angle θ:
[Expression 5]
D1=d1−L×tan θ−C1   (5).

Similarly, in order to correct distance d2to a right dividing line calculated by the imaging device804installed at a rear part of the vehicle into distance D2from the outside of the right front wheel of the vehicle to the right dividing line (corrected distance to dividing line), calculation may be performed by Expression (6) using distance L from the position where distance d2to the right dividing line is calculated to the vehicle front wheel, distance C2from the imaging device804to the outside of the right front wheel of the vehicle and the vehicle yaw angle θ:
[Expression 6]
D2=d2+L×tan θ−C2   (6).

When the vehicle departs (or is about to depart) from the lane, the lane departure warning issuance unit702issues warning to a passenger using the distances D1and D2to the left and right dividing lines that are corrected by the distance-to-dividing line correction unit701. That is, when either of the distance from the outside of the vehicle front wheel to the left dividing line or the distance from the outside of the vehicle front wheel to the right dividing line is a predetermined distance or less, a flag is set to issue lane departure warning. The warning may be issued with voice from a speaker or may be displayed on a display. As a specific method, when the corrected distance to the dividing line D1or D2is within a predetermined range (e.g., within 5 cm), warning is issued. In one method, the warning may be called off after the elapse of a predetermined time (e.g., after 2 seconds) since the issuance of warning.

Referring next toFIG. 9, a series of processing by the vehicle attitude angle calculating device100and the lane departure warning device700is described, while adapting that to an actual road condition.

FIG. 9assumes the case where a vehicle900traveling at a left lane of a road with two lanes each way is about to depart to a right lane while following a path indicated with a dotted line901and then returns to the left lane again. Assume that a dividing line at a road boundary is painted as a solid line and a dividing line at a lane boundary is painted as a broken line, a distance to a dividing line on the left side of the vehicle is d1, a distance to a dividing line on the right side of the vehicle is d2, a corrected distance to the dividing line on the left side of the vehicle is D1and a corrected distance to the dividing line on the right side of the vehicle is D2. The image-capturing direction of the vehicle-mounted imaging device is the rearward of the vehicle.

Firstly the distances to dividing lines d1and d2are calculated as in a solid line911and a dotted line912, respectively. Herein, section from A to B and section from D to E are sections where the dividing line on the right side of the vehicle cannot be detected because the dividing line is a broken line, and therefore the value of the distance to the dividing line d2as the dotted line912is indefinite.

Next dividing line angles θ1(dividing line angle on the left side of the vehicle) and θ2(dividing line angle on the right side of the vehicle) are calculated as in a solid line913and a dotted line914using time-series data of the distances to dividing lines d1and d2, respectively. As for the dividing line angle θ1, since the distance to the dividing line d1can be calculated continuously, a past plurality of distances to the dividing line d1stored beforehand are used for calculation. On the other hand, as for the dividing line angle θ2, since the distance to the dividing line d2is a discontinuous value, a rate of change of the dividing line angles is calculated at a section where distances to the dividing line have been calculated continuously so as to predict a dividing line angle at a section where distances to the dividing line cannot be calculated. As a result, an error may be accumulated in the dividing line angle at the section where distances to the dividing line cannot be calculated, and values may skip at a part surrounded with915.

Next, a vehicle yaw angle is calculated as in a solid line916using the dividing line angles θ1and θ2. Herein, since the vehicle yaw angle has a sign defined so that left corning is a plus direction, the vehicle yaw angle is calculated by inverting the sign of the dividing line angle θ1and by averaging the resultant and a value of the dividing line angle θ2. Similarly to the part surrounded with915, an error may occur in the dividing line angle at a section where distances to the dividing line cannot be calculated, and therefore values may skip as in a part surrounded with917.

Next, corrected distances to the dividing lines D1and D2are calculated as in a solid line918and a dotted line919, respectively, by Expressions (5) and (6) using the distances to the dividing lines d1and d2and the vehicle yaw angle.

Next, when the corrected distance to the dividing line D1or D2is a predetermine value or less, 1 (ON) is set at a lane departure warning flag. In this example, when the corrected distance to the dividing line D2falls below the predetermined value at point C, the lane departure warning flag is turned ON and is turned OFF (set at 0) after a predetermined time. This is because the lane departure warning flag may be ON only during a time when a driver can recognize the warning (e.g., 2 seconds), and even when the corrected distance to the dividing line D2still falls below the predetermined value at the time of OFF, the flag may be turned OFF (because continuous warning will annoy the driver). A series of values of the lane departure warning flag will change as in a solid line920.

As described above, a dividing line is detected from an image obtained by capturing a rear of the vehicle to calculate a vehicle yaw angle, and a distance to the dividing line is corrected using the calculated vehicle yaw angle, thus enabling setting of a lane departure warning flag.

Note here that the present embodiment describes an imaging device capturing an image in the rear of a vehicle. However, the imaging device may capture an image in front of the vehicle, and the installation angle or the installation position of the imaging device may be different from those in the present embodiment.

Although the present embodiment uses a least squares method to calculate a dividing line angle, a method other than a least squares method may be used.

The present embodiment describes the example where a distance to a dividing line calculated by an imaging device is corrected to a distance from the outside of a front wheel of the vehicle to the dividing line. However, the distance may be corrected to a distance from any position to the dividing line such as a distance from a front corner of the vehicle to the dividing line.

As stated above, the present invention can be embodied in various forms without departing from the gist of the invention.

DESCRIPTION OF REFERENCE NUMBERS