Disclosure of Invention
The invention mainly aims to provide a vehicle positioning method, a vehicle positioning device and a computer readable storage medium, aiming at improving the accuracy of vehicle positioning.
In order to achieve the above object, the present invention provides a vehicle positioning method, including the steps of:
receiving first vehicle information broadcast by a first vehicle based on a vehicle-to-outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position;
acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest.
Optionally, the step of acquiring an image of a corresponding direction according to the first vehicle position, and determining an area of interest in the image according to the first vehicle position includes:
calling a camera in a corresponding direction according to the first vehicle position to shoot, and acquiring a corresponding image;
and performing coordinate conversion on the coordinate information of the first vehicle position to obtain corresponding image coordinate information, and determining the region of interest in the image according to the corresponding image coordinate information.
Optionally, the step of obtaining vehicle information of a current vehicle and determining a second vehicle position of the first vehicle according to a current vehicle position in the vehicle information of the current vehicle and the region of interest includes:
identifying the region of interest to obtain pixel coordinate information of the first vehicle in the image;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position and the pixel coordinate information in the vehicle information of the current vehicle.
Optionally, the vehicle information of the current vehicle further includes a current vehicle operating parameter, the first vehicle information further includes a first vehicle operating parameter, and the vehicle positioning method further includes:
calculating the distance between the current vehicle position and a second vehicle position, and determining whether collision is possible according to the distance, the current vehicle operation parameter and the first vehicle operation parameter;
and when the possibility of collision is determined, prompting collision early warning information.
Optionally, the first vehicle operating parameter comprises a first vehicle operating direction and a first vehicle operating speed, and the current vehicle operating parameter comprises a current vehicle operating direction and a current vehicle operating speed.
Optionally, the vehicle positioning method further comprises:
and displaying a corresponding first vehicle icon in a map according to the second vehicle position.
Further, to achieve the above object, the present invention also provides a vehicle positioning apparatus including: a memory, a processor, and a vehicle positioning program stored on the memory and executable on the processor, the vehicle positioning program when executed by the processor implementing the steps of:
receiving first vehicle information broadcast by a first vehicle based on a vehicle-to-outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position;
acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest.
Optionally, the vehicle positioning program when executed by the processor further implements the steps of:
calling a camera in a corresponding direction according to the first vehicle position to shoot, and acquiring a corresponding image;
and performing coordinate conversion on the coordinate information of the first vehicle position to obtain corresponding image coordinate information, and determining the region of interest in the image according to the corresponding image coordinate information.
Optionally, the vehicle positioning program when executed by the processor further implements the steps of:
identifying the region of interest to obtain pixel coordinate information of the first vehicle in the image;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position and the pixel coordinate information in the vehicle information of the current vehicle.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having a vehicle positioning program stored thereon, the vehicle positioning program, when executed by a processor, realizing the steps of:
receiving first vehicle information broadcast by a first vehicle based on a vehicle-to-outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position;
acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest.
The method comprises the steps of receiving first vehicle information broadcast by a first vehicle based on a vehicle and outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position; acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position; and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest. Through the mode, the communication connection between the current vehicle and the surrounding vehicles is established based on the V2X communication mode, when the current vehicle receives the first vehicle information broadcasted by the first vehicle in the surrounding vehicles based on the V2X communication mode, the image shot by the current vehicle through the camera in the corresponding direction is obtained according to the first vehicle position obtained through GPS positioning in the first vehicle information, the interested area in the image, namely the area where the first vehicle is located in the image, is determined according to the first vehicle position, and then the second vehicle position of the first vehicle is obtained through coordinate conversion according to the current vehicle position and the interested area, wherein the second vehicle position is more accurate compared with the first vehicle position. Therefore, the invention combines the image recognition technology in GPS positioning and visual perception, and can improve the accuracy of vehicle positioning while improving the accuracy of visual perception.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the prior art, vehicle Positioning technology mainly adopts a Global Positioning System (GPS) for Positioning, but in a complex urban environment, such as a high-rise building, a dense tree shade, and other areas, satellite signals are easily blocked, and thus vehicle Positioning accuracy is poor.
In order to solve the technical problems, the invention provides a vehicle positioning method, a device and a computer readable storage medium, wherein first vehicle information is broadcasted by a first vehicle based on the communication mode of exchanging V2X between the vehicle and the outside world, and the first vehicle information comprises a first vehicle position; acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position; and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest. Through the mode, the communication connection between the current vehicle and the surrounding vehicles is established based on the V2X communication mode, when the current vehicle receives the first vehicle information broadcasted by the first vehicle in the surrounding vehicles based on the V2X communication mode, the image shot by the current vehicle through the camera in the corresponding direction is obtained according to the first vehicle position obtained through GPS positioning in the first vehicle information, the interested area in the image, namely the area where the first vehicle is located in the image, is determined according to the first vehicle position, and then the second vehicle position of the first vehicle is obtained through coordinate conversion according to the current vehicle position and the interested area, wherein the second vehicle position is more accurate compared with the first vehicle position. Therefore, the invention combines the image recognition technology in GPS positioning and visual perception, and can improve the accuracy of vehicle positioning while improving the accuracy of visual perception.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal belonging to a device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a vehicle positioning program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client and performing data communication with the client; and the processor 1001 may be configured to invoke a vehicle positioning program stored in the memory 1005 and perform the following operations:
receiving first vehicle information broadcast by a first vehicle based on a vehicle-to-outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position;
acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest.
Further, the processor 1001 may invoke a vehicle positioning program stored in the memory 1005, and also perform the following operations:
calling a camera in a corresponding direction according to the first vehicle position to shoot, and acquiring a corresponding image;
and performing coordinate conversion on the coordinate information of the first vehicle position to obtain corresponding image coordinate information, and determining the region of interest in the image according to the corresponding image coordinate information.
Further, the processor 1001 may invoke a vehicle positioning program stored in the memory 1005, and also perform the following operations:
identifying the region of interest to obtain pixel coordinate information of the first vehicle in the image;
and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position and the pixel coordinate information in the vehicle information of the current vehicle.
Further, the processor 1001 may invoke a vehicle positioning program stored in the memory 1005, and also perform the following operations:
calculating the distance between the current vehicle position and a second vehicle position, and determining whether collision is possible according to the distance, the current vehicle operation parameter and the first vehicle operation parameter;
and when the possibility of collision is determined, prompting collision early warning information.
Further, the processor 1001 may invoke a vehicle positioning program stored in the memory 1005, and also perform the following operations:
the first vehicle operation parameter includes a first vehicle operation direction and a first vehicle operation speed, and the current vehicle operation includes a current vehicle operation direction and a current vehicle operation speed.
Further, the processor 1001 may invoke a vehicle positioning program stored in the memory 1005, and also perform the following operations:
and displaying a corresponding first vehicle icon in a map according to the second vehicle position.
Based on the hardware structure, the embodiment of the vehicle positioning method is provided.
The invention provides a vehicle positioning method.
Referring to fig. 2, fig. 2 is a schematic flow chart of a vehicle positioning method according to a first embodiment of the present invention.
In an embodiment of the present invention, the vehicle positioning method includes:
step S10, receiving first vehicle information broadcasted by a first vehicle based on a vehicle and outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position;
in the embodiment of the invention, the vehicle positioning method can be used for improving the positioning accuracy of surrounding vehicles by combining the image recognition technology in visual perception when GPS signals are weak in the driving process of the unmanned vehicle, so that the safety of the unmanned vehicle is improved.
In the embodiment of the invention, the communication connection between the current vehicle and the surrounding vehicles is established based on the V2X communication mode, so that the wireless communication between the vehicle terminals is realized, and the data transmission and reception are convenient. Among them, the V2X Communication method mainly includes DSRC (Dedicated Short Range Communication) and C-V2X (Cellular V2X, vehicle-to-outside interaction based on Cellular Communication technology).
The current vehicle may receive first vehicle information broadcast by a first vehicle (i.e., surrounding vehicles) based on the communication method of V2X, where the first vehicle information includes a first vehicle location. Wherein the first vehicle position is obtained from a GPS positioning system. The first vehicle may be a certain vehicle around the current vehicle, or may be a plurality of vehicles around the current vehicle.
Step S20, acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position;
then, the position relation between the first vehicle and the current vehicle is judged according to the position of the first vehicle, and an image in the corresponding direction is obtained, for example, when the first vehicle is judged to be positioned in front of the current vehicle according to the position of the first vehicle, an image of a front view field shot by a camera in front of the current vehicle can be called, and an interested area in the image, namely the area where the first vehicle is positioned in the image, is determined according to the position of the first vehicle.
Specifically, referring to fig. 3, fig. 3 is a schematic flowchart of a refining process of acquiring an image in a corresponding direction according to the first vehicle position and determining an area of interest in the image according to the first vehicle position in the embodiment of the present invention. Step S20 includes:
step S21, a camera in the corresponding direction is taken according to the first vehicle position to shoot, and a corresponding image is obtained;
step S22, performing coordinate transformation on the coordinate information of the first vehicle position to obtain corresponding image coordinate information, and determining an area of interest in the image according to the corresponding image coordinate information.
In the embodiment of the invention, when the current vehicle receives the first position information of the first vehicle, the position relation between the first vehicle and the current vehicle is judged according to the position of the first vehicle, and the position of the first vehicle in the current vehicle is judged, so that the camera in the corresponding direction is called to shoot, and the corresponding image is obtained. The camera may be installed on the vehicle according to the shooting range of the camera and the actual situation.
Then, coordinate conversion is performed on the coordinate information of the first vehicle position to obtain corresponding image coordinate information, specifically, the corresponding image coordinate information may be converted according to the coordinate information of the first vehicle position, that is, the GPS coordinate (longitude and latitude), and the heading angle and the pitch angle of the current vehicle, and the specific coordinate conversion method may refer to the existing algorithm, which is not described herein again. The heading angle of the vehicle is an included angle between the speed of the mass center of the vehicle and a horizontal transverse shaft under a ground coordinate system, and the pitch angle of the vehicle is an included angle formed by the original driving direction of the mass center of the vehicle and the direction in which the damping of the shock absorber is vertically changed. And then, searching a corresponding point in the image according to the converted corresponding image coordinate information, wherein the GPS position accuracy of the first vehicle may not be accurate, so that the area where the first vehicle is located can be searched in a certain range of the corresponding point in the image, and the region of interest in the image is determined. It should be noted that, due to the poor accuracy of the existing image recognition technology, when there are more vehicles or other objects in the image or the resolution difficulty is high, some vehicles in the image may not be recognized, and the first vehicle position may be helpful for the screening of the region of interest, so that the accuracy of the visual perception may be improved.
Step S30, obtaining vehicle information of a current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest.
And finally, obtaining the vehicle information of the current vehicle, wherein the vehicle information of the current vehicle comprises the current vehicle position, and further determining the second vehicle position of the first vehicle according to the current vehicle position and the region of interest in the image.
Specifically, please refer to fig. 4, where fig. 4 is a detailed flowchart illustrating a process of acquiring vehicle information of a current vehicle and determining a second vehicle position of the first vehicle according to a current vehicle position in the vehicle information of the current vehicle and the region of interest in the embodiment of the present invention. Step S30 includes:
step S31, identifying the region of interest to obtain pixel coordinate information of the first vehicle in the image;
step S32, obtaining vehicle information of a current vehicle, and determining a second vehicle position of the first vehicle according to a current vehicle position in the vehicle information of the current vehicle and the pixel coordinate information.
In the embodiment of the invention, when the region of interest in the image is determined, the region of interest is identified to obtain the pixel coordinate information of the first vehicle in the image, so as to obtain the vehicle information of the current vehicle, wherein the vehicle information of the current vehicle comprises the current vehicle position, the current vehicle position is obtained according to a GPS, and the second vehicle position of the first vehicle is determined according to the current vehicle position and the pixel coordinate information. Specifically, the coordinate conversion may be performed according to the pixel coordinate information, the heading angle and the pitch angle of the current vehicle, and then the second vehicle position of the first vehicle may be obtained according to the coordinate information of the current vehicle position, that is, the GPS coordinate (longitude and latitude).
It should be noted that, when the position of the first vehicle obtained by the GPS is not accurate, but the current position of the vehicle is accurate, the position of the first vehicle, that is, the second vehicle position, can be accurately located according to the present invention in combination with the image recognition technology in visual perception. When the first vehicle position and the current vehicle acquired by the GPS are accurate, the second vehicle position obtained by combining the image recognition technology in the visual perception according to the present invention coincides with the first vehicle position. When the position of the first vehicle and the position of the current vehicle acquired by the GPS are not accurate, the image recognition technology in visual perception is combined according to the invention, so that the position of the first vehicle can be positioned according to the position of the current vehicle based on the accurate relative position relationship between the current vehicle and the first vehicle, namely the position of the second vehicle, and at the moment, the accuracy of vehicle positioning can be improved to a certain extent.
The invention provides a vehicle positioning method, which comprises the steps of receiving first vehicle information broadcasted by a first vehicle based on a vehicle and outside information exchange V2X communication mode, wherein the first vehicle information comprises a first vehicle position; acquiring an image in a corresponding direction according to the first vehicle position, and determining an interested area in the image according to the first vehicle position; and acquiring vehicle information of the current vehicle, and determining a second vehicle position of the first vehicle according to the current vehicle position in the vehicle information of the current vehicle and the region of interest. Through the mode, the communication connection between the current vehicle and the surrounding vehicles is established based on the V2X communication mode, when the current vehicle receives the first vehicle information broadcasted by the first vehicle in the surrounding vehicles based on the V2X communication mode, the image shot by the current vehicle through the camera in the corresponding direction is obtained according to the first vehicle position obtained through GPS positioning in the first vehicle information, the interested area in the image, namely the area where the first vehicle is located in the image, is determined according to the first vehicle position, and then the second vehicle position of the first vehicle is obtained through coordinate conversion according to the current vehicle position and the interested area, wherein the second vehicle position is more accurate compared with the first vehicle position. Therefore, the invention combines the image recognition technology in GPS positioning and visual perception, and can improve the accuracy of vehicle positioning while improving the accuracy of visual perception.
Further, please refer to fig. 5, fig. 5 is a flowchart illustrating a vehicle positioning method according to a second embodiment of the present invention.
Based on the first embodiment shown in fig. 2, after step S30, the vehicle positioning method further includes:
step S40, calculating the distance between the current vehicle position and the second vehicle position, and determining whether there is possibility of collision according to the distance, the current vehicle operation parameter and the first vehicle operation parameter;
in step S50, when it is determined that there is a possibility of collision, collision warning information is presented.
In the embodiment of the invention, after the first vehicle is more accurately positioned, namely the second vehicle position of the first vehicle is determined, the distance between the current vehicle position and the second vehicle position is calculated, whether collision is possible or not is determined according to the distance, the current vehicle operation parameter and the first vehicle operation parameter, and when collision is determined to be possible, collision early warning information is prompted. Wherein the first vehicle operating parameter comprises a first vehicle operating direction and a first vehicle operating speed, and the current vehicle operating parameter comprises a current vehicle operating direction and a current vehicle operating speed. Of course, whether the preset conditions corresponding to other prompt messages are met or not can be judged according to the distance, the current vehicle running parameter and the first vehicle running parameter, and when the preset conditions corresponding to other prompt messages are met, other corresponding prompt messages are prompted. In addition, in a specific embodiment, the first vehicle information broadcast by the first vehicle based on the V2X communication mode may further include size information of the first vehicle, and in this case, the distance between the current vehicle and the second vehicle may be calculated according to the size information of the first vehicle and the area of the pixel occupied by the first vehicle in the image.
It should be noted that, in an embodiment, it may also be determined whether there is a possibility of collision between the current vehicle and the first vehicle only according to one or more parameters of the distance between the current vehicle and the first vehicle, the running direction, and the running speed, for example, when the distance between the current vehicle and the first vehicle is less than or equal to a preset value, the collision warning information may be prompted.
It should be further noted that the collision warning information can be prompted by text or voice directly on the display screen of the vehicle. In addition, communication connection can be established between the vehicle positioning device and the user terminal, and then collision early warning information is sent to the user terminal to prompt a user, wherein the user terminal can be a vehicle-mounted terminal, a smart phone, a tablet computer and other equipment.
Further, please refer to fig. 6, fig. 6 is a flowchart illustrating a vehicle positioning method according to a third embodiment of the present invention.
Based on the first embodiment shown in fig. 2, after step S30, the vehicle positioning method further includes:
and step S60, displaying a corresponding first vehicle icon in a map according to the second vehicle position.
In the embodiment of the invention, as an application scenario, after the second vehicle position of the first vehicle is determined, the corresponding first vehicle icon can be displayed in the map according to the second vehicle position, so that the user is prompted to acquire the information of the nearby vehicle, and the driving safety is improved. In addition, in the map, an icon corresponding to the current vehicle can be displayed, so that a user can conveniently know the relative position relation between the current vehicle and surrounding vehicles, and the driving safety can be improved.
The invention also proposes a computer-readable storage medium having stored thereon a vehicle localization program which, when executed by a processor, implements the steps of the vehicle localization method according to any one of the above embodiments.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the vehicle positioning method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.