Vehicle positioning method, system, device and storage medium based on QR code recognition
By spraying QR codes on the vehicle and using the camera to identify the QR codes of other vehicles, combining the relative position relationship and reference to the positioning information of the vehicle, the accurate positioning information of the bicycle is calculated, and the positioning inaccurate problem of positioning signal occlusion or multi-path effect in the prior art is solved, and the accurate positioning and safety guarantee of the bicycle is achieved.
Patent Information
- Application Number
- CN202111574048.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In the case of signal occlusion or multi-path effect, existing vehicle positioning technology is difficult to accurately obtain its own positioning information, affecting the normal function and safety of the vehicle.
By spraying the QR code on the vehicle, identifying the QR code of other vehicles using the camera, combining the relative position relationship and reference to the vehicle's positioning information, the accurate positioning information of the vehicle is calculated.
Even if the bicycle cannot accurately obtain the positioning signal, the bicycle can be accurately positioned by identifying the QR code of other vehicles, ensuring the normal function and safety of the vehicle.
Smart Images

Figure CN114255274B_ABST
Abstract
Description
Background Art
[0002] When a vehicle is driving, accurate positioning of the vehicle is the basis for the vehicle to realize many functions. Especially for autonomous vehicles, accurate positioning of the vehicle is a necessary condition for safe driving. Existing vehicle positioning generally obtains positioning information by using the global navigation satellite system positioning signal directly generated by navigation satellites. However, in actual applications, there may be situations where the vehicle cannot accurately obtain its own positioning information. For example, in an environment with signal obstruction, it is easy to produce weak satellite signals or multipath effects, resulting in unreliable positioning results, affecting the realization of normal vehicle functions. Summary of the invention
[0003] In view of the problems in the prior art, the purpose of the present invention is to provide a vehicle positioning method, system, device and storage medium based on QR code recognition, which obtains the accurate positioning information of the vehicle by combining the positioning information of other vehicles and the relative position relationship between the two vehicles.
[0004] The embodiment of the present invention provides a vehicle positioning method based on two-dimensional code recognition, comprising the following steps:
[0005] Obtain the image to be recognized collected by the camera of the vehicle;
[0006] Extracting a vehicle QR code identification area from the image to be identified, and taking the vehicle corresponding to the vehicle QR code identification area as a reference vehicle;
[0007] Determine the position of the vehicle two-dimensional code identification area in the image to be identified, and determine the relative position relationship between the vehicle and the reference vehicle;
[0008] Acquiring positioning information of the reference vehicle;
[0009] The positioning information of the own vehicle is determined according to the relative position relationship between the own vehicle and the reference vehicle and the positioning information of the reference vehicle.
[0010] In some embodiments, the vehicle corresponding to the vehicle QR code identification area is used as a reference vehicle, including the following steps:
[0011] Identify the two-dimensional code information in the two-dimensional code identification area of the vehicle to obtain corresponding two-dimensional code information, wherein the two-dimensional code information includes a vehicle ID;
[0012] The identified vehicle ID is used as the reference vehicle ID.
[0013] In some embodiments, obtaining the positioning information of the reference vehicle includes the following steps:
[0014] Establish communication with the reference vehicle according to the ID of the reference vehicle, and obtain positioning information of the reference vehicle from the reference vehicle.
[0015] In some embodiments, the shooting direction of the camera of the vehicle is a first direction, and determining the position of the vehicle QR code identification area in the image to be identified includes the following steps:
[0016] Determine the size ratio of the vehicle QR code identification area relative to the image to be identified;
[0017] Determine the offset of the vehicle two-dimensional code identification area relative to the reference point of the image to be identified in the second direction and the third direction;
[0018] Determine the size ratio between the sides of the vehicle two-dimensional code identification area.
[0019] In some embodiments, the relative position relationship between the self-vehicle and the reference vehicle includes a relative position and posture between the self-vehicle and the reference vehicle, and determining the relative position relationship between the self-vehicle and the reference vehicle includes the following steps:
[0020] Determine the distance between the vehicle and the reference vehicle in the first direction according to the size ratio of the vehicle two-dimensional code identification area relative to the image to be identified;
[0021] Determine the distance between the vehicle and the reference vehicle in the second direction and the distance in the third direction according to the offset of the vehicle two-dimensional code identification area in the second direction and the third direction relative to the reference point of the image to be identified;
[0022] The relative rotation angle between the vehicle and the reference vehicle is determined according to the size ratio between the sides of the vehicle two-dimensional code.
[0023] In some embodiments, the determining the relative position relationship between the vehicle and the reference vehicle further comprises the following steps:
[0024] Obtain the relative position and posture of the camera of the vehicle and the positioning point of the vehicle.
[0025] In some embodiments, the determining the relative position of the vehicle and the reference vehicle further comprises the following steps:
[0026] Obtain the relative position and posture of the two-dimensional code identifier of the reference vehicle and the positioning point of the reference vehicle.
[0027] In some embodiments, the positioning information of the reference vehicle includes the spatial position and posture of the reference vehicle, and the spatial position and posture of the reference vehicle includes the spatial coordinates and rotation matrix of the reference vehicle;
[0028] The step of determining the positioning information of the vehicle according to the relative position relationship between the vehicle and the reference vehicle and the positioning information of the reference vehicle comprises the following steps:
[0029] The spatial pose of the vehicle is determined according to the relative pose between the vehicle and the reference vehicle and the spatial pose of the reference vehicle. The spatial pose of the vehicle includes the spatial coordinates and rotation matrix of the vehicle.
[0030] In some embodiments, determining the spatial pose of the vehicle according to the relative pose between the vehicle and the reference vehicle and the spatial pose of the reference vehicle comprises the following steps:
[0031] Convert the distances between the self-vehicle and the reference vehicle in the first direction, the second direction and the third direction into coordinate offsets of each coordinate axis in the world coordinate system;
[0032] Calculating the spatial coordinates of the vehicle according to the coordinate offset and the spatial coordinates of the reference vehicle;
[0033] Converting the relative rotation angle between the self-vehicle and the reference vehicle into angular offsets around each coordinate axis in the world coordinate system;
[0034] The rotation matrix of the vehicle is calculated according to the angle offset and the rotation matrix of the reference vehicle.
[0035] The embodiment of the present invention further provides a vehicle positioning system based on two-dimensional code recognition, which is used to implement the vehicle positioning method based on two-dimensional code recognition, and the system includes:
[0036] An image acquisition module is used to obtain the image to be recognized collected by the camera of the vehicle;
[0037] A two-dimensional code recognition module is used to extract a vehicle two-dimensional code identification area from the image to be recognized, and use the vehicle corresponding to the vehicle two-dimensional code identification area as a reference vehicle;
[0038] A relative position determination module, used to determine the position of the vehicle's two-dimensional code identification area in the image to be identified, and determine the relative position relationship between the vehicle and the reference vehicle;
[0039] The positioning information acquisition module is used to acquire the positioning information of the reference vehicle and determine the positioning information of the own vehicle according to the relative position relationship between the own vehicle and the reference vehicle and the positioning information of the reference vehicle.
[0040] The embodiment of the present invention further provides a vehicle positioning device based on two-dimensional code recognition, comprising:
[0041] processor;
[0042] a memory storing executable instructions of the processor;
[0043] Wherein, the processor is configured to execute the steps of the vehicle positioning method based on QR code recognition by executing the executable instructions.
[0044] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, and when the program is executed by a processor, the steps of the vehicle positioning method based on two-dimensional code recognition are implemented.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0046] The vehicle positioning method, system, device and storage medium based on two-dimensional code recognition of the present invention have the following beneficial effects:
[0047] The present invention obtains the relative position between the own vehicle and other vehicles by recognizing QR codes, and obtains the accurate positioning information of the own vehicle by combining the positioning information of other vehicles and the relative position relationship between the two vehicles. This ensures that even when the own vehicle cannot accurately obtain its own positioning information, the own vehicle can still be accurately positioned, thereby ensuring the normal function and safety of vehicle driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0049] Figure 1 is a flow chart of a vehicle positioning method based on two-dimensional code recognition according to an embodiment of the present invention;
[0050] Figure 2 It is a flow chart of determining the position of the vehicle two-dimensional code identification area in the image to be identified according to an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of determining the position of the vehicle two-dimensional code identification area in the image to be identified according to an embodiment of the present invention;
[0052] Figure 4 is a flow chart of determining the relative position relationship between the self-vehicle and the reference vehicle according to an embodiment of the present invention;
[0053] Figure 5 is a flow chart of determining the spatial position of a vehicle according to an embodiment of the present invention;
[0054] Figure 6 It is a structural schematic diagram of a vehicle positioning system based on two-dimensional code recognition according to an embodiment of the present invention;
[0055] Figure 7 It is a structural schematic diagram of a vehicle positioning device based on two-dimensional code recognition according to an embodiment of the present invention;
[0056] Figure 8 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0058] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0059] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.
[0060] In order to solve the technical problems in the prior art, the present invention provides a vehicle positioning method based on QR code recognition, in which a QR code is sprayed on the body (such as the side or the rear) of each vehicle in advance, and the QR code includes at least the ID information of the vehicle. When the QR code is sprayed at different positions, the QR code may also include the relative position information between the vehicle QR code identification area and the positioning point of the vehicle. For vehicles that cannot accurately locate themselves, they can determine the relative position relationship between the vehicle and other vehicles by taking images of other vehicles and identifying the QR code identification therein, and calculate the positioning data of the vehicle through the positioning data of other vehicles.
[0061] like Figure 1 As shown, an embodiment of the present invention provides a vehicle positioning method based on two-dimensional code recognition, comprising the following steps:
[0062] S100: Obtaining an image to be recognized captured by a camera of an ego vehicle. Here, the ego vehicle is a vehicle to be positioned. The ego vehicle may be unable to obtain accurate ego vehicle positioning information because its own positioning signal is blocked or a positioning system fails.
[0063] After acquiring the image to be identified, first determine whether there is a vehicle QR code identification area in the image to be identified. If yes, proceed to step S200. If not, wait for a preset interval time to reacquire the image to be identified, or acquire the image to be identified acquired by a camera at another position of the vehicle;
[0064] S200: extracting a vehicle QR code identification area from the image to be identified, and taking the vehicle corresponding to the vehicle QR code identification area as a reference vehicle; the reference vehicle is another vehicle within the shooting range of the camera of the own vehicle, and the own vehicle subsequently uses the positioning of the reference vehicle as a reference to calculate the positioning information of the own vehicle;
[0065] In this embodiment, the vehicle QR code identification area is extracted from the image to be identified. The vehicle area can be first extracted from the image to be identified, and then the vehicle QR code identification area can be extracted from the vehicle area. The vehicle QR code identification area can also be directly extracted from the image to be identified. The method of extracting the vehicle area and / or the vehicle QR code identification area can use a deep learning model to perform image target detection, using the vehicle and / or the QR code as the detection target, or can also be compared with a standard QR code image to identify whether there is a QR code image in the image to be identified.
[0066] S300: Determine the position of the vehicle two-dimensional code identification area in the image to be identified, and determine the relative position relationship between the vehicle and the reference vehicle;
[0067] S400: Acquire positioning information of the reference vehicle, where the positioning information of the reference vehicle may be positioning information acquired by the reference vehicle through its positioning system, or may be positioning information calculated by the vehicle positioning method of the present invention using other vehicles as reference vehicles;
[0068] S500: Determine the positioning information of the own vehicle according to the relative position relationship between the own vehicle and the reference vehicle and the positioning information of the reference vehicle.
[0069] The vehicle positioning method based on QR code recognition of the present invention recognizes the QR code identification area from the image taken by the own vehicle through steps S100 to S200, obtains the relative position between the own vehicle and other vehicles through step S300, and then obtains the accurate positioning information of the own vehicle by combining the positioning information of other vehicles and the relative position relationship between the two vehicles through steps S400 and S500, thereby achieving accurate positioning of the own vehicle even when the own vehicle cannot accurately obtain the own vehicle positioning information, thereby ensuring the normal function and safety of vehicle driving.
[0070] In this embodiment, in step S200, the vehicle corresponding to the vehicle QR code identification area is used as a reference vehicle, which includes the following steps:
[0071] Identify the two-dimensional code information in the two-dimensional code identification area of the vehicle to obtain corresponding two-dimensional code information, wherein the two-dimensional code information includes a vehicle ID;
[0072] The identified vehicle ID is used as the reference vehicle ID. The reference vehicle ID is identification information used to uniquely identify the vehicle during vehicle-to-vehicle communication. That is, a vehicle can be uniquely identified through the vehicle ID.
[0073] In this embodiment, the step S400: obtaining the positioning information of the reference vehicle includes the following steps:
[0074] Establish communication with the reference vehicle according to the ID of the reference vehicle, and obtain the positioning information of the reference vehicle from the reference vehicle, that is, ensure that the captured QR code and the obtained positioning information belong to the same vehicle, and maintain the unity of the two. In this embodiment, each vehicle can establish communication through near field communication (NFC) to transmit data to each other. After the self-vehicle establishes communication with other vehicles, it sends a positioning information acquisition request to other vehicles, and receives returned information from other vehicles. The returned information includes at least the vehicle ID and positioning information. The self-vehicle compares the ID in the returned information with the ID identified from the QR code. If the comparison is consistent, the positioning information in the returned information is used as the positioning information of the reference vehicle. In other alternative embodiments, other communication methods can also be used between the self-vehicle and the reference vehicle. For example, the self-vehicle and the reference vehicle can establish communication through a base station next to the road, or through a user terminal, or use other communication protocols to establish communication.
[0075] In this embodiment, the shooting direction of the camera of the vehicle is a first direction. When the camera of the vehicle is installed in front of the vehicle, the shooting direction of the camera of the vehicle is consistent with the forward direction of the vehicle. When the camera of the vehicle is installed on the side of the vehicle body, the shooting direction of the camera of the vehicle is a direction perpendicular to the side of the vehicle body.
[0076] like Figure 2 As shown, in the step S300, determining the position of the vehicle two-dimensional code identification area in the image to be identified includes the following steps:
[0077] S310: Determine the size ratio of the vehicle QR code identification area relative to the image to be identified;
[0078] S320: Determine the offset of the vehicle two-dimensional code identification area in the second direction and the third direction relative to the reference point of the image to be identified, where the position of the reference point of the image to be identified can be set to the center point, the upper left corner position point, the upper right corner position point, etc. of the image to be identified;
[0079] S330: Determine the size ratio between the sides of the vehicle two-dimensional code identification area.
[0080] like Figure 3 As shown, it is a schematic diagram of determining the position of the vehicle two-dimensional code identification area in the image to be identified. Figure 3 In which F100 represents the image to be identified, F200 represents the identified vehicle two-dimensional code identification area, the direction perpendicular to the image to be identified F100 is taken as the first direction z1 (not shown in the figure), the horizontal coordinate of the image to be identified F100 is taken as the second direction x1, and the vertical coordinate of the image to be identified F100 is taken as the third direction y1. A normal two-dimensional code is a square with a regular shape, but due to different shooting angles, the vehicle two-dimensional code identification area F200 may present an irregular shape. Corresponding to step S310, for example, the ratio m1 of the width of the vehicle two-dimensional code identification area F200 (for example, the average value of the width of the a side and the c side) to the width of the image to be identified F100 is determined. Corresponding to step S320, the offset Δx1 of the vehicle two-dimensional code identification area F200 in the x direction and the offset Δy1 in the y direction relative to the image to be identified F100 are determined. Corresponding to step S330, determine the size ratio between the various side edges of the vehicle two-dimensional code identification area F200, specifically, determine the width ratio a / c between side a and side c, determine the length ratio b / d between side b and side d, and determine the length ratio a / b between side a and side b.
[0081] In this embodiment, the relative position relationship between the ego vehicle and the reference vehicle includes the relative position and posture of the ego vehicle and the reference vehicle. Specifically, the relative position relationship between the ego vehicle and the reference vehicle determined in step S300 is a relative position relationship in the camera coordinate system of the camera, and when it is subsequently applied to step S500, a coordinate system conversion is required.
[0082] like Figure 4 As shown, in step S300, determining the relative position relationship between the vehicle and the reference vehicle includes the following steps:
[0083] S340: Determine the distance between the vehicle and the reference vehicle in the first direction according to the size ratio of the vehicle QR code identification area to the image to be identified; specifically, preset a standard ratio value m0, which is the ratio of the width of the QR code identification area in the image captured by the camera of the first vehicle to the image width when the camera of the first vehicle faces the QR code of the second vehicle and the distance between the first vehicle and the second vehicle is a preset standard value s. Figure 3 For example, by comparing the ratio m1 and the standard ratio value m0, the distance Δz1 between the self-vehicle and the reference vehicle in the first direction can be determined. Specifically, if m1 is greater than m0, Δz1 is less than the preset standard value s; if m1 is less than m0, Δz1 is greater than the preset standard value s.
[0084] S350: Determine the distance between the vehicle and the reference vehicle in the second direction and the distance in the third direction according to the offset of the vehicle two-dimensional code identification area in the second direction and the third direction relative to the reference point of the image to be identified; Figure 3 For example, Δx1 and Δy1 are converted into the distance between the self-vehicle and the reference vehicle in the x direction and the distance in the y direction, respectively. For example, a proportional coefficient k1 between the offset and the vehicle distance can be set, and Δx1 and Δy1 can be multiplied by the proportional coefficient k1, respectively, to obtain the distance between the self-vehicle and the reference vehicle in the x direction and the distance in the y direction;
[0085] S360: Determine the relative rotation angle between the vehicle and the reference vehicle according to the size ratio between the sides of the vehicle QR code. Figure 3For example, the relative rotation angle between the self-vehicle and the reference vehicle relative to the x1 direction is determined according to a / c, the relative rotation angle between the self-vehicle and the reference vehicle relative to the y1 direction is determined according to b / d, and the relative rotation angle between the self-vehicle and the reference vehicle relative to the z1 direction is determined according to a / b. Specifically, a proportional coefficient k2 of the side dimension ratio and the angle can be set, a / c is multiplied by k2 to obtain the relative rotation angle relative to the x1 direction, b / d is multiplied by k2 to obtain the relative rotation angle relative to the y1 direction, and a / b is multiplied by k2 to obtain the relative rotation angle relative to the z1 direction.
[0086] The relative position of the self-vehicle and the reference vehicle includes the distance between the self-vehicle and the reference vehicle in the first direction, the second direction, and the third direction, and the rotation angle of the self-vehicle relative to the reference vehicle in the first direction, the second direction, and the third direction.
[0087] In this embodiment, in step S300, considering that the position of the camera of the own vehicle may be uncertain, and the positions of the QR code labels of different vehicles may also be different, the determination of the relative position relationship between the own vehicle and the reference vehicle further includes the following steps:
[0088] Obtaining the relative position and posture of the camera of the ego vehicle and the positioning point of the ego vehicle, including the relative distance between the camera of the ego vehicle and the positioning point of the ego vehicle in each coordinate axis in the camera coordinate system and the relative rotation angle relative to each coordinate axis, which can be achieved by pre-calibration and pre-stored in the controller of the vehicle; the positioning point of the ego vehicle can be the point where the positioning system is installed, or other preset reference points;
[0089] The relative position between the QR code identification of the reference vehicle and the positioning point of the reference vehicle is obtained, which can be obtained by scanning the QR code information of the reference vehicle, or by communicating with the reference vehicle and obtaining it from the data packet sent by the reference vehicle.
[0090] In step S300, the relative position relationship between the vehicle's QR code identification area and the image to be identified, the relative position of the vehicle's camera and the vehicle's positioning point, and the relative position of the reference vehicle's QR code identification and the reference vehicle's positioning point are comprehensively determined to determine the relative position of the vehicle and the reference vehicle.
[0091] In this embodiment, the positioning information of the reference vehicle includes the spatial position of the reference vehicle, and the spatial position of the reference vehicle includes the spatial coordinates and rotation matrix of the reference vehicle. Here, the spatial position may be a spatial position relative to a world coordinate system.
[0092] The step S500: determining the positioning information of the vehicle according to the relative position relationship between the vehicle and the reference vehicle and the positioning information of the reference vehicle, comprises the following steps:
[0093] The spatial pose of the vehicle is determined according to the relative pose between the vehicle and the reference vehicle and the spatial pose of the reference vehicle. The spatial pose of the vehicle includes the spatial coordinates and rotation matrix of the vehicle.
[0094] Here, only one method of determining the relative position relationship between the self-vehicle and the reference vehicle based on the QR code is given. In other alternative implementations, two cameras can also be set on the self-vehicle to directly obtain the distance between the self-vehicle and the reference vehicle in the first direction through binocular recognition.
[0095] like Figure 5 As shown, in this embodiment, determining the spatial posture of the self-vehicle according to the relative posture between the self-vehicle and the reference vehicle and the spatial posture of the reference vehicle includes the following steps:
[0096] S510: converting the distances between the self-vehicle and the reference vehicle in the first direction, the second direction and the third direction into coordinate offsets Δz2, Δx2, Δy2 of the respective coordinate axes z2, x2, y2 in the world coordinate system;
[0097] Specifically, determine the transformation matrix between the first direction z1, the second direction x1 and the third direction y1 and each coordinate axis z2, x2, y2 in the world coordinate system, and this transformation matrix can be achieved by camera calibration;
[0098] S520: Calculate the spatial coordinates of the vehicle (x0+Δx2, y0+Δy2, z0+Δz2) according to the coordinate offset and the spatial coordinates of the reference vehicle (x0, y0, z0);
[0099] S530: Convert the relative rotation angle between the self-vehicle and the reference vehicle into an angular offset around each coordinate axis in the world coordinate system;
[0100] Specifically, according to the conversion matrix between the first direction z1, the second direction x1 and the third direction y1 and each coordinate axis z2, x2, y2 in the world coordinate system, the rotation angle of the self-vehicle relative to the reference vehicle in the directions x1, y1, z1 is converted into the rotation angle of the self-vehicle relative to the reference vehicle in the directions x2, y2, z2, that is, the angle offset;
[0101] S540: Calculate the rotation matrix of the vehicle according to the angle offset and the rotation matrix of the reference vehicle, where the rotation matrix includes the rotation amount of each coordinate axis relative to the world coordinate system.
[0102] like Figure 6As shown, an embodiment of the present invention further provides a vehicle positioning system based on two-dimensional code recognition, which is used to implement the vehicle positioning method based on two-dimensional code recognition, and the system includes:
[0103] The image acquisition module M100 is used to obtain the image to be recognized acquired by the camera of the vehicle;
[0104] The two-dimensional code recognition module M200 is used to extract the vehicle two-dimensional code identification area from the image to be recognized, and use the vehicle corresponding to the vehicle two-dimensional code identification area as a reference vehicle;
[0105] The relative position determination module M300 is used to determine the position of the vehicle two-dimensional code identification area in the image to be identified, and determine the relative position relationship between the vehicle and the reference vehicle;
[0106] The positioning information acquisition module M400 is used to acquire the positioning information of the reference vehicle and determine the positioning information of the own vehicle according to the relative position relationship between the own vehicle and the reference vehicle and the positioning information of the reference vehicle.
[0107] The vehicle positioning system based on two-dimensional code recognition of the present invention recognizes the two-dimensional code identification area from the image taken by the own vehicle through the image acquisition module M100 and the two-dimensional code recognition module M200, and obtains the relative position between the own vehicle and other vehicles through the relative position determination module M300, and then obtains the accurate positioning information of the own vehicle by combining the positioning information of other vehicles and the relative position relationship between the two vehicles through the positioning information acquisition module M400, thereby achieving accurate positioning of the own vehicle even when the own vehicle cannot accurately obtain the positioning information of the own vehicle, thereby ensuring the normal function and safety of vehicle driving.
[0108] In this embodiment, the two-dimensional code recognition module M200 can first extract the vehicle area in the image to be recognized, and then extract the vehicle two-dimensional code identification area in the vehicle area, or directly extract the vehicle two-dimensional code identification area in the image to be recognized. The method of extracting the vehicle area and / or the vehicle two-dimensional code identification area can use a deep learning model to perform image target detection, using the vehicle and / or the two-dimensional code as the detection target, or it can also be compared with a standard two-dimensional code image to identify whether there is a two-dimensional code image in the image to be recognized. After identifying the vehicle two-dimensional code identification area, the two-dimensional code recognition module M200 identifies the two-dimensional code information in the vehicle two-dimensional code identification area to obtain the corresponding two-dimensional code information, and the two-dimensional code information includes the vehicle ID; the identified vehicle ID is used as the ID of the reference vehicle.
[0109] In this embodiment, the relative position and posture of the self-vehicle and the reference vehicle obtained by the relative position determination module M300 includes the distance between the self-vehicle and the reference vehicle in the first direction, the second direction, and the third direction, and the rotation angle of the self-vehicle relative to the reference vehicle relative to the first direction, the second direction, and the third direction. The positioning information of the reference vehicle includes the spatial position and posture of the reference vehicle, and the spatial position and posture of the reference vehicle includes the spatial coordinates and the rotation matrix of the reference vehicle. Here, the spatial position and posture can be the spatial position and posture relative to the world coordinate system, and the spatial position and posture of the self-vehicle includes the spatial coordinates and the rotation matrix of the self-vehicle. The relative position determination module M300 determines the relative position relationship between the self-vehicle and the reference vehicle, and determines the relative position relationship in the camera coordinate system of the camera. The positioning information acquisition module M400 needs to first convert the relative position relationship in the camera coordinate system into the relative position relationship in the world coordinate system, and then combine it with the spatial position and posture of the reference vehicle in the world coordinate system to obtain the spatial position and posture of the self-vehicle.
[0110] The camera of the self-vehicle can be a monocular camera or a binocular camera. The relative position determination module M300 can adopt the above steps S310 to S360 to obtain the relative posture of the self-vehicle and the reference vehicle. The positioning information acquisition module M400 can adopt the above steps S510 to S540 to obtain the positioning information of the self-vehicle, but the present invention is not limited to this.
[0111] An embodiment of the present invention also provides a vehicle positioning device based on QR code recognition, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to execute the steps of the vehicle positioning method based on QR code recognition by executing the executable instructions.
[0112] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0113] Refer to the following Figure 7 The electronic device 600 according to this embodiment of the present invention is described. Figure 7 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0114] like Figure 7As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0115] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the vehicle positioning method based on two-dimensional code recognition in the above description. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .
[0116] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0117] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0118] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0119] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0120] In the vehicle positioning device based on QR code recognition, the program in the memory implements the steps of the vehicle positioning method based on QR code recognition when executed by the processor. Therefore, the device can also obtain the technical effect of the vehicle positioning method based on QR code recognition.
[0121] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and when the program is executed by a processor, the steps of the vehicle positioning method based on two-dimensional code recognition are implemented. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps of various exemplary embodiments of the present invention described in the vehicle positioning method based on two-dimensional code recognition section of this specification.
[0122] refer to Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0123] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0124] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0125] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0126] When the program in the computer storage medium is executed by the processor, the steps of the vehicle positioning method based on two-dimensional code recognition are implemented. Therefore, the computer storage medium can also obtain the technical effect of the vehicle positioning method based on two-dimensional code recognition.
[0127] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A vehicle positioning method based on two-dimensional code recognition, characterized in that: The steps include: Acquire an image to be recognized captured by a camera of the vehicle, wherein the shooting direction of the camera of the vehicle is a first direction; Extracting a vehicle QR code identification area from the image to be identified, and taking the vehicle corresponding to the vehicle QR code identification area as a reference vehicle; Determine the position of the vehicle two-dimensional code identification area in the image to be identified, and determine the relative position relationship between the self-vehicle and the reference vehicle, wherein the relative position relationship between the self-vehicle and the reference vehicle includes the relative position and posture of the self-vehicle and the reference vehicle; Acquire positioning information of the reference vehicle, where the positioning information of the reference vehicle includes the spatial coordinates and rotation matrix of the reference vehicle; Determining the positioning information of the own vehicle according to the relative position relationship between the own vehicle and the reference vehicle and the positioning information of the reference vehicle; Wherein, determining the position of the vehicle two-dimensional code identification area in the image to be identified includes the following steps: Determine the size ratio of the vehicle QR code identification area relative to the image to be identified; Determine the offset of the vehicle two-dimensional code identification area relative to the reference point of the image to be identified in the second direction and the third direction; Determine the size ratio between the sides of the vehicle QR code identification area; The step of determining the relative position relationship between the vehicle and the reference vehicle comprises the following steps: Determine the distance between the vehicle and the reference vehicle in the first direction according to the size ratio of the vehicle two-dimensional code identification area relative to the image to be identified; Determine the distance between the vehicle and the reference vehicle in the second direction and the distance in the third direction according to the offset of the vehicle two-dimensional code identification area in the second direction and the third direction relative to the reference point of the image to be identified; Determine the relative rotation angle between the vehicle and the reference vehicle according to the size ratio between the sides of the vehicle QR code; The step of determining the positioning information of the vehicle according to the relative position relationship between the vehicle and the reference vehicle and the positioning information of the reference vehicle comprises the following steps: Convert the distances between the self-vehicle and the reference vehicle in the first direction, the second direction and the third direction into coordinate offsets of each coordinate axis in the world coordinate system; Calculating the spatial coordinates of the vehicle according to the coordinate offset and the spatial coordinates of the reference vehicle; Converting the relative rotation angle between the self-vehicle and the reference vehicle into angular offsets around each coordinate axis in the world coordinate system; The rotation matrix of the vehicle is calculated according to the angle offset and the rotation matrix of the reference vehicle.
2. The vehicle positioning method based on two-dimensional code recognition according to claim 1 is characterized in that: The vehicle corresponding to the vehicle QR code identification area is used as a reference vehicle, including the following steps: Identify the two-dimensional code information in the two-dimensional code identification area of the vehicle to obtain corresponding two-dimensional code information, wherein the two-dimensional code information includes a vehicle ID; The identified vehicle ID is used as the reference vehicle ID.
3. The vehicle positioning method based on two-dimensional code recognition according to claim 2 is characterized in that: Acquiring the positioning information of the reference vehicle includes the following steps: Establish communication with the reference vehicle according to the ID of the reference vehicle, and obtain positioning information of the reference vehicle from the reference vehicle.
4. The vehicle positioning method based on two-dimensional code recognition according to claim 1 is characterized in that: The step of determining the relative position relationship between the vehicle and the reference vehicle further comprises the following steps: Obtain the relative position and posture of the camera of the vehicle and the positioning point of the vehicle.
5. The vehicle positioning method based on two-dimensional code recognition according to claim 1 is characterized in that: The determining of the relative position of the vehicle and the reference vehicle further comprises the following steps: Obtain the relative position and posture of the two-dimensional code identifier of the reference vehicle and the positioning point of the reference vehicle.
6. A vehicle positioning system based on two-dimensional code recognition, characterized in that: For implementing the vehicle positioning method based on two-dimensional code recognition according to any one of claims 1 to 5, the system comprises: An image acquisition module is used to obtain the image to be recognized collected by the camera of the vehicle; A two-dimensional code recognition module is used to extract a vehicle two-dimensional code identification area from the image to be recognized, and use the vehicle corresponding to the vehicle two-dimensional code identification area as a reference vehicle; A relative position determination module, used to determine the position of the vehicle's two-dimensional code identification area in the image to be identified, and determine the relative position relationship between the vehicle and the reference vehicle; The positioning information acquisition module is used to acquire the positioning information of the reference vehicle and determine the positioning information of the own vehicle according to the relative position relationship between the own vehicle and the reference vehicle and the positioning information of the reference vehicle.
7. A vehicle positioning device based on two-dimensional code recognition, characterized in that: include: processor; a memory storing executable instructions of the processor; Wherein, the processor is configured to execute the steps of the vehicle positioning method based on two-dimensional code recognition as described in any one of claims 1 to 5 by executing the executable instructions.
8. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the vehicle positioning method based on two-dimensional code recognition described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Vehicle-assisted navigation and positioning system, vehicle-assisted navigation and positioning method, vehicle-assisted navigation and positioning equipment and storage medium
CN109737971A