Method and system for calibrating a conversion relationship between two roadside sensors
By aligning the time and judging the error distance of the roadside sensors, the single strain transformation matrix is obtained, which solves the problems of frequent and high cost of roadside sensor calibration in the existing technology, and realizes efficient and low-cost coordinate conversion.
Patent Information
- Application Number
- CN202411228250.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The prior art has problems such as frequent road closures, high cost, expensive equipment and low efficiency when calibrating roadside sensors, especially when high-precision maps are lacking or expensive equipment is required.
By timely aligning the first preset roadside sensor and the second preset roadside sensor, monitoring the position coordinates of the preset target, calculating the one-strain transformation matrix, and determining whether it is accurate by the error distance until the final one-strain transformation matrix is obtained.
Accurate coordinate conversion between different roadside sensors is realized, reducing costs and simplifying the calibration process, improving efficiency, and avoiding the needs of road closures and expensive equipment.
Smart Images

Figure CN119399289B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of roadside sensor calibration, and in particular to a method and system for calibrating a conversion relationship between two roadside sensors. Background Art
[0002] Roadside sensors are used to detect information about traffic participants on the road. They need to provide accurate location information for traffic participants and are a crucial component of vehicle-road collaboration and digital twin systems. The current technical solutions for calibrating different roadside sensors are as follows:
[0003] 1) The invention patent, publication number "CN111383285A," titled "A Method and System for Calibration Based on Millimeter-Wave Radar and Camera Sensor Fusion," requires manual calibration, such as requiring an engineer to walk a straight line through different areas of the scene with a handheld corner reflector. Collecting data at urban intersections or highways poses a risk. If road closures require approval from traffic control authorities, not only does this disrupt normal traffic flow, but replacing roadside sensors also requires additional road closures, which is inefficient.
[0004] 2) The invention patent with publication number "CN112558023A" and subject name "Sensor calibration method and device" proposes a method that does not require road closures. Specifically, the mapping relationship between sensors is established through high-precision maps. However, there are often no high-precision maps for reference on actual roads.
[0005] 3) The invention patent with publication number "CN112836737A" and subject name "A method for online calibration of roadside combined perception equipment based on vehicle-road data fusion", as well as the invention patent with publication number "WO2022206978A1" and subject name "A method for calibration of roadside millimeter-wave radar based on vehicle-mounted positioning device", both propose technical solutions for calculating sensor mapping relationships by providing calibration target data through vehicle-mounted high-precision positioning equipment, but require relatively expensive professional equipment to record and feedback data in real time, and also require the vehicle equipped with the positioning equipment to drive multiple times within the detection range to complete the calibration. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to address the deficiencies of the existing technology and specifically provide a method and system for calibrating the conversion relationship between two roadside sensors, as follows:
[0007] 1) In a first aspect, the present invention provides a method for calibrating a conversion relationship between two roadside sensors. The specific technical solution is as follows:
[0008] S1. After time alignment of a first preset roadside sensor and a second preset roadside sensor, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in a corresponding coordinate system at the same time;
[0009] S2. Determine whether the number of preset targets is less than 4, and obtain a first determination result;
[0010] S3. When the first judgment result is no, calculating a current homography transformation matrix according to all currently obtained position coordinates;
[0011] S4. Convert the position coordinates obtained by using the second preset roadside sensor to the coordinate system used by the first preset roadside sensor according to the current homography transformation matrix to obtain converted position coordinates of each preset target;
[0012] S5. Calculate an error distance between the converted position coordinates of each preset target and the position coordinates obtained by using the first preset roadside sensor, and determine whether the error distance is less than a preset error distance threshold to obtain a second determination result;
[0013] S6. When the second judgment result is yes, determine the current homography transformation matrix as the final homography transformation matrix.
[0014] The beneficial effects of the method for calibrating the conversion relationship between two roadside sensors provided by the present invention are as follows:
[0015] The target position coordinates obtained by any roadside sensor are the coordinates of the coordinate system used by that roadside sensor. In practical applications, the target position coordinates obtained by different roadside sensors need to be converted. Since the conversion between the target position coordinates obtained by any two roadside sensors requires the use of the homography transformation matrix corresponding to the two roadside sensors, the accuracy of the homography transformation matrix determines whether the position coordinate conversion is accurate. The present invention can obtain a more accurate homography transformation matrix based on distance judgment. The homography transformation matrix acquisition process is simpler and less costly than existing technologies (for example, invention patents with publication number "CN112836737A" and title "A Method for Online Calibration of Roadside Combined Perception Device Based on Vehicle-Road Data Fusion" and invention patent publication number "WO2022206978A1" and title "A Method for Calibrating Roadside Millimeter-Wave Radar Based on a Vehicle-Mounted Positioning Device"). The final homography transformation matrix can achieve accurate conversion of position coordinates in different coordinate systems (the coordinate systems used by different roadside sensors).
[0016] Based on the above solution, the method for calibrating the conversion relationship between two roadside sensors of the present invention can be further improved as follows.
[0017] Furthermore, it also includes:
[0018] When the second judgment result is no, the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S2 until the second judgment result is yes.
[0019] Furthermore, it also includes:
[0020] When the first judgment result is yes, the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S2 until the first judgment result is no.
[0021] Furthermore, the first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, or the first preset roadside sensor is a radar, and the second preset roadside sensor is a camera device.
[0022] 2) In a second aspect, the present invention further provides a system for calibrating the conversion relationship between two roadside sensors. The specific technical solution is as follows:
[0023] It includes a position coordinate acquisition module, a first judgment module, a homography transformation matrix calculation module, a conversion position coordinate calculation module, a second judgment module and a determination module;
[0024] The position coordinate acquisition module is used to: after time alignment of the first preset roadside sensor and the second preset roadside sensor, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at the same time;
[0025] The first judgment module is used to: judge whether the number of preset targets is less than 4, and obtain a first judgment result;
[0026] The homography transformation matrix calculation module is used to: when the first judgment result is no, calculate the current homography transformation matrix according to all the currently obtained position coordinates;
[0027] The converted position coordinate calculation module is used to: convert the position coordinates obtained by using the second preset roadside sensor into the coordinate system used by the first preset roadside sensor according to the current homography transformation matrix, to obtain the converted position coordinates of each preset target;
[0028] The second judgment module is configured to calculate an error distance between the converted position coordinates of each preset target and the position coordinates obtained by using the first preset roadside sensor, and determine whether the error distance is less than a preset error distance threshold to obtain a second judgment result;
[0029] The determining module is configured to: when the second judgment result is yes, determine the current homography transformation matrix as the final homography transformation matrix.
[0030] Based on the above solution, the system for calibrating the conversion relationship between two roadside sensors of the present invention can be further improved as follows.
[0031] Furthermore, it also includes a calling module, which is used to: when the second judgment result is no, call the position coordinate acquisition module, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then call the first judgment module, the homography transformation matrix calculation module, the conversion position coordinate calculation module and the second judgment module until the second judgment result is yes.
[0032] Furthermore, the calling module is also used to:
[0033] When the first judgment result is yes, the position coordinate acquisition module is called, and the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then the first judgment module is called until the first judgment result is no.
[0034] Furthermore, the first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, or the first preset roadside sensor is a radar, and the second preset roadside sensor is a camera device.
[0035] 3) In a third aspect, the present invention also provides an electronic device, comprising a processor, the processor being coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor so that the electronic device implements any one of the above-mentioned methods for calibrating the conversion relationship between two roadside sensors.
[0036] 4) In a fourth aspect, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to enable a computer to implement any of the above-mentioned methods for calibrating the conversion relationship between two roadside sensors.
[0037] It should be noted that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the present invention and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0039] Figure 1 A schematic flow chart of a method for calibrating a conversion relationship between two roadside sensors according to an embodiment of the present invention;
[0040] Figure 2 Schematic diagram of the structure of a system for calibrating a conversion relationship between two roadside sensors according to an embodiment of the present invention;
[0041] Figure 3 The figure is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0043] like Figure 1 As shown, a method for calibrating a conversion relationship between two roadside sensors according to an embodiment of the present invention includes the following steps:
[0044] S1. After time alignment of a first preset roadside sensor and a second preset roadside sensor, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in a corresponding coordinate system at the same time;
[0045] The area for target tracking using the first preset roadside sensor and the second preset roadside sensor may be set according to actual conditions, such as a designated road area.
[0046] Among them, the position coordinates of the target obtained by the first preset roadside sensor are the coordinates in the coordinate system used by the first preset roadside sensor, and the position coordinates of the target obtained by the second preset roadside sensor are the coordinates in the coordinate system used by the second preset roadside sensor. The coordinate system used by the first preset roadside sensor can be established according to actual conditions, and the coordinate system used by the second preset roadside sensor can also be established according to actual conditions.
[0047] The preset goals are explained as follows:
[0048] A first preset roadside sensor and a second preset roadside sensor are used to detect targets in the same area. N targets are monitored by the first preset roadside sensor, and M targets are monitored by the second preset roadside sensor. Multiple identical targets can be selected from the N targets and the M targets as preset targets. For example, n preset targets are selected. When N=M, all targets can be used as preset targets. At this time, N=M=n, and N, M, and n are all positive integers.
[0049] S2. Determine whether the number of preset targets is less than 4, and obtain a first determination result;
[0050] S3. When the first judgment result is no, calculating a current homography transformation matrix according to all currently obtained position coordinates;
[0051] In S3, all the currently obtained position coordinates refer to the position coordinates of each preset target in the corresponding coordinate system obtained by monitoring at the same time in S1.
[0052] S4. Convert the position coordinates obtained by using the second preset roadside sensor to the coordinate system used by the first preset roadside sensor according to the current homography transformation matrix to obtain converted position coordinates of each preset target;
[0053] S5. Calculate an error distance between the converted position coordinates of each preset target and the position coordinates obtained by using the first preset roadside sensor, and determine whether the error distance is less than a preset error distance threshold to obtain a second determination result;
[0054] S6. When the second judgment result is yes, determine the current homography transformation matrix as the final homography transformation matrix.
[0055] The final homography transformation matrix represents the transformation relationship between the first preset roadside sensor and the second preset roadside sensor. Through the final homography transformation matrix, the position coordinates in the coordinate system used by the first preset roadside sensor can be accurately converted to the coordinate system used by the second preset roadside sensor, and the position coordinates in the coordinate system used by the second preset roadside sensor can also be accurately converted to the coordinate system used by the first preset roadside sensor.
[0056] Optionally, in the above technical solution, the following is further included:
[0057] S7. When the second judgment result is no, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S2 until the second judgment result is yes.
[0058] Optionally, in the above technical solution, the following is further included:
[0059] When the first judgment result is yes, the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S2 until the first judgment result is no.
[0060] The other same moment refers to a moment other than the same moment in S1, and the duration between the other same moment and the same moment in S1 can be set according to actual conditions.
[0061] Optionally, in the above technical solution, the first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, or the first preset roadside sensor is a radar, and the second preset roadside sensor is a camera device.
[0062] The imaging device may be a camera, the radar may be a millimeter wave radar, or other radars may be selected according to actual conditions.
[0063] The present invention is illustrated by the following examples.
[0064] In this embodiment, the first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, specifically including:
[0065] S101: After time alignment of the camera device and the radar, the camera device and the radar are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at the same time;
[0066] Both the camera and the radar are installed on the roadside. The monitoring areas of the camera and the radar mostly overlap. Targets such as vehicles or pedestrians generally move along the road. What is detected by the radar is the target point, which moves evenly. The camera outputs video. Although the target does not move evenly, it often moves from near to far, from large to small, or from far to near, from small to large.
[0067] Based on the patterns of target entry, exit, movement, disappearance, and distribution, the corresponding relationships between targets detected by the camera and radar are found (multiple identical targets detected by the camera and radar). The camera and radar are then paused, and the target detected by the radar and the corresponding target in the image are manually selected (that is, the identical target detected by the camera and radar is selected).
[0068] All goals can be set as preset goals, or some goals can be selected from all goals as preset goals. They can be set according to actual conditions.
[0069] S102, determining whether the number of preset targets is less than 4, obtaining a first determination result, and executing S103 when the first determination result is yes, and executing S104 when the first determination result is no;
[0070] S103, using the camera device and the radar to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then returning to S102 to execute until the first judgment result is no;
[0071] S104, calculating the current homography transformation matrix according to all the currently obtained position coordinates;
[0072] The set of position coordinates of each preset target obtained by the camera device is recorded as P V , the set of all position coordinates of each preset target obtained by radar is recorded as P R , when N≥4, based on P V The position coordinates of each preset target and P R The position coordinates of each preset target in , and the least squares method and RANSAC algorithm are used to calculate the current homography transformation matrix, where N represents the number of preset targets.
[0073] S105, according to the current homography transformation matrix, P R The position coordinates of each preset target in the image are converted to the coordinate system used by the camera (i.e., P V The position coordinates of each preset target in the coordinate system are obtained, and the set of the converted position coordinates of each preset target is recorded as P T , P T The converted position coordinates of each preset target are displayed in the image captured by the camera device.
[0074] The process of calculating the transformed position coordinates of each preset target is as follows:
[0075] The coordinate system used by the radar (that is, P R Any position coordinate in the coordinate system where the position coordinates of each preset target are located is marked as: (x ′ ,y ′ ), (x ′ ,y ′ ) Get (x ′ ,y ′ ) in the coordinate system used by the camera device, i.e., the converted position coordinate (u ′ ,v ′ ) until the conversion position coordinates of each preset target are calculated, where is the current homography transformation matrix, h 00 、h 01 、h 02 、h 10 、h 11 、h 12 、h 20 、h 21 and h 22 is the element in the current homography transformation matrix, and s represents the coefficient of the homogeneous coordinate.
[0076] S106. Calculate the error distance between the converted position coordinates of each preset target and the position coordinates obtained using the camera device, and determine whether the error distance is less than a preset error distance threshold to obtain a second judgment result. When the second judgment is yes, execute S107. When the second judgment is yes, execute S108.
[0077] The calculation of the error distance between the converted position coordinates of each preset target and the position coordinates obtained by the camera device is specifically implemented as follows:
[0078] The distance error is calculated using the distance error calculation formula. The distance error calculation formula is:
[0079]
[0080] Among them, dist represents: distance error, Indicates: P T The transformed position coordinates of the i-th preset target in, Indicates: P V The transformed position coordinates of the i-th preset target in, and Corresponding to the same preset target, that is, P T The i-th preset target and P V The i-th preset target in is the same target, i is a positive integer, i = 1, 2, 3...N.
[0081] The preset error distance threshold can be set according to actual conditions.
[0082] S107: Determine the current homography transformation matrix as the final homography transformation matrix. At this time, use the time-aligned camera and radar to track the target. The position coordinates of the same target monitored at any same time in the corresponding coordinate system satisfy: Among them, the position coordinates in the coordinate system used by the camera device are (u, v), and the position coordinates in the coordinate system used by the radar are (x, y), and (u, v) and (x, y) are: the position coordinates of the same target monitored by the camera device and radar after time alignment at any same time.
[0083] S108. Utilize the camera device and the radar to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S102 until the second judgment result is yes.
[0084] The distance between the converted position coordinates of each preset target and the position coordinates obtained by the camera device can also be determined by manual experience. If the distances are both close, execute S107; if one of the distances is both far, return to execute S102.
[0085] The beneficial effects of the present invention are as follows:
[0086] The target position coordinates obtained by any roadside sensor are the coordinates of the coordinate system used by that roadside sensor. In practical applications, the target position coordinates obtained by different roadside sensors need to be converted. Since the conversion between the target position coordinates obtained by any two roadside sensors requires the use of the homography transformation matrix corresponding to the two roadside sensors, the accuracy of the homography transformation matrix determines whether the position coordinate conversion is accurate. The present invention can obtain a more accurate homography transformation matrix based on distance judgment. The homography transformation matrix acquisition process is simpler and less costly than existing technologies (for example, invention patents with publication number "CN112836737A" and title "A Method for Online Calibration of Roadside Combined Perception Device Based on Vehicle-Road Data Fusion" and invention patent publication number "WO2022206978A1" and title "A Method for Calibrating Roadside Millimeter-Wave Radar Based on a Vehicle-Mounted Positioning Device"). Using the homography transformation matrix, precise conversion of position coordinates in different coordinate systems (the coordinate systems used by different roadside sensors) can be achieved.
[0087] In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art may adjust the execution order of S1, S2, etc. according to actual conditions, which is also within the scope of protection of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.
[0088] like Figure 2 As shown, a system 200 for calibrating a conversion relationship between two roadside sensors according to an embodiment of the present invention includes a position coordinate acquisition module 201, a first judgment module 202, a homography transformation matrix calculation module 203, a conversion position coordinate calculation module 204, a second judgment module 205, and a determination module 206;
[0089] The position coordinate acquisition module 201 is used to: after time alignment of the first preset roadside sensor and the second preset roadside sensor, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at the same time;
[0090] The first judgment module 202 is used to: judge whether the number of preset targets is less than 4, and obtain a first judgment result;
[0091] The homography transformation matrix calculation module 203 is used to: when the first judgment result is no, calculate the current homography transformation matrix according to all the currently obtained position coordinates;
[0092] The converted position coordinate calculation module 204 is used to: convert the position coordinates obtained by using the second preset roadside sensor into the coordinate system used by the first preset roadside sensor according to the current homography transformation matrix, to obtain the converted position coordinates of each preset target;
[0093] The second judgment module 205 is configured to calculate an error distance between the converted position coordinates of each preset target and the position coordinates obtained by the first preset roadside sensor, and determine whether the error distance is less than a preset error distance threshold to obtain a second judgment result;
[0094] The determining module 206 is configured to: when the second judgment result is yes, determine the current homography transformation matrix as the final homography transformation matrix.
[0095] Optionally, the above technical solution also includes a calling module, which is used to: when the second judgment result is no, call the position coordinate acquisition module 201, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then call the first judgment module 202, the homography transformation matrix calculation module 203, the conversion position coordinate calculation module 204 and the second judgment module 205 until the second judgment result is yes.
[0096] Optionally, in the above technical solution, the calling module is further used to:
[0097] When the first judgment result is yes, the position coordinate acquisition module 201 is called, and the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then the first judgment module 202 is called until the first judgment result is no.
[0098] Optionally, in the above technical solution, the first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, or the first preset roadside sensor is a radar, and the second preset roadside sensor is a camera device.
[0099] It should be noted that the beneficial effects of the system 200 for calibrating the conversion relationship between two roadside sensors provided in the above embodiment are the same as the beneficial effects of the method for calibrating the conversion relationship between two roadside sensors, and will not be repeated here. In addition, when implementing its functions, the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0100] like Figure 3 As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320, which is coupled to a memory 310. The memory 310 stores at least one computer program 330. The at least one computer program 330 is loaded and executed by the processor 320 to enable the electronic device 300 to implement any of the above-mentioned methods for calibrating a conversion relationship between two roadside sensors. Specifically:
[0101] The electronic device 300 may vary significantly due to different configurations or performance, and may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, which is loaded and executed by the one or more processors 320 to enable the electronic device 300 to implement any of the methods for calibrating the conversion relationship between two roadside sensors provided in the above embodiments. Of course, the electronic device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The electronic device 300 may also include other components for implementing device functions, which will not be detailed here. The electronic device may specifically be a computer, etc.
[0102] The computer-readable storage medium of an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor to enable the computer to implement any of the above-mentioned methods for calibrating the conversion relationship between two roadside sensors.
[0103] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0104] In an exemplary embodiment, a computer program product or computer program is also provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the aforementioned methods for calibrating a conversion relationship between two roadside sensors.
[0105] It should be noted that the terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects and to define a specific order or precedence. Where appropriate, the order used for similar objects may be interchanged, such that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0106] Those skilled in the art will appreciate that the present invention may be implemented as a system, method, or computer program product. Therefore, the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may be implemented in the form of a computer program product embodied in one or more computer-readable media containing computer-readable program code.
[0107] Any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer 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 thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0108] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A method for calibrating the conversion relationship between two roadside sensors, characterized in that: include: S1. After time alignment of a first preset roadside sensor and a second preset roadside sensor, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in a corresponding coordinate system at the same time; S2. Determine whether the number of preset targets is less than 4, and obtain a first determination result; S3. When the first judgment result is no, calculating a current homography transformation matrix according to all currently obtained position coordinates; The set of position coordinates of each preset target obtained by the first preset roadside sensor is recorded as P V , the set of all position coordinates of each preset target obtained by the second preset roadside sensor is recorded as P R , when N≥4, based on P V The position coordinates of each preset target and P R The position coordinates of each preset target in , and the least squares method and RANSAC algorithm are used to calculate the current homography transformation matrix; S4. Convert the position coordinates obtained by using the second preset roadside sensor to the coordinate system used by the first preset roadside sensor according to the current homography transformation matrix to obtain converted position coordinates of each preset target; The coordinates of any position in the coordinate system used by the second preset roadside sensor are marked as: (x ′ ,y ′ ), (x ′ ,y ′ ) Get (x ′ ,y ′ ) is the position coordinate in the coordinate system used by the first preset roadside sensor, that is, the converted position coordinate (u ′ ,v ′ ) until the conversion position coordinates of each preset target are calculated, where is the current homography transformation matrix, h 00 、h 01 、h 02 、h 10 、h 11 、h 12 、h 20 、h 21 and h 22 is the element in the current homography transformation matrix, and s represents the coefficient of the homogeneous coordinate; S5. Calculate an error distance between the converted position coordinates of each preset target and the position coordinates obtained by using the first preset roadside sensor, and determine whether the error distance is less than a preset error distance threshold to obtain a second determination result; The distance error is calculated using the distance error calculation formula. The distance error calculation formula is: Among them, dist represents: distance error, Indicates: P T The transformed position coordinates of the i-th preset target in, Indicates: P V The transformed position coordinates of the i-th preset target in, and Corresponding to the same preset target, that is, P T The i-th preset target and P V The i-th preset target in is the same target, i is a positive integer, i = 1, 2, 3...N; S6. When the second judgment result is yes, determine the current homography transformation matrix as the final homography transformation matrix; The target is tracked using the time-aligned first preset roadside sensor and the second preset roadside sensor. The position coordinates of the same target monitored at any same time in the corresponding coordinate system satisfy: Among them, the position coordinates in the coordinate system used by the first preset roadside sensor are (u, v), the position coordinates in the coordinate system used by the second preset roadside sensor are (x, y), and (u, v) and (x, y) are: the position coordinates of the same target monitored by the first preset roadside sensor and the second preset roadside sensor after time alignment at any same time.
2. A method for calibrating a conversion relationship between two roadside sensors according to claim 1, characterized in that: Also includes: When the second judgment result is no, the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S2 until the second judgment result is yes.
3. The method for calibrating the conversion relationship between two roadside sensors according to claim 2, characterized in that: Also includes: When the first judgment result is yes, the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then return to execute S2 until the first judgment result is no.
4. A method for calibrating a conversion relationship between two roadside sensors according to any one of claims 1 to 3, characterized in that: The first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, or the first preset roadside sensor is a radar, and the second preset roadside sensor is a camera device.
5. A system for calibrating the conversion relationship between two roadside sensors, characterized in that: It includes a position coordinate acquisition module, a first judgment module, a homography transformation matrix calculation module, a conversion position coordinate calculation module, a second judgment module and a determination module; The position coordinate acquisition module is used to: after time alignment of the first preset roadside sensor and the second preset roadside sensor, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at the same time; The first judgment module is used to: judge whether the number of preset targets is less than 4, and obtain a first judgment result; The homography transformation matrix calculation module is used to: when the first judgment result is no, calculate the current homography transformation matrix according to all the currently obtained position coordinates; The set of position coordinates of each preset target obtained by the first preset roadside sensor is recorded as P V , the set of all position coordinates of each preset target obtained by the second preset roadside sensor is recorded as P R , when N≥4, based on P V The position coordinates of each preset target and P R The position coordinates of each preset target in , and the least squares method and RANSAC algorithm are used to calculate the current homography transformation matrix; The converted position coordinate calculation module is used to: convert the position coordinates obtained by using the second preset roadside sensor into the coordinate system used by the first preset roadside sensor according to the current homography transformation matrix, to obtain the converted position coordinates of each preset target; The coordinates of any position in the coordinate system used by the second preset roadside sensor are marked as: (x ′ ,y ′ ), (x ′ ,y ′ ) Get (x ′ ,y ′ ) is the position coordinate in the coordinate system used by the first preset roadside sensor, that is, the converted position coordinate (u ′ ,v ′ ) until the conversion position coordinates of each preset target are calculated, where is the current homography transformation matrix, h 00 、h 01 、h 02 、h 10 、h 11 、h 12 、h 20 、h 21 and h 22 is the element in the current homography transformation matrix, and s represents the coefficient of the homogeneous coordinate; The second judgment module is configured to calculate an error distance between the converted position coordinates of each preset target and the position coordinates obtained by using the first preset roadside sensor, and determine whether the error distance is less than a preset error distance threshold to obtain a second judgment result; The distance error is calculated using the distance error calculation formula. The distance error calculation formula is: Among them, dist represents: distance error, Indicates: P T The transformed position coordinates of the i-th preset target in, Indicates: P V The transformed position coordinates of the i-th preset target in, and Corresponding to the same preset target, that is, P T The i-th preset target and P V The i-th preset target in is the same target, i is a positive integer, i = 1, 2, 3...N; The determining module is configured to: when the second judgment result is yes, determine the current homography transformation matrix as the final homography transformation matrix; The target is tracked using the time-aligned first preset roadside sensor and the second preset roadside sensor. The position coordinates of the same target monitored at any same time in the corresponding coordinate system satisfy: Among them, the position coordinates in the coordinate system used by the first preset roadside sensor are (u, v), the position coordinates in the coordinate system used by the second preset roadside sensor are (x, y), and (u, v) and (x, y) are: the position coordinates of the same target monitored by the first preset roadside sensor and the second preset roadside sensor after time alignment at any same time.
6. A system for calibrating a conversion relationship between two roadside sensors according to claim 5, characterized in that: It also includes a calling module, which is used to: when the second judgment result is no, call the position coordinate acquisition module, use the first preset roadside sensor and the second preset roadside sensor to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then call the first judgment module, the homography transformation matrix calculation module, the conversion position coordinate calculation module and the second judgment module until the second judgment result is yes.
7. The system for calibrating the conversion relationship between two roadside sensors according to claim 6, characterized in that: The calling module is also used for: When the first judgment result is yes, the position coordinate acquisition module is called, and the first preset roadside sensor and the second preset roadside sensor are used to monitor and obtain the position coordinates of each preset target in the corresponding coordinate system at another same time, and then the first judgment module is called until the first judgment result is no.
8. A system for calibrating a conversion relationship between two roadside sensors according to any one of claims 5 to 7, characterized in that: The first preset roadside sensor is a camera device, and the second preset roadside sensor is a radar, or the first preset roadside sensor is a radar, and the second preset roadside sensor is a camera device.
9. An electronic device, characterized in that The electronic device includes a processor, the processor is coupled to a memory, and the memory stores at least one computer program. The at least one computer program is loaded and executed by the processor so that the electronic device implements a method for calibrating the conversion relationship between two roadside sensors as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement a method for calibrating a conversion relationship between two roadside sensors as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Calibration method and system based on millimeter-wave radar and camera sensor fusion
CN111383285A
Sensor calibration method and device
CN112558023A
Roadside combined sensing equipment online calibration method based on vehicle-road data fusion
CN112836737A
Roadside millimeter-wave radar calibration method based on vehicle-mounted positioning apparatus
WO2022206978A1