Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the described embodiments of the invention, belong to the scope of protection of the invention.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. Also, the use of the terms "a," "an," or "the" and similar referents do not denote a limitation of quantity, but rather denote the presence of at least one. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
An embodiment of the present invention provides a method, an apparatus and a computer storage medium for determining a lane change tendency of a vehicle, the method comprising: s1, selecting a frame of road image as the current frame of road image; s2, identifying and selecting the identification point of the target vehicle; s3, identifying a lane line; s4, calculating and storing the vertical distance between the identification point and the lane line; s5, judging whether the target vehicle has a lane change trend according to the road image of at least one frame before the current frame road image and the vertical distance of the current frame road image, if so, performing the step S6, and if not, performing the step S1; and S6, outputting a lane change trend result. The method for judging the lane change trend of the vehicle provided by the embodiment of the invention is based on the existing image acquisition device, such as a camera, by introducing a moving target image identification and motion trend calculation method, identifying the identification point of the target vehicle and calculating the vertical distance between the identification point and a lane line, so that the lane change trend of the target vehicle can be judged without identifying the complete form of the target vehicle and only identifying the identification point of the target vehicle, thereby reducing the delay of judging the lane change trend of the target vehicle, realizing the timely and effective prediction of the transverse lane change trend of the target vehicle and effectively avoiding the danger brought to the current vehicle by lane change of the target vehicle.
First embodiment
Fig. 1 shows an exemplary flowchart of a method for determining a lane change tendency of a vehicle according to a first embodiment of the present invention, which, as shown in fig. 1, includes: s1, selecting a frame of road image as a current frame of road image; s2, identifying and selecting the identification point of the target vehicle; s3, identifying a lane line; s4, calculating and storing the vertical distance from the identification point to the nearest lane line; s5, judging whether the target vehicle has a lane change trend according to the vertical distance between the road image of at least one frame before the current frame road image and the current frame road image, if so, executing the step S6, and if not, executing the step S1; and S6, outputting a lane change trend result.
For example, in step S5, the determination of whether the target vehicle has a lane change tendency may be made according to the vertical distance from the target vehicle to the nearest lane line in the current frame road image and the one, two, three or more frames of road images preceding the current frame road image, e.g., the current frame road image is the ith frame road image, the determination of the lane change tendency of the target vehicle may be made according to the ith and i-1 th frame road images, or according to the ith, i-1 th and i-2 th frame road images, or according to the ith, i-1 th, i-2 th and i-3 th frame road images, or according to the ith, i-2 th, i-3 th frame road image, I-1 th frame road image, i-2 th frame road image … …, where n is an integer less than i and greater than 0.
For example, if the current frame road image is the first frame road image, and the vertical distance of the road image of at least one frame before the current frame road image obviously does not exist, step S5 of the determination method will not be able to determine whether the target vehicle has a lane change tendency, and will repeat the previous steps S1-S4.
For example, the road image of at least one frame before the current frame road image and the current frame road image may be road images of consecutive frames, or may not be road images of consecutive frames, and the embodiment of the present invention is not limited thereto as long as the lane change tendency of the target vehicle can be determined.
Exemplarily, in the first embodiment of the present invention, the identification point of the target vehicle may be a hub center of the vehicle, a shaping point of a skin of the vehicle, an included angle vertex formed by the vehicle and a ground shadow, an included angle vertex formed by an edge of the vehicle, or a feature point obtained by feature extraction through a convolutional neural network.
Accordingly, identifying and selecting an identification point of the target vehicle may include: the method comprises the steps of identifying and selecting the hub center of a target vehicle, identifying and selecting a modeling point of a skin of the target vehicle, identifying and selecting an included angle vertex formed by the target vehicle and a ground shadow, identifying and selecting an included angle vertex formed by the edge of the target vehicle or identifying and selecting a characteristic point of the target vehicle through a convolutional neural network.
It should be noted that, in order to make the selection of the identification point of the target vehicle have a higher accuracy, the related attribute of the identification point needs to be defined, that is, more definitions need to be added when the identification point of the target vehicle is identified and selected.
For example, when the vertex of the included angle formed by the vehicle and the ground shadow is selected as the identification point, the length of the edge line of the target vehicle, the length of the ground shadow and the size of the included angle formed by the edge line and the ground shadow are also considered, so that the possibility of selecting the identification point of the non-vehicle is eliminated as much as possible. For example, for other buildings on the road, such as street lamps, there are shadows formed on the ground, but the length of the ground shadow formed by street lamps is obviously different from that of the ground shadow formed by vehicles, and the length of the edge lines is also different from that of the vehicles, and the included angle formed by the street lamps and the ground shadow of the target vehicles is also different from that formed by the target vehicles and the ground shadow of the target vehicles.
Accordingly, in the method for determining a lane change tendency of a vehicle according to the first embodiment of the present invention, identifying and selecting a vertex of an angle formed by the target vehicle and the ground shadow may include: calculating and obtaining the length of the edge line of the target vehicle and the length of the ground shadow; calculating and obtaining an included angle formed by the target vehicle and the ground shadow; and identifying and selecting the vertex of the included angle between the target vehicle and the ground shadow from the road image according to the length of the edge line, the length of the ground shadow and the included angle.
For example, when the hub center of the target vehicle is selected as the identification point, the step of identifying and selecting the hub center of the target vehicle may include: firstly, identifying a circular pattern or a circular arc pattern in a road image; the center of the circular or circular arc pattern is then determined as the hub center of the target vehicle. The circular arc pattern here means a circular arc pattern capable of determining the center thereof, that is, the circular arc pattern needs to be a part of a circular pattern.
Further, in order to ensure that the recognized circular pattern or circular arc pattern is the hub of the target vehicle, when recognizing the circular pattern or circular arc pattern in the road image, it is necessary to consider the radial dimension of the circular pattern or circular arc pattern, and for the road, the object appearing as the circular pattern or circular arc pattern is mainly the tire of the vehicle, and the object appearing as the circular pattern or circular arc pattern matching the hub dimension of the vehicle is few, so that the recognition accuracy of the hub of the vehicle is improved after recognizing the circular pattern or circular arc pattern in consideration of the radial dimension of the circular pattern or circular arc pattern. For example, the radial dimension of the circular or circular arc pattern may be selected with reference to the hub parameters of all vehicles currently on the market, e.g., typically the hub has a diameter of 14-18 inches, then a circular or circular arc pattern having an image dimension corresponding to a hub diameter of 14-18 inches may be selected when identifying the circular or circular arc pattern in the road image. Accordingly, identifying a circular pattern or a circular arc pattern in the road image may include: a circular or circular arc shaped pattern in the road image is identified having an image size corresponding to a diameter of 14-18 inches.
Further, in order to further improve the accuracy of the hub recognition, in addition to the size, the restriction of the shape of the hub may be taken into consideration, and the circular or circular arc pattern having a radial pattern inside in the road image is determined as the hub of the target vehicle, and the center thereof is determined as the hub center. Accordingly, identifying a circular pattern or a circular arc pattern in the road image may include: identifying a circular or circular arc pattern in the road image having an image size corresponding to a diameter of 14-18 inches; or, identifying a circle or circular arc pattern in the road image having an image size corresponding to a diameter of 14-18 inches and selecting a circle and circular arc pattern having a radial pattern inside from the circle and circular arc pattern; alternatively, a circular pattern or a circular arc pattern having a radial pattern inside in the road image is recognized.
Further, after identifying the circular pattern or the circular arc pattern in the road image and before determining the center of the circular pattern or the circular arc pattern as the hub center of the target vehicle, identifying and selecting the hub center of the target vehicle further comprises: selecting the area where the circular pattern or the circular arc pattern is located; the area where the circular pattern or the circular arc pattern is located is screened and the edge area in the area where the circular pattern or the circular arc pattern is located is removed, for example, the edge area on the left side and the edge area on the right side of the single frame image and about one third of the upper part of the single frame image are removed, so that some areas irrelevant to the target vehicle image, such as the road edge or the sky, are removed.
Further, the method for determining a lane change tendency of a vehicle according to the first embodiment of the present invention may further include performing image processing on the current frame road image after selecting the one frame road image as the current frame road image and before identifying and selecting the identification point of the target vehicle.
Further, in order to improve the determination efficiency, after the image processing is performed on the current frame road image and before the identifying and selecting the identification point of the target vehicle, the method may further include selecting an area where the target vehicle is located.
Illustratively, in the first embodiment of the present invention, the image processing may include image preprocessing, image conversion, homomorphic filtering, mask noise elimination, edge extraction, and the like, the image preprocessing may include image clipping, image resizing, and the like, the image conversion may be to convert a color image into a gray-scale image, and in the first embodiment of the present invention, the image processing is not limited to the above definition, but may also include other image processing methods commonly used in the art.
Step S5 of the method for determining a lane change tendency of a vehicle according to the first embodiment of the present invention is exemplarily described below by taking a current frame road image and two consecutive frame road images preceding the current frame road image as an example.
For example, the determining whether the target vehicle has a lane change tendency according to the road image of at least one frame before the current frame road image and the vertical distance of the current frame road image may include: selecting a vertical distance D between an identification point of a target vehicle in the current frame image, such as the ith frame image, and road images of two continuous frames before the current frame image, such as the (i-1) th frame road image and the (i-2) th frame road image, and the nearest lane linei、Di-1And Di-2Wherein D isiIs the vertical distance, D, of the current frame image, i.e., the ith frame imagei-1The vertical distance, D, of the first frame road image, i.e., the i-1 th frame road image, before the current frame imagei-2The vertical distance of the second frame road image before the current frame image, that is, the i-2 th frame road image; calculating and acquiring any two differential values A and B according to the vertical distance from the identification point of the target vehicle of three continuous frames to the nearest lane line; judging whether the target vehicle has a lane change trend according to a lane change trend rule, wherein the lane change trend rule comprises the step of judging that the target vehicle has the lane change trend under the condition that the signs of two differential values are the same and both the two differential values are larger than a first threshold value or the signs of the two differential values are the same and the absolute value of one of the two differential values is larger than the sum of the other differential value and a second threshold value, and the first threshold value and the second threshold value are both transverse speed threshold values.
It should be noted that, in the first embodiment of the present invention, the vertical distance from the identification point of the target vehicle to the nearest lane line may be defined as: the vertical distance is a positive value when the target vehicle is located on the left side of the lane line, and correspondingly, the vertical distance is a negative value when the target vehicle is located on the right side of the lane line. For example, for a given lane line a, the distance from the vehicle B located on the left side thereof to the lane line a is a positive value, and the distance from the vehicle C located on the right side thereof to the lane line a is a negative value.
Further, in the method for determining a lane change tendency of a vehicle according to the first embodiment of the present invention, calculating and obtaining two differential values a and B according to the vertical distances of the consecutive three frames includes: calculating and obtaining the difference value Delta D1 ═ D of the vertical distances of any two adjacent framesi-1-Di-2And Δ D2 ═ Di-Di-1(ii) a According to the formula: and calculating and acquiring the two differential values, wherein T is the sum of the time of selecting one frame of road image as the current frame of road image, the time of processing the image, the time of identifying and selecting the identification point, the time of identifying the lane line and the time of calculating the vertical distance between the identification point and the lane line.
Here, it should be noted that when calculating the difference value of the vertical distances of the adjacent frame road images, the calculation is performed according to the same calculation rule, for example, the vertical distance of the road image in the next frame minus the vertical distance of the road image in the previous frame, or the vertical distance of the road image in the previous frame minus the vertical distance of the road image in the next frame may be used, and those skilled in the art may appropriately select the above rule as long as it is ensured that the difference value of the vertical distances of all the adjacent frame road images adopts the same calculation rule.
The above is explained by taking as an example the judgment of the lane change tendency of the vehicle based on the vertical distance of the road images of three consecutive frames, and the above is also applicable to the judgment based on the vertical distance of the road images of two, four or more consecutive frames.
For example, for the determination based on the vertical distance between two consecutive road images, a difference value is obtained by subtracting the vertical distance between the road image of the next frame from the vertical distance between the road images of the previous frame or subtracting the vertical distance between the road images of the previous frame from the vertical distance between the road images of the next frame, and then whether the target vehicle has a lane change trend is determined according to a lane change trend rule, where the lane change trend rule may be: if the differential value is greater than a lateral speed threshold value, the target vehicleHaving a tendency to change lanes, the difference value is obtained in the same manner as the above method for three consecutive frames, that is, the difference Δ D ═ D of the vertical distances of the two frames is calculated and obtainedi-Di-1(ii) a According to the formula: and A is delta D/T, and a difference value is obtained, wherein T is the sum of the time for selecting a frame of road image as a current frame of road image, the time for processing the image, the time for identifying and selecting the identification point, the time for identifying the lane line and the time for calculating the vertical distance from the identification point to the lane line.
For example, in the case where the judgment is performed based on the vertical distances of the road images of the consecutive four frames, with the difference being that three difference values a1, B1, and C1 (arranged in chronological order) are obtained, where a1 is obtained by operating the second frame image and the first frame image in the four frames, B1 is obtained by operating the third frame image and the second frame image in the four frames, and C1 is obtained by operating the fourth frame image and the third frame image in the four frames), the lane change tendency rule may be such that the absolute value of any one of the three difference values that is chronologically subsequent is greater than the sum of the adjacent difference value that is chronologically prior to the difference value and the second threshold value in the three difference values is greater than the sum of the absolute value of the adjacent difference value that is chronologically prior to the difference value and the second threshold value in the three difference values, for example, the absolute value of B1 is greater than the sum of the absolute value of a1 and the second threshold value and the absolute value of C1 that is greater than the sum of B1 and the second threshold value And judging that the target vehicle has a lane change trend, wherein the first threshold and the second threshold are both transverse speed thresholds, and the rest is the same as the method for judging the lane change trend of the vehicle according to the vertical distance of the continuous three frames of road images. For the case of road images of consecutive frames or road images of non-consecutive frames, analogy can be made according to the above, and for the convenience of description, the details will not be described here.
It should be noted that, for those skilled in the art, the transverse speed threshold, for example, the first threshold and the second threshold, in the range of 0.2m/s to 0.3m/s, may be selected from the range according to actual conditions, but the first threshold and the second threshold are different values in the same lane change tendency judgment rule, and the embodiment of the present invention will not be limited thereto.
Further, in the method for determining a lane change tendency of a vehicle according to the first embodiment of the present invention, calculating a vertical distance from the identification point to the nearest lane line may include calculating a vertical distance from a pixel point corresponding to the identification point to the lane line.
It should be noted here that there may be a plurality of pixels corresponding to the selected identification point, but the object of the present invention can be achieved by selecting a pixel corresponding to any one of the plurality of pixels, and then calculating that the vertical distance from the selected pixel to the nearest lane line is within the allowable range of the error.
Alternatively, calculating the vertical distance from the identification point to the nearest lane line may further include: converting the road image into a plan top view; and calculating the vertical distance between the identification point and the lane line in the plane top view.
In the embodiment of the present invention, how to calculate the vertical distance from the identification point to the nearest lane line is not limited to the above implementation method, and a scheme capable of achieving the object of the present invention is within the protection scope of the embodiment of the present invention.
For example, before selecting a road image of a frame as a road image of a current frame, the method for determining a lane change tendency of a vehicle according to an embodiment of the present invention may further include acquiring the road image by using an image acquisition device.
Alternatively, before the selecting a frame of road image as the current frame of road image, the method for determining a lane change tendency of a vehicle according to the embodiment of the present invention may further include acquiring a video image of a road by using an image acquisition device.
Here, the image acquisition device may be a camera mounted on the current vehicle, and the camera may be disposed at the front of the vehicle, as shown in fig. 2, and thecamera 101 is disposed at the front of the vehicle. Alternatively, the camera may also be provided in the middle or rear of the vehicle as long as a road image or a video image can be acquired.
It should be noted that when the image acquiring device is used to acquire a video image of a road, a frame of road image may be selected from the video image as a current frame road image, and when the image acquiring device is used to acquire a road image, the image acquiring device may be directly controlled to capture a real-time road image as a current frame road image, or a sub-image may be selected from the road image captured by the image acquiring device as a current frame road image, where the current frame road image means a road image showing the current time of the vehicle.
It should be noted here that, in the embodiment of the present invention, the target vehicle means at least 6 vehicles ahead of the current vehicle and sorted from small to large in terms of the distance value from the current vehicle in the direction along the lane line.
In the method for judging the lane change trend of the vehicle according to the embodiment of the invention, for at least 6 vehicles in front of the current vehicle, the lane change trend of the vehicle is judged for each vehicle at each moment, if any one of the vehicles is found to have the lane change trend, the judgment result of the lane change of the vehicle is output, the driver of the current vehicle can be reminded in the form of voice or images, or for the automatically driven vehicle, the controller of the current vehicle can directly receive the judgment result of the lane change of the vehicle, so that corresponding behaviors such as deceleration, avoidance and the like are performed.
It should be noted that the vehicles ahead of the current vehicle may be changed, that is, at least one of the 6 vehicles at the previous time and the 6 vehicles at the next time is different, and with the judgment method according to the embodiment of the present invention, it is always judged the lane change tendency of the vehicle ahead of the current vehicle at the current time, if the a vehicle at the previous time is not within the range of at least 6 vehicles at the next time, the driving of the a vehicle is not focused at the next time, and if the B vehicle is within the range of at least 6 vehicles at all, the judgment method will continuously track the driving of the B vehicle, that is, the road image is acquired at each time to make the judgment of the lane change tendency of the vehicle until the lane change thereof.
It should be noted here that being located in front of the current vehicle means that the head of the vehicle is ahead of the head of the current vehicle. Moreover, at least 6 vehicles may be further defined according to specific traffic rules, for example, for a traffic rule that a lane change is only possible from a left lane of a current vehicle, the at least 6 vehicles may be further defined as at least 6 vehicles that are ahead of the current vehicle, located in the left lane of the current vehicle, and have a distance value from the current vehicle ranked from small to large.
The following describes a method for determining a lane change tendency of a vehicle according to an embodiment of the present invention in detail with reference to a specific example.
Example 1
In this example, the vertex of the included angle formed by the target vehicle and the ground shadow is used as the identification point of the target vehicle, and fig. 3A to 3F show examples of determining lane change of the vehicle in which the identification point is the vertex of the included angle formed by the target vehicle and the ground shadow.
Fig. 3A shows one frame of road image acquired by the image acquisition device, the intersection line in fig. 3B identifies the identified lane line, and the intersection point of the two lines in fig. 3C marks the identification point of the target vehicle: the vertex of an included angle formed by the target vehicle and the ground shadow identifies a target vehicle positioned in front of the current vehicle through the identification point, but does not identify the target vehicle through the complete form of the vehicle, so that the vehicle can be identified when the vehicle does not completely appear in front of the current vehicle, and the lane change trend of the vehicle can be judged timely. Fig. 3D shows a diagram of the vertical distance of the identification point of the target vehicle from the lane line on the left side of the current vehicle in the acquired continuous multiple frames of road images, wherein the ordinate is the vertical distance of the identification point of the target vehicle from the lane line, and the unit is 1, where 1 is the distance between adjacent pixel points of the images, for example, the vertical distance is 15 indicating the distance between 15 pixel points, the abscissa is the road image time series, and as can be seen from fig. 3D, the vertical distance of the identification point of the target vehicle from the lane line is always decreasing, while in the tenth frame of road images, the vertical distance of the identification point of the target vehicle from the lane line has become negative, which means that the target vehicle has been located on the right side of the lane line, while in the 20 th to 30 th frame of road images, the vertical distance of the identification point of the target vehicle from the lane line has been steadily between 15 and 30, it can be seen that the vehicle has completed a lane change, merging from the lane to the left of the current vehicle into the lane in which the current vehicle is located. In the method for judging the lane change trend of the vehicle, according to at least two frames of images about the 10 th frame, the obvious lane change trend of the vehicle can be judged, and the result is output.
This is evidenced by the road images shown in fig. 3E and 3F, from which it can be seen that the vehicle has finally entered the lane of the current vehicle from the lane on the left.
Example 2
In this example, the vertex of the included angle formed by the edges of the vehicles is used as the identification point of the target vehicle, and fig. 4A to 4F show examples of determining lane change of the vehicle in which the identification point is the vertex of the included angle formed by the edges of the vehicles.
Fig. 4A shows one frame of road image acquired by the image acquisition device, the intersection line in fig. 4B identifies the identified lane line, and the intersection point of the two lines in fig. 4C marks the identification point of the target vehicle: the edges of the target vehicle form the vertex of the included angle, so that a target vehicle in front of the current vehicle is identified through the identification point. Fig. 4D shows a diagram of the acquired vertical distance of the identification point of the target vehicle from the lane line on the left side of the current vehicle in the continuous multi-frame road, wherein the ordinate is the vertical distance of the identification point of the target vehicle from the lane line, and the unit is 1, where 1 is the distance between adjacent pixel points of the image, for example, the vertical distance is 15, which means that the distance between 15 pixel points is the time series of the road image, and as can be seen from fig. 4D, the vertical distance of the identification point of the target vehicle from the lane line is almost constant, and thus, the vehicle has no lane change tendency.
This is verified by the road images shown in fig. 4E and 4F, and as can be seen, the vehicle is always traveling in the left lane of the current vehicle without changing lanes.
As can be seen from the above examples, according to the method for determining a lane change tendency of a vehicle of the embodiment of the present invention, by identifying and selecting an identification point of a target vehicle, calculating a vertical distance between the identification point and a lane line, and tracking a change of the vertical distance with time, it can be accurately determined whether the target vehicle changes lane, that is, the lane change tendency of the target vehicle is accurately determined, so that the lane change tendency of the vehicle can be determined without identifying a complete form of the vehicle, and thus, the lane change tendency of the vehicle can be determined in time, a delay in determining the lane change tendency of the target vehicle is reduced, a lateral lane change tendency of the target vehicle can be predicted in time and effectively, and a danger brought to a current vehicle by the lane change of the target vehicle can be avoided effectively.
Second embodiment
A second embodiment of the present invention provides a device for determining a lane change tendency of a vehicle, which includes a processor and a memory, where the memory stores instructions, and when the processor executes the instructions, the method for determining a lane change tendency of a vehicle described in the first embodiment of the present invention is executed.
Illustratively, the device for determining a lane change tendency of a vehicle according to the second embodiment of the present invention further includes: a road image acquisition unit that acquires a road image or a video image of a road, fig. 5 shows an exemplary block diagram of a vehicle lane change tendency determination device according to a second embodiment of the present invention.
For example, the road image acquiring unit may be a camera mounted on the current vehicle, and the camera may be disposed at the front of the vehicle, as shown in fig. 2, and thecamera 101 is disposed at the front of the vehicle. Alternatively, the camera may be disposed in the middle or rear of the vehicle as long as it can acquire a road image or a video image.
For example, in the device for determining a lane change tendency of a vehicle according to an embodiment of the present invention, the processor, the memory, and the road image acquisition unit may be all provided in the current vehicle. The processor and the memory are in signal connection with the road image acquisition unit, and when the processor judges whether the vehicle has a lane change trend, the judgment result is provided for a control device of the vehicle.
Alternatively, the road image acquiring unit may be disposed in the current vehicle, and the processor and the memory are disposed in the remote server and are in signal connection with the road image acquiring unit, that is, the processor acquires the road image or the video image acquired by the road image acquiring unit, and the processing and calculating result is stored in the memory, and the processor obtains the judgment result of the lane changing tendency of the vehicle and inputs the judgment result into the control device of the vehicle, so that the current vehicle performs corresponding behaviors, such as deceleration or avoidance.
Alternatively, the processor may also provide the determination of the lane change tendency of the vehicle to a remote vehicle controller so that the controller may remotely steer the current vehicle so that it acts accordingly.
It should be noted that, in the embodiment of the present invention, the current vehicle refers to a vehicle that needs to know the lane change tendency of other vehicles, and the target vehicle refers to a vehicle that needs to determine its lane change tendency.
Third embodiment
A third embodiment of the present invention provides a computer storage medium having stored thereon computer executable instructions, which when executed by a computing device, perform the method for determining a lane change tendency of a vehicle described in the first embodiment of the present invention, and the method for determining a lane change tendency of a vehicle performed by the instructions is not described herein again for the sake of simplicity.
An embodiment of the present invention provides a method, an apparatus and a computer storage medium for determining a lane change tendency of a vehicle, the method comprising: selecting a frame of road image as a current frame of road image; identifying and selecting an identification point of a target vehicle; identifying a lane line; calculating and storing the vertical distance from the identification point to the lane line; and judging whether the target vehicle has a lane change trend according to the at least one frame of road image before the current frame of road image and the vertical distance of the current frame of road image, outputting a lane change trend result if the lane change trend exists, and repeating the steps if the lane change trend does not exist or the lane change trend cannot be judged. According to the method for judging the lane changing trend of the vehicle, provided by the embodiment of the invention, the lane changing trend of the target vehicle is judged by identifying the identification point of the target vehicle and calculating the vertical distance between the identification point of the target vehicle and the lane line, so that the complete form of the target vehicle does not need to be identified, the judgment delay of the lane changing trend of the vehicle is reduced or even eliminated, and the detection precision and resolution of the visual identification of the whole vehicle and the weaker visual identification of the whole vehicle are avoided. A method for judging lane change tendency of a vehicle comprises the following steps:
(1) a method for judging lane change tendency of a vehicle comprises the following steps:
s1, selecting a frame of road image as a current frame of road image;
s2, identifying and selecting the identification point of the target vehicle;
s3, identifying a lane line;
s4, calculating and storing the vertical distance from the identification point to the nearest lane line;
s5, judging whether the target vehicle has a lane change trend according to the vertical distance between the road image of at least one frame before the current frame road image and the current frame road image, if so, executing the step S6, and if not, executing the step S1;
and S6, outputting a lane change trend result.
(2) The method for determining a lane change tendency of a vehicle according to (1), wherein the road image of at least one frame and the road image of the current frame are road images of consecutive frames.
(3) The method for judging a lane change tendency of a vehicle according to (1), wherein the identifying and selecting the identification point of the target vehicle comprises: the method comprises the steps of identifying and selecting the hub center of a target vehicle, identifying and selecting a modeling point of a skin of the target vehicle, identifying and selecting an included angle vertex formed by the target vehicle and a ground shadow, identifying and selecting an included angle vertex formed by the edge of the target vehicle or identifying and selecting a characteristic point of the target vehicle through a convolutional neural network.
(4) The method for judging the lane change tendency of the vehicle according to (3), wherein the step of identifying and selecting the vertex of an included angle formed by the target vehicle and the ground shadow comprises the following steps:
calculating and obtaining the length of the edge line of the target vehicle and the length of the ground shadow;
calculating and obtaining an included angle formed by a target vehicle and a ground shadow;
and identifying and selecting the vertex of the included angle between the target vehicle and the ground shadow from the road image according to the length of the edge line, the length of the ground shadow and the included angle.
(5) The method for determining a lane change tendency of a vehicle according to (3), wherein the identifying and selecting the hub center of the target vehicle includes:
identifying a circular or circular arc pattern in the road image;
the center of the circular or circular arc pattern is determined as the hub center of the target vehicle.
(6) The method for determining a lane change tendency of a vehicle according to (5), wherein identifying and selecting the hub center of the target vehicle further comprises, after identifying the circular or circular arc pattern in the road image and before determining the center of the circular or circular arc pattern as the hub center of the target vehicle:
selecting an area where a circular or arc-shaped pattern is located;
and screening the area where the circular or circular arc-shaped pattern is located and removing the edge area in the area where the circular or circular arc-shaped pattern is located.
(7) According to the method for judging the lane change tendency of the vehicle in (1), after selecting a frame of road image as the current frame of road image and before identifying and selecting the identification point of the target vehicle, the method further comprises the following steps:
and carrying out image processing on the current frame road image.
(8) The method for determining a lane change tendency of a vehicle according to (7), wherein determining whether the target vehicle has a lane change tendency based on a vertical distance between at least one frame of road image before the current frame of road image and the current frame of road image comprises:
selecting the vertical distance D from the identification point of the current frame image and the road image of two continuous frames before the current frame image to the nearest lane linei、Di-1And Di-2Wherein D isiIs the vertical distance, D, of the current frame imagei-1Is the vertical distance, D, of the road image of the first frame before the current frame imagei-2The vertical distance of a second frame road image before the current frame image;
calculating and acquiring any two differential values A and B according to the vertical distance of three continuous frames;
judging whether the target vehicle has a lane change trend according to the lane change trend rule,
wherein the lane change tendency rule includes judging that the target vehicle has the lane change tendency under the condition that the signs of the two differential values are the same and both the two differential values are greater than the first threshold value or the signs of the two differential values are the same and the absolute value of one of the two differential values is greater than the sum of the other differential value and the second threshold value
The first threshold and the second threshold are lateral velocity thresholds.
(9) The method for judging a lane change tendency of a vehicle according to (8), wherein calculating and acquiring any two differential values a and B from vertical distances of consecutive three frames comprises:
calculating and obtaining the difference △ D1 ═ D of the vertical distance of any two adjacent framesi-1-Di-2And △ D2 ═ Di- Di-1;
Two differential values are calculated and obtained according to the formula of A- △ D1/T and B- △ D2/T,
wherein T is the sum of the time for selecting one frame of road image as the current frame of road image, the time for image processing, the time for identifying and selecting the identification point, the time for identifying the lane line and the time for calculating the vertical distance from the identification point to the lane line.
(10) The method for determining a lane change tendency of a vehicle according to (1), wherein calculating a vertical distance from the identification point to the nearest lane line includes:
and calculating the vertical distance from the pixel point corresponding to the identification point to the nearest lane line.
(11) The method for determining a lane change tendency of a vehicle according to (1), wherein calculating a vertical distance from the identification point to the nearest lane line includes:
converting the road image into a plan top view;
and calculating the vertical distance between the identification point and the nearest lane line in the plane top view.
(12) According to the method for judging the lane change trend of the vehicle in the step (1), before one frame of road image is selected as the current frame of road image, the method further comprises the following steps:
an image of the road is acquired with an image acquisition device.
(13) According to the method for judging the lane change trend of the vehicle in the step (1), before one frame of road image is selected as the current frame of road image, the method further comprises the following steps:
and acquiring a video image of the road by using the image acquisition device.
(14) The method for determining a lane change tendency of a vehicle according to (7), wherein after the image processing of the current frame road image and before the identification and selection of the identification point of the target vehicle, further comprises:
the area in which the target vehicle is located is selected.
(15) The method for determining a lane change tendency of a vehicle according to (1), wherein the target vehicle includes at least 6 vehicles which are located ahead of the current vehicle and are ranked from small to large according to a distance value from the current vehicle in a lane line direction.
(16) A device for judging lane change tendency of a vehicle comprises a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the judging method of any one of (1) to (15) is executed.
(17) The judgment device according to (16), further comprising:
and a road image acquisition unit for acquiring a road image or a video image of the road.
(18) The determination device according to (17), wherein the processor, the memory, and the road image acquisition unit are provided in the current vehicle.
(19) The judging device according to (17), wherein the road image obtaining unit is provided in the current vehicle, and the processor and the memory are provided in the remote server and are in signal connection with the road image obtaining unit.
(20) A computer storage medium having stored thereon computer-executable instructions that, when executed by a computing device, perform the method of any one of (1) - (15).
The above description is only an embodiment of the present invention, but the scope of the embodiments of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present invention, and all the changes or substitutions should be covered by the scope of the embodiments of the present invention.