Abstract:
The present invention provides a vehicle traveling state determining apparatus including a camera which picks up an image of a road surface in a direction in which a vehicle is traveling, and zigzag state detecting section for determining a zigzag amount on the basis of the road surface image picked up using the camera, wherein the zigzag state detecting section is comprised of speed vector calculating section for calculating a speed vector of the road surface image by comparing a last road surface image picked up using the camera with a current road surface image picked up using the camera, and determining section for determining whether or not the vehicle is traveling in a zigzag line on the basis of the speed vector of the road surface image calculated by the speed vector detecting section.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]     This application is based upon and claims the benefit of priority from prior Japanese Patent Application No. 2004-071331, filed Mar. 12, 2004, 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 vehicle traveling state determining apparatus that can determine whether or not, for example, a driver&#39;s awoken state is impeded during driving, so that the driver is falling asleep at the wheel.  
         [0004]     2. Description of the Related Art  
         [0005]     In recent years, with the development of a road network and an increase in leisure hours, there have been an increasing number of opportunities for driving a car. The driver is desired to be always physically and mentally stable during driving. However, the driver may drive a car while conscious of his or her bad physical condition. In this case, during long continuous driving, the driver&#39;s fatigue keeps piling up and his or her concentration lowers. Consequently, the driver&#39;s awoken state may be impeded and the driver may become sleepy.  
         [0006]     To prevent this, a vehicle is provided with a camera that picks up a frontal image that allows white lines on roads to be recognized to determine whether or not the vehicle is traveling in a zigzag line. This system thus determines whether or not the driver is falling asleep at the wheel. If the result of the determination is affirmative, the system gives a warning (for example, Japanese Patent No. 3039327).  
         [0007]     In this document, the apparatus picks up images of traveling zone partitioning lines and on the basis of the images, determines whether or not the vehicle is traveling in a zigzag line. However, there is another method of recognizing white lines on the opposite sides of a road to determine whether or not the vehicle is traveling in a zigzag line. However, with this method, it is impossible to determine whether or not the vehicle is traveling in a zigzag line if the entire road surface is covered with snow or if even without snow, there are no white lines on the opposite sides of the road.  
       BRIEF SUMMARY OF THE INVENTION  
       [0008]     It is an object of the present invention to provide a vehicle traveling state determining apparatus that can determine whether or not a vehicle is traveling in a zigzag line, even without any white lines.  
         [0009]     According to one aspect of the present invention, there is provided a vehicle traveling state determining apparatus comprising a camera which picks up an image of a road surface in a direction in which a vehicle is traveling; and zigzag state detecting section for determining a zigzag amount on the basis of the road surface image picked up using the camera, 
        wherein the zigzag state detecting section is comprised of:     speed vector calculating section for calculating a speed vector of the road surface image by comparing a last road surface image picked up using the camera with a current road surface image picked up using the camera; and     determining section configured to determine whether or not the vehicle is traveling in a zigzag line on the basis of the speed vector of the road surface image calculated by the speed vector detecting section.        
 
         [0013]     Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter. 
     
    
     BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING  
       [0014]     The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention, and together with the general description given above and the detailed description of the embodiments given below, serve to explain the principles of the invention.  
         [0015]      FIG. 1  is a block diagram illustrating a vehicle traveling state determining apparatus according to an embodiment of the present invention;  
         [0016]      FIG. 2  is a diagram showing where a camera is mounted in the vehicle traveling state determining apparatus according to the embodiment;  
         [0017]      FIG. 3  is a part of a flowchart illustrating operations of the embodiment;  
         [0018]      FIG. 4  is a part of a flowchart illustrating operations of the embodiment;  
         [0019]      FIG. 5  is a diagram showing an image of the front of a vehicle picked up using the camera mounted in the vehicle;  
         [0020]      FIG. 6  is a diagram showing a gray value of an edge according to the embodiment;  
         [0021]      FIGS. 7A  to  7 C are diagrams illustrating a process for extracting an optical flow image according to the embodiment;  
         [0022]      FIGS. 8A  to  8 C are diagrams illustrating a manner of extracting a differential optical flow image according to the embodiment;  
         [0023]      FIG. 9  is a diagram illustrating how to calculate a null according to the present embodiment;  
         [0024]      FIG. 10  is a diagram illustrating an angle of yaw according to the present invention;  
         [0025]      FIG. 11  is a diagram illustrating the angle of yaw according to the present invention;  
         [0026]      FIG. 12  is a diagram showing a horizontal component of a differential optical flow image according to the embodiment;  
         [0027]      FIG. 13  is a diagram showing a vertical component of the differential optical flow image according to the embodiment;  
         [0028]      FIG. 14  is a diagram showing a length distribution of the differential optical flow image according to the embodiment; and  
         [0029]      FIG. 15  is a diagram showing a length distribution of the differential optical flow image for perfectly rectilinear traveling of a vehicle according to the embodiment. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0030]     An embodiment of the present invention will be described with reference to the drawings.  FIG. 1  is a block diagram showing a vehicle traveling state determining apparatus. In the figure, reference numeral  11  denotes a CCD camera. An image of a road surface in front of a vehicle is picked up using the camera. The image is then input to an image processing device  12 . The image processing apparatus  12  has an image processing section  12   a  that processes the image picked up using the camera  11  and an image data storing section  12   b  that stores image data processed by the image processing section  12   a.    
         [0031]     The image processing device  12  is connected to the control section  13 . The control section  13  is mainly composed of a microprocessor and includes zigzag rate determining means  14 .  
         [0032]     The camera  11  is mounted, for example, at the top of the center of a cabin of the vehicle as shown in  FIG. 2 . The camera  11  picks up a road surface  1  in front of the vehicle in its traveling direction.  FIG. 5  shows an image.  
         [0033]     With reference to the flowchart in  FIG. 3 , description will be given of operations of an embodiment of the present invention configured as described above.  
         [0000]     (Step S 1 )  
         [0034]     First, a road surface image picked up using the camera  11  is input to the image processing device  12 . The road surface image is processed and then stored in the image data storing section  12   b . Then, the process shifts to step S 2 . In step S 1 , specifically, the storing process in the image data processing section  12   b  is executed as follows. It is assumed that no white lines are present on the opposite sides of a road surface having a crack  2  as shown in  FIG. 5 . First, a road surface image loaded by the camera  11  is recognized on a CCD. The CCD has a size of 512×512 pixels according to the present embodiment. The horizontal direction of the CCD is defined as an x axis direction. The vertical direction of the CCD is defined as a y direction. Then, calculation is made of a gray value on each group of pixels arranged in the x axis direction (horizontal pixel group). This calculation is executed on each of the horizontal pixel groups arranged in the y axis direction. The gray value is “0” for white and “255” for black. For intermediate colors, the gray value is determined depending on their densities. For example, the crack  2  is more blackish than the rest of the road surface. Accordingly, the crack  2  has a larger gray value than the rest of the road surface.  
         [0035]     Then, an edge in the x axis direction is calculated from the gray value obtained. The edge is defined as a differential value of the calculated gray value. The edge is detected at a location where the color tone has changed.  
         [0036]     Then, calculation is made of the absolute value (gray value level) of the gray value for the location where an edge has occurred. The absolute value obtained is stored in a predetermined memory for each control period. In this manner, a picked-up image is subjected to the edge process, and the processed image is stored in the image data storing section.  
         [0000]     (Step S 2 )  
         [0037]     If the n-th image is to be processed, the edge of the n-th processed image is compared with the edge of the n-1-th processed image. An optical flow method is then used to calculate an optical flow in connection with each edge. The process then shifts to step S 3  (see c in  FIG. 7C ). Here, a in  FIG. 7A  denotes the n-th picked-up image, and b in  FIG. 7B  denotes the n-1-th picked-up image.  
         [0038]     In this case, the optical flow of an image is can be generally described as follows. It is assumed that an image of a point (x, y) on an object within a road surface image at a time t has a gray value I (x, y, t) and that the density value of a certain point does not value in spite of movement of the object. Then, the following equation is given. 
 
 dI/dt= 0  (1) 
 
         [0039]     The Tayler expansion is used to transform Equation (1) into Equation (2).  
                     ∂   I       ∂   x       ⁢       ⅆ   x       ⅆ   t         +         ∂   I       ∂   y       ⁢       ∂   y       ∂   t       ⁢       ∂   I       ∂   t           =   0.           (   2   )             
 
         [0040]     Thus, the optical flow corresponds to a speed vector defined as (u, v) and having an x component u=dx/dt and a y component v=dy/dt. Therefore, the following equation holds true.  
         [0000]     (Step  3 )  
         [0041]     The optical flow obtained in step S 2  ( FIG. 8A ) is compared with a rectilinear optical flow for perfectly rectilinear traveling which is separately pre-stored ( FIG. 8B ). A differential optical flow ( FIG. 8C ) is thus calculated. Here, the rectilinear optical flow can be expressed as shown at e in  FIG. 8B . Optical flows of a predetermined length are evenly distributed on concentric circles around a null h (see  FIG. 15 ).  
         [0042]     Further, the null is a value determined by the position where the camera is mounted and its mounting angle (angle of depression). The null is a point that appears to be the intersection between parallel lines when the lines are viewed from obliquely above (see dl in  FIG. 9 ). The null h of the rectilinear optical flow is pre-stored.  
         [0000]     (Step S 4 )  
         [0043]     On the other hand, a null g is estimated on the basis of the direction of the optical flow obtained in step S 2 .  
         [0000]     (Step S 5 )  
         [0044]     Furthermore, the null h of the rectilinear optical flow is compared with the null g estimated in step S 4 . A deviation (deviation amount) in the x axis direction is thus calculated. Then, on the basis of the deviating position, an angle of yaw is estimated. Specifically, when for example, the steering wheel is steered to the left, the deviating position corresponds to a distance shown by x in  FIG. 11 . Accordingly, provided that the angle between a rectilinear line P along which the vehicle travels straight and a line Q along which the vehicle travels leftward is defined as θ, θ can be estimated using a trigonometric function on the basis of the distance x and the distance L to the image picking-up point. Then, θ corresponds to what is called the angle of yaw.  
         [0000]     (Step S 6 )  
         [0045]     Then, the differential optical flow calculated in step S 3  is corrected using the angle of yaw estimated in step S 5 .  
         [0000]     (Step S 7 )  
         [0046]     The corrected differential optical flow is decomposed into the x axis direction (horizontal component) and the y axis direction (vertical direction) (see  FIGS. 12 and 13 ).  
         [0000]     (Step S 8 )  
         [0047]     Then, calculation is made of the scalar average value of the horizontal component determined in step S 7 . This average value is a normal arithmetic average. The length of the horizontal component is used as a scalar quantity to represent the direction as the positive or negative (for example, the rightward direction is represented as the positive).  
         [0000]     (Step S 9 )  
         [0048]     Then, for every process, that is, every time step S 9  is executed, a time history is used to totalize the scalar average values of the horizontal components of differential optical flows. The result is then considered to be a zigzag amount. The zigzag amount is in pixel units. Accordingly, by dividing the zigzag amount by the actual length (image resolution) of each pixel, it is possible to measure the distance of zigzag traveling on the basis of the actual length.  
         [0000]     (Step S 10 )  
         [0049]     Then, the zigzag amount calculated in step S 9  is differentiated to determine the direction in which the vehicle is traveling.  
         [0000]     (Step S 11 )  
         [0050]     On the other hand, determination is made of the length distribution of the optical flow vertical component obtained by the decomposition in step S 7  (see  FIG. 14 ).  
         [0000]     (Step S 12 )  
         [0051]     Then, the turning direction of the vehicle is estimated from the length distribution determined in step S 11 . Here, the length of the optical flow vertical component indicates the movement of an object. A smaller length indicates a lower speed, while a larger length indicates a higher speed. Consequently, the distribution enables the turning direction of the vehicle to be estimated.  FIG. 13  shows an example in which a large number of longer vertical components directed rightward are distributed. This indicates that in the present embodiment, the vehicle is turning to the right.  
         [0000]     (Step S 13 )  
         [0052]     Then, the apparatus checks whether or not the differential value of the zigzag amount calculated in step S 10  is equal to the turning direction estimated in step S 12 . Thus, the turning direction is determined. The turning direction thus determined can be utilized for, for example, traveling deviation warning apparatus (lane keeper system). This makes it possible to determine whether or not the vehicle is likely to deviate from its traveling path even if the traveling path has no white lines. When the vehicle is determined to be likely to deviate, it is possible to perform control such that a torque is applied to a steering mechanism in a direction opposite to the current steering direction.  
         [0053]     After step S 13  has been finished, the flow is ended.  
         [0054]     Determining means may be provided to determine whether or not the zigzag amount calculated in step S 9  is at at least a reference level. Then, if the result of the determination is “YES”, that is, the determining means determines that the zigzag amount is at at least the reference level, the apparatus may determine that the vehicle is traveling in a zigzag line. Then, if the vehicle is determined to be traveling in a zigzag line, warning means (not shown) may give a warning to the driver.  
         [0055]     The reference level is determined by averaging the zigzag amount for a specified time from the start of driving. That is, on the basis of the judgment that the driver does not fall asleep for the specified time from the start of driving, the zigzag amount during the specified time is averaged. Alternatively, the reference level may be experimentally preset.  
         [0056]     Further, the image to be processed may be the lower half (for example, the range from 0 to 255 pixels if the image area has a size of 512×512 pixels) of the image picked up using the camera  11 , that is, the side of the road surface image which is closer to the vehicle. This configuration enables accurate zigzag determinations with a high image resolution. It is also effective in reducing the capacity of memories used and improving image processing speed.  
         [0057]     As described above, according to the present invention, the speed vector is calculated on the basis of the road surface image picked up using the camera. Then, on the basis of the speed vector, the apparatus determines whether or not the vehicle is traveling in a zigzag line. Consequently, the speed vector can be calculated even without any white lines on the road surface. The present invention is effective in determining whether or not the vehicle is traveling in a zigzag line even without any white lines on the road surface.  
         [0058]     Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.