Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like. Furthermore, embodiments of the invention and features of the embodiments may be combined with each other without conflict.
Example 1
Fig. 1 is a flowchart of a positioning method based on vehicle-road coordination according to a first embodiment of the present invention, where the present embodiment is applicable to a case of positioning a target object in a vehicle-road coordination scene, and the method may be performed by a positioning device based on vehicle-road coordination, where the device may be implemented by software and/or hardware, and may be integrated in an electronic device with a data processing function, where the electronic device may be a mobile terminal such as a mobile phone, a notebook, or a fixed terminal or a server such as a desktop. Referring to fig. 1, the method may include the steps of:
S110, acquiring an image containing an object to be positioned, and determining the position coordinates of a target reference point of the object to be positioned in the image.
The image is acquired by the image acquisition equipment under the view angle of the image acquisition equipment. The image acquisition device may be a device capable of acquiring an image, for example, may be a camera or a video camera, and may acquire an image in real time or may acquire an image at every set time. The position of the image acquisition device can be determined according to the situation, for example, the image acquisition device can be arranged on a road rod where a street lamp is positioned, and can also be arranged on other objects which can be provided with the image acquisition device in a road surface. It should be noted that, the image capturing apparatus of the present embodiment captures an image under its own viewing angle, that is, the captured image is formed in a camera coordinate system constructed under the viewing angle of the image capturing apparatus, that is, the position coordinate of the object to be positioned in the image is the coordinate in the camera coordinate system. The camera coordinate system is a three-dimensional rectangular coordinate system, the origin is positioned at the optical center of the lens, the x-axis and the y-axis are respectively parallel to the two sides of the phase plane, and the z-axis is the optical axis of the lens and is perpendicular to the image plane. Considering that the image acquisition equipment has a certain height with the ground, and because of the angle problem, the position of the object to be positioned in the camera coordinate system has a certain deviation from the position of the object to be positioned in the actual space, if the active control of the vehicle is performed based on the position of the object to be positioned in the camera coordinate system, the danger is easy to occur. Therefore, the embodiment needs to convert the object to be positioned under the camera coordinate system into the actual space so as to guide the road surface to run and improve the traffic safety.
The object to be positioned can be an object to be positioned in a vehicle-road cooperative scene, the object can be a person or an object, and in this embodiment, the object to be positioned includes a user as an example. The number of the objects to be positioned can be determined according to actual road conditions, for example, the image acquired at a certain moment may contain at least one object to be positioned, the image acquired at a certain moment may not contain the object to be positioned, and the embodiment is described with the image containing the object to be positioned. Referring to fig. 2, fig. 2 is a schematic diagram of an image collected by an image collecting device in a vehicle-road cooperative scene according to a first embodiment of the present invention, where the image includes three objects to be positioned, no. 1, no. 2, and No. 3, respectively. The target reference point may be a point reflecting the position of the object to be positioned, and the point may be a point in the object to be positioned, or may be a point other than the object to be positioned, for example, a point on the contour corresponding to the object to be positioned in fig. 2 may be selected as the target reference point, where the contour of each object to be positioned is shown in fig. 2.
Optionally, the object to be positioned in the image can be identified by an image identification mode, one point is selected as a target reference point, and then the position coordinates of the target reference point are determined. The embodiment does not limit the image recognition method. The image can also be input into a pre-trained image recognition network, the image recognition network outputs the outline of the object to be positioned and the position coordinates corresponding to the outline, a point is selected from the outline as a target reference point, and the coordinates of the point are used as the position coordinates of the target reference point, namely the position coordinates of the object to be positioned.
S120, determining the plane coordinates of the target reference point according to a preset coordinate conversion relation and the position coordinates of the target reference point in the image.
The preset coordinate conversion relation is used for representing the conversion relation between the plane coordinate and the position coordinate under the view angle of the image acquisition equipment. The embodiment does not limit the specific form of the preset coordinate conversion relationship, and may be, for example, a matrix, a function or other forms that can reflect the relationship between the camera coordinate system and the plane coordinate system. The preset coordinate conversion relation can be predetermined, for example, a certain number of reference points can be selected from the image, the corresponding preset coordinate conversion relation is determined according to the coordinates of the reference points in the camera coordinate system and the actual coordinates of the reference points in the plane coordinate system, and the reference points can be pavement markers with certain special graphic marks, such as light poles, telegraph poles and the like. The preset coordinate conversion relation can be updated according to actual conditions in subsequent application, so that the accuracy of the positioning result is improved.
Specifically, the conversion of different coordinate systems can be realized by utilizing the preset coordinate conversion relation, so that the position coordinates of the target reference point in the camera coordinate system are converted into the plane coordinates in the plane coordinate system, the road surface is guided to run, and the traffic safety is ensured. Optionally, the plane coordinates of the target reference points can be sent to the corresponding vehicle-mounted terminals after being determined, so that the vehicle-mounted terminals can adjust driving strategies according to the plane coordinates of the target reference points, and traffic accidents are avoided.
The first embodiment of the invention provides a positioning method based on vehicle-road cooperation, which comprises the steps of obtaining an image containing an object to be positioned, and determining the position coordinates of a target reference point of the object to be positioned in the image, wherein the image is acquired by image acquisition equipment under the view angle of the image acquisition equipment; and determining the plane coordinate of the target reference point according to a preset coordinate conversion relation and the position coordinate of the target reference point in the image, wherein the preset coordinate conversion relation is used for representing the conversion relation between the plane coordinate and the position coordinate under the view angle of the image acquisition equipment. According to the method, the position coordinates of the target reference point under the view angle of the image acquisition equipment are converted into plane coordinates by utilizing the preset coordinate conversion relation, so that the problem of poor positioning accuracy of the target reference point due to different view angles is effectively solved.
On the basis of the above embodiment, before the image including the object to be positioned is acquired, a preset coordinate transformation relationship may be determined, so that the real coordinates of the target reference point may be determined based on the preset coordinate transformation relationship, and accordingly, before the image including the object to be positioned is acquired, the method may further include:
Acquiring an image which is acquired by the image acquisition equipment and contains at least one sampling point under the view angle of the image acquisition equipment;
determining sampling position coordinates of the at least one sampling point in the image and plane position coordinates in a plane;
And determining the preset coordinate conversion relation according to the sampling position coordinates and plane position coordinates of the at least one sampling point.
In particular, the sampling points may be markers such as street lamp poles, electric poles, rails, etc., whose plane position coordinates in a plane coordinate system are known. The number of the sampling points can be one or more, and when the number of the sampling points is more than one, the accuracy of the preset coordinate conversion relation can be improved. Optionally, the sampling point in the image may be identified by an image identification manner, and the position of the pixel corresponding to the sampling point in the image is taken as the sampling position coordinate thereof. And obtaining a preset coordinate conversion relation according to the sampling position coordinates and plane position coordinates of the sampling points and the lens imaging principle. The preset coordinate conversion relation in this embodiment takes perspective matrix as an example, and its form may be as follows:
Where f is related to the focal length of the image acquisition device. By utilizing the perspective matrix, points in a camera coordinate system can be converted into a plane coordinate system, and the positioning accuracy is improved.
Example two
Fig. 3 is a flowchart of a positioning method based on vehicle-road cooperation according to a second embodiment of the present invention, where the optimization is performed on the basis of the foregoing embodiment, and referring to fig. 3, the method may include the following steps:
S210, acquiring an image containing an object to be positioned.
S220, determining the outline of the object to be positioned and the lower edge of the outline.
Alternatively, the object to be positioned may be first identified by image recognition, and then its outline may be determined according to the area occupied by the object to be positioned, and referring to fig. 2, fig. 2 illustrates the outlines of three objects to be positioned. In this embodiment, the lower edge of the contour is the position where the bottom end of the object to be positioned is located, and when the object to be positioned is a user, the position where the foot of the user is located may be specifically the position where the foot of the user is located, which may reflect the current position information where the user is located.
S230, taking the center point of the lower edge as a target reference point of the object to be positioned, and taking the coordinates of the center point as the position coordinates of the target reference point.
In this embodiment, a certain point corresponding to the object to be positioned represents the object to be positioned, and the position coordinate of the object to be positioned in the image is determined. Referring to fig. 2, the center points of the lower edges of the three contours may be respectively taken as corresponding target reference points, and the coordinates of the center points may be marked as the position coordinates of the target reference points.
S240, determining the plane coordinates of the target reference point according to a preset coordinate conversion relation and the position coordinates of the target reference point in the image.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating conversion of a camera coordinate system and a planar coordinate system according to a second embodiment of the present invention. Wherein, the image at the view angle of the camera may be equivalent to the plane CDEF in fig. 4, the image in the plane coordinate system may be equivalent to the plane CDEF in fig. 4, and the objects to be positioned a and B may be converted into a and B in the plane CDEF by the above-mentioned preset coordinate conversion relationship assuming that the objects to be positioned are a and B, whose positions in the camera coordinate system are shown in fig. 4. Assuming that the moving speed of the object to be positioned is uniform, the non-uniform moving speed of the object from the position of a to the position of b can be obtained according to the principle of near-large and far-small under the view angle of a camera, and the object is converted into a plane CDEF through the conversion, so that the characteristic of uniform driving of the object can be maintained, particularly in the crossing with complex traffic, the frequency of traffic accidents is effectively reduced, and the safety is improved.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a position of an object to be positioned in a planar coordinate system according to a second embodiment of the present invention. Object a, object B, and object C correspond to No. 1, no. 2, and No. 3 in fig. 2, respectively.
S250, the plane coordinates of the target reference points are sent to the corresponding terminals, so that the terminals adjust driving strategies in vehicle-road coordination according to the plane coordinates of the target reference points.
The terminal of the embodiment may be a vehicle-mounted terminal or a user terminal with a communication function, and the user terminal may be an intelligent terminal such as a mobile phone, an intelligent bracelet, a notebook, and the like. The method and the device can be used for sending the plane coordinates of the target reference point to the corresponding terminal after determining the plane coordinates of the target reference point, and the corresponding terminal adjusts the current driving strategy according to the plane coordinates of the target reference point, so that safety is ensured. Alternatively, the plane coordinates of the target reference point may be directly sent to the corresponding terminal, or may be sent to the communication device on the road side first, and forwarded to the corresponding terminal by the communication device.
The second embodiment of the invention provides a positioning method based on vehicle-road cooperation, which takes an object to be positioned as a user as an example on the basis of the first embodiment, determines the position of the user in a camera coordinate system, converts the position into a plane coordinate system through a predetermined coordinate conversion relation, acquires the coordinates of the user in the plane coordinate system, guides the active control of a vehicle based on the coordinates of the user in the plane coordinate system, effectively solves the problem of poor positioning precision of a target reference point caused by different visual angles, and ensures traffic safety.
Example III
Fig. 6 is a block diagram of a positioning device based on vehicle-road cooperation according to a third embodiment of the present invention, where the device may execute the positioning method based on vehicle-road cooperation according to the foregoing embodiment, and referring to fig. 6, the device may include:
A position coordinate determining module 31, configured to acquire an image including an object to be positioned, and determine a position coordinate of a target reference point of the object to be positioned in the image, where the image is an image acquired by an image acquisition device under a view angle of the image acquisition device;
The plane coordinate determining module 32 is configured to determine a plane coordinate of the target reference point according to a preset coordinate transformation relationship and a position coordinate of the target reference point in the image, where the preset coordinate transformation relationship is used to represent a transformation relationship between the plane coordinate and the position coordinate under the view angle of the image capturing device.
The third embodiment of the invention provides a positioning device based on vehicle-road cooperation, which is characterized in that an image containing an object to be positioned is obtained, and the position coordinates of a target reference point of the object to be positioned in the image are determined, wherein the image is acquired by image acquisition equipment under the view angle of the image acquisition equipment; and determining the plane coordinate of the target reference point according to a preset coordinate conversion relation and the position coordinate of the target reference point in the image, wherein the preset coordinate conversion relation is used for representing the conversion relation between the plane coordinate and the position coordinate under the view angle of the image acquisition equipment. The device utilizes the preset coordinate conversion relation to convert the position coordinates of the target reference point under the visual angle of the image acquisition equipment into plane coordinates, and effectively solves the problem of poor positioning precision of the target reference point caused by different visual angles.
On the basis of the above embodiment, the position coordinate determining module 31 is specifically configured to:
determining a contour of the object to be positioned and a lower edge of the contour;
And taking the central point of the lower edge as a target reference point of the object to be positioned, and taking the coordinates of the central point as the position coordinates of the target reference point.
On the basis of the above embodiment, the apparatus may further include:
And the information sending module is used for sending the plane coordinates of the target reference point to a corresponding terminal after determining the plane coordinates of the target reference point according to the perspective transformation matrix and the position coordinates of the target reference point in the image, so that the terminal can adjust the driving strategy in the vehicle-road cooperation according to the plane coordinates of the target reference point.
On the basis of the above embodiment, the object to be located includes a user.
On the basis of the above embodiment, the apparatus may further include:
The image acquisition module is used for acquiring an image which is acquired by the image acquisition equipment under the view angle of the image acquisition equipment and contains at least one sampling point before acquiring the image which contains the object to be positioned;
A sampling coordinate determining module for determining sampling position coordinates of the at least one sampling point in the image and plane position coordinates in a plane;
And the coordinate conversion relation determining module is used for determining the preset coordinate conversion relation according to the sampling position coordinates and the plane position coordinates of the at least one sampling point.
The positioning device based on the vehicle-road cooperation provided by the embodiment of the invention can be used for executing the positioning method based on the vehicle-road cooperation provided by the embodiment, and has corresponding functions and beneficial effects.
Example IV
Fig. 7 is a block diagram of an electronic device according to a fourth embodiment of the present invention, where the electronic device may include a processor 41, a memory 42, an input device 43 and an output device 44, where the number of processors 41 in the electronic device may be one or more, and in fig. 7, one processor 41 is taken as an example, and the processor 41, the memory 42, the input device 43 and the output device 44 in the electronic device may be connected by a bus or other manners, and in fig. 7, the connection by a bus is taken as an example.
The memory 42 is a computer readable storage medium, and may be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the vehicle-road collaboration-based positioning method in the embodiment of the present invention. The processor 41 executes various functional applications of the electronic device and data processing, that is, implements the vehicle-road cooperation-based positioning method of the above-described embodiment, by running software programs, instructions, and modules stored in the memory 42.
The memory 42 mainly includes a memory program area and a memory data area, wherein the memory program area can store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 42 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 42 may further include memory located remotely from processor 41, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 43 may be used for receiving entered numeric or character information and for generating key signal inputs related to user settings and function control of the electronic device. The output device 44 may include a display device such as a display screen, a speaker, and an audio device such as a buzzer.
The electronic device provided by the embodiment of the present invention belongs to the same inventive concept as the positioning method based on vehicle-road cooperation provided by the above embodiment, and technical details not described in detail in the present embodiment can be seen in the above embodiment, and the present embodiment has the same beneficial effects of executing the positioning method based on vehicle-road cooperation.
Example five
Fig. 8 is a block diagram of a positioning system based on vehicle-road cooperation according to a fifth embodiment of the present invention, and referring to fig. 8, the system includes: the image processing device 52 is respectively in communication connection with the image acquisition device 51, the road side communication device 53 and the terminal 54, and the road side communication device 53 is also in communication connection with the terminal 54. The image pickup device 51 in the present embodiment may be a device having an image pickup function such as a camera or a video camera.
Specifically, the image capturing device 51 is configured to capture an image including an object to be located, which may be a person or an object, under a viewing angle of the image capturing device, and send the image to the image processing device 52. An image processing device 52 for determining the position coordinates of the target reference point of the object to be positioned in the image, and determining the plane coordinates of the target reference point according to the preset coordinate conversion relationship and the position coordinates of the target reference point in the image and transmitting to the terminal 54 through the roadside communication device 53. The roadside communication device 53 is used to realize data interaction of the image processing device 52 and the terminal 54. The terminal 54 is configured to adjust a driving policy in the vehicle-road coordination according to the received plane coordinates of the target reference point, so as to ensure driving safety.
The positioning system based on vehicle-road cooperation provided by the embodiment of the present invention and the positioning method based on vehicle-road cooperation provided by the above embodiment belong to the same inventive concept, and technical details not described in detail in the present embodiment can be seen in the above embodiment.
Example six
A sixth embodiment of the present invention provides a storage medium having stored thereon a computer program for executing a vehicle-road cooperation-based positioning method when executed by a processor, the method comprising:
Acquiring an image containing an object to be positioned, and determining the position coordinates of a target reference point of the object to be positioned in the image, wherein the image is acquired by image acquisition equipment under the view angle of the image acquisition equipment;
And determining the plane coordinate of the target reference point according to a preset coordinate conversion relation and the position coordinate of the target reference point in the image, wherein the preset coordinate conversion relation is used for representing the conversion relation between the plane coordinate and the position coordinate under the view angle of the image acquisition equipment.
The storage media of embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to: electromagnetic signals, optical signals, or any suitable combination of the preceding. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, radio Frequency (RF), and the like, or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.