Rectangular ground feature rectification method, system, equipment and medium in automatic driving
By redesigning the coordinates of the target rectangle and adjusting its diagonal length in autonomous driving, the problem of improving the accuracy of rectangular land objects is solved, and high-precision rectangular land objects are achieved, suitable for novices to operate and meet intelligent driving data accuracy requirements.
Patent Information
- Application Number
- CN202411130585.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-26
AI Technical Summary
The prior art is difficult to improve the accuracy of rectangular land objects in autonomous driving, especially for novices and low-level equipment, which is difficult to meet the requirements of high-precision intelligent driving and simulation.
By reading terrain data, redesign the coordinates of the target rectangle, adjust its diagonal length and calculate the minimum mean square variance until the preset threshold is reached, and the precise finishing of the rectangular land is achieved.
The accuracy of land objects is improved, with the maximum error less than 1cm and the average error is close to 3mm, meeting the sub-centimeter specification requirements of Zhihua data and reducing the requirements for equipment and experience.
Smart Images

Figure CN119027627A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of autonomous driving, and specifically includes a method, system, equipment and medium for rectifying rectangular objects in autonomous driving. Background Art
[0002] In the autonomous driving map in the navigation data, rectangular features are often collected from the 3D laser point cloud. Since rectangular road signs have rounded corners to a certain extent, the laser point cloud cannot completely collect the corners of the rectangular road signs, and because the thickness of the road signs cannot be ignored, in order to collect accurately, the rectangular features need to be tidied after manual collection.
[0003] The existing technology is to directly draw from the point cloud file manually or use data recognition, and then directly apply the results obtained, which lacks means and methods to improve the accuracy of the results. Therefore, the accuracy of the result coordinates depends entirely on the acquisition accuracy and operation accuracy of the point cloud. If the accuracy is to be improved, it can only be required and improved in these two aspects. This requires relatively high equipment and experience. It is difficult for novices to work at a high level as quickly as possible, and low-level equipment is also difficult to meet the requirements of high-precision intelligent driving and simulation.
[0004] Therefore, there is an urgent need for a method that can improve the accuracy of collecting ground objects and is suitable for novice operators. Summary of the invention
[0005] The present invention provides a method, system, device and medium to solve the problem that it is difficult to improve the accuracy of collecting ground objects in the prior art.
[0006] To achieve the above object, the present invention proposes the following technical solutions:
[0007] A method for rectifying rectangular objects in automatic driving comprises the following steps:
[0008] Step 1, read the terrain data, obtain the initial rectangle, and draw the target rectangle based on the initial rectangle;
[0009] Step 2, determine whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle, if yes, go to step 4, if not, go to step 3;
[0010] Step 3, adjust the center coordinates of the target rectangle in the order of up, down, left, right, front and back, increase the diagonal length of the target rectangle by one unit, and return to step 2;
[0011] Step 4, calculate the minimum mean square error between the target rectangle and the corresponding corner points of the initial matrix, and determine whether the minimum mean square error is less than a preset threshold. If so, end the rectification; if not, increase the diagonal length by one unit and return to step 2.
[0012] Preferably, four corner points are set and an initial rectangle is drawn based on the four corner points.
[0013] Preferably, the target rectangle is a rectangle.
[0014] Preferably, the midpoint coordinates of the target rectangle are the coordinates of the middle point between the midpoints on the two diagonals of the initial rectangle.
[0015] Preferably, the length of a diagonal line of the target rectangle is the average value of the sum of the lengths of two diagonal lines of the initial rectangle.
[0016] Preferably, the diagonal length increase unit is millimeter.
[0017] A rectangular terrain rectification system for autonomous driving includes the following modules:
[0018] The terrain reading module is used to read the terrain data, obtain the initial rectangle, calculate the coordinates of the midpoints of the two diagonals, and calculate the middle point of the two midpoints;
[0019] The target rectangle module is used to draw a target rectangle with the middle point as the center and the average of the two diagonals as the diagonal length;
[0020] A corner point determination module, used to implement step 3 described in the above embodiment, calculate the coordinates of the corner points of the initial rectangle, and determine whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle;
[0021] An adjustment module is used to adjust the center coordinates in the order of up, down, left, right, front and back, and increase the diagonal length of the target rectangle by one unit;
[0022] The mean square error calculation module is used to calculate the mean square error of each point to the nearest corner point of the rectangle, record the minimum mean square error, adjust the center coordinates in the order of up, down, left, right, front and back, and determine whether the minimum mean square error is less than a preset threshold.
[0023] An electronic device comprising a memory and a processor;
[0024] Memory for storing computer programs;
[0025] A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for rectifying rectangular objects in automatic driving are implemented.
[0026] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a method for straightening rectangular features in automatic driving are implemented.
[0027] The present invention is beneficial in that:
[0028] The present invention proposes a method for rectifying rectangular features in autonomous driving, which optimizes coordinates based on the original collection results, redesigns the target rectangle based on the initial rectangle, and makes a rationality judgment on the coordinate data of the target rectangle based on needs, thereby obtaining an accurate result that meets the needs. Based on this, the accuracy of collecting features is improved, and intelligent driving can also perform more reasonable road planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0030] Figure 1 The figure is a flow chart of a rectangular terrain arrangement method in autonomous driving;
[0031] Figure 2 The road nameplate described in the embodiment;
[0032] Figure 3 Draw a schematic diagram of the results for the prior art;
[0033] Figure 4 Draw a schematic diagram of the results of this method;
[0034] Figure 5 A schematic diagram of an electronic device. DETAILED DESCRIPTION
[0035] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0036] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.
[0037] Embodiment 1:
[0038] See also Figure 1 As shown, the present invention provides a method for rectifying rectangular objects in automatic driving, which specifically includes the following steps:
[0039] Step 1, read the terrain data, get the initial rectangle, calculate the coordinates of the midpoints of the two diagonals respectively, and calculate the middle point of the two midpoints (the coordinates of the four corner points of the rectangle are (x0, y0, z0), (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), the coordinates of the midpoints of the two diagonals are as follows:
[0040] and
[0041] The coordinates of the midpoint between the two midpoints are as follows:
[0042]
[0043] Step 2, draw a rectangular target rectangle with the middle point as the center and the average value of the two diagonals as the diagonal length; the target rectangle has its coordinates optimized based on the original collection results, and compared with the initial rectangle, it can better serve the regularity of the collected objects and improve the accuracy.
[0044] Specifically:
[0045]
[0046]
[0047]
[0048] L 02 and l 13 is the length of the two diagonals of the initial matrix, and l is the length of the diagonal of the target matrix.
[0049] Step 3, calculate the coordinates of the corner points of the target rectangle, and determine whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle. If so, proceed to step 4, otherwise proceed to step 5; determine the range of the target rectangle, confirm whether the target rectangle includes the initial rectangle, and confirm the coordinate optimization result.
[0050] The formula for calculating the coordinates of the four corner points of the initial rectangle is:
[0051]
[0052]
[0053]
[0054]
[0055] The formula for determining whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle is:
[0056]
[0057] Step 4: Adjust the center coordinates in the order of up, down, left, right, front and back. Increase the diagonal length of the target rectangle by one unit and return to step 3.
[0058] Step 5, calculate the mean square error from each corner point of the target matrix to the corresponding corner point on the initial rectangle, record the minimum mean square error, adjust the center coordinates in the order of up, down, left, right, front and back, and determine whether the minimum mean square error is less than the preset threshold. If so, end the adjustment; if not, increase the diagonal length by one unit (the unit can be adapted to the change according to the point cloud accuracy, temporarily in millimeters), and return to step 3.
[0059] The formula for calculating the mean square error is:
[0060] Where n = 0, 1, 2, 3;
[0061]
[0062] In a specific implementation, the corner point on the initial rectangle corresponding to the corner point of the target matrix is the corner point that is closest to the corner point of the target matrix.
[0063] The present invention performs coordinate optimization based on the original acquisition results. By comparing with the actual objects, the maximum error is less than 1 cm and the average error is close to 3 mm, which are much higher than the maximum error of 6 cm and the average error of 3 cm before coordinate optimization, and are more in line with the sub-centimeter specifications required by intelligent driving data.
[0064] by Figure 2 Taking the road nameplate shown in the figure as an example, it can be seen that the point cloud in the upper left corner is missing and the point cloud shadow in the lower left corner is large, which will inevitably cause inaccurate collection and drawing results. Figure 3 If this method is used, coordinate optimization is performed on the basis of the initial rectangle to find the target rectangle, and as described above, the target matrix as the result of coordinate optimization is repeatedly confirmed until it is confirmed that the target matrix meets various requirements including the mean square error threshold, then the following can be obtained: Figure 4 result.
[0065] Embodiment 2:
[0066] The present invention provides a rectangular terrain rectification system in automatic driving, which specifically comprises:
[0067] A terrain reading module, used to implement step 1 described in the above embodiment, read terrain data, obtain an initial rectangle, calculate the coordinates of the midpoints of the two diagonals respectively, and calculate the middle point of the two midpoints;
[0068] A target rectangle module is used to implement step 2 described in the above embodiment, and draw a target rectangle with the middle point as the center and the average value of the two diagonals as the diagonal length;
[0069] A corner point determination module, used to implement step 3 described in the above embodiment, calculate the coordinates of the corner points of the initial rectangle, and determine whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle;
[0070] An adjustment module, used to implement step 4 of the above embodiment, adjust the center coordinates in the order of up, down, left, right, front and back, and increase the diagonal length of the target rectangle by one unit;
[0071] The mean square error calculation module is used to implement step 5 described in the above embodiment, calculate the mean square error of each point to the nearest corner point of the rectangle, record the minimum mean square error, adjust the center coordinates in the order of up, down, left, right, front and back, and determine whether the minimum mean square error is less than a preset threshold.
[0072] Embodiment 3:
[0073] See also Figure 3 As shown, the present invention also provides an electronic device 100; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0074] The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of the method for rectifying rectangular objects in automatic driving described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0075] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0076] Embodiment 4:
[0077] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0078] The present invention performs coordinate optimization based on the original acquisition results. By comparing with the actual objects, the maximum error is less than 1 cm and the average error is close to 3 mm, which is much higher than the maximum error of 6 cm and the average error of 3 cm before coordinate optimization, and is more in line with the sub-centimeter specifications required by intelligent driving data.
[0079] It is known from common technical knowledge that the present invention can be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the above disclosed embodiments are only illustrative in all respects and are not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are included in the present invention.
[0080] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0082] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for rectifying rectangular objects in automatic driving, characterized in that: The steps include: Step 1, read the terrain data, obtain the initial rectangle, and draw the target rectangle based on the initial rectangle; Step 2: Determine whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle. If yes, proceed to step 4; otherwise, proceed to step 3. Step 3, adjust the center coordinates of the target rectangle in the order of up, down, left, right, front and back, increase the diagonal length of the target rectangle by one unit, and return to step 2; Step 4, calculate the minimum mean square error between the target rectangle and the corresponding corner points of the initial matrix, and determine whether the minimum mean square error is less than a preset threshold. If so, end the rectification; If not, increase the diagonal length by one unit and return to step 2.
2. The method for rectifying rectangular objects in automatic driving according to claim 1, characterized in that: Set four corner points and draw the initial rectangle based on the four corner points.
3. The method for rectifying rectangular features in automatic driving according to claim 1, characterized in that: The target rectangle is a rectangle.
4. The method for rectifying rectangular objects in automatic driving according to claim 3, characterized in that: The midpoint coordinates of the target rectangle are the coordinates of the middle point between the midpoints on the two diagonals of the initial rectangle.
5. The method for rectifying rectangular objects in automatic driving according to claim 3, characterized in that: The length of a diagonal line of the target rectangle is the average value of the sum of the lengths of the two diagonals of the initial rectangle.
6. The method for rectifying rectangular objects in automatic driving according to claim 1, characterized in that: The unit of the diagonal length increase is millimeters.
7. A rectangular terrain rectification system in automatic driving, characterized in that: Includes the following modules: The terrain reading module is used to read the terrain data, obtain the initial rectangle, calculate the coordinates of the midpoints of the two diagonals, and calculate the middle point of the two midpoints; The target rectangle module is used to draw a target rectangle with the middle point as the center and the average of the two diagonals as the diagonal length; A corner point determination module, used to implement step 3 described in the above embodiment, calculate the coordinates of the corner points of the initial rectangle, and determine whether the coordinates of the four corner points of the initial rectangle are inside the target rectangle; An adjustment module is used to adjust the center coordinates in the order of up, down, left, right, front, and back, and increase the diagonal length of the target rectangle by one unit; The mean square error calculation module is used to calculate the mean square error of each point to the nearest corner point of the rectangle, record the minimum mean square error, adjust the center coordinates in the order of up, down, left, right, front and back, and determine whether the minimum mean square error is less than a preset threshold.
8. An electronic device, characterized in that: including memory and processor; Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for straightening rectangular features in autonomous driving as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of a rectangular terrain arrangement method in autonomous driving are implemented as described in any one of claims 1 to 6.
