Point cloud data correction method, device, electronic device and storage medium

By screening and fitting the point cloud data, the rotation matrix is ​​determined to correct the point cloud data, which solves the problem of coordinate system deviation of point cloud data collection equipment in the logistics industry, and enables accurate monitoring of the volume of goods in the carriage and assessment of installation quality.

CN113870119BActive Publication Date: 2024-09-17JIQI CHENGDU TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111196481.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2024-09-17
Estimated Expiration
2041-10-14

AI Technical Summary

Technical Problem

In the logistics industry, point cloud data collection equipment cannot fully control the angle between the coordinate system of the lidar or TOF camera and the coordinate system of the carriage wall. As a result, the collected point cloud data cannot be standardized and the installation quality and cargo volume cannot be monitored.

Method used

Through multiple sample point screening of the original point cloud data, the target point set and fitting plane are determined, the bottom and far side of the carriage are determined, the rotation matrix is ​​constructed using the origin projection, and the point cloud data is corrected to match the carriage coordinate system.

Benefits of technology

It realizes the offset correction of point cloud data, can accurately display the cargo volume and monitor the installation quality in the carriage coordinate system, and solves the problem that point cloud data cannot be standardized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113870119B
    Figure CN113870119B
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for correcting point cloud data, which obtains the original point cloud data in the car in an empty state; determines the first target point set and the second target point set from the original point cloud data; performs fitting processing to obtain the first fitting plane corresponding to the first target point set and the second fitting plane corresponding to the second target point set; determines the bottom surface and the far side surface from the first fitting plane and the second fitting plane; respectively determines the first projection point of the coordinate origin in the bottom surface and the second projection point in the far side surface; determines the target rotation matrix based on the coordinate origin, the first projection point, the second projection point, the first preset target point and the second preset target point; determines the corrected target point cloud data based on the target rotation matrix. In this way, the present application obtains the target point cloud data by determining the rotation matrix used to correct the original point cloud data, thereby realizing the offset correction of the point cloud data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for correcting point cloud data. Background Art

[0002] In the modern logistics industry, in order to monitor the safety of goods and alarm abnormal events during transportation, it is necessary to monitor the volume of goods in the truck compartment and the rate of change of the volume in real time. The commonly used method is to collect point cloud data in the truck compartment based on LiDAR or TOF camera, and calculate the volume of irregularly placed goods in the compartment in real time.

[0003] However, during the installation of the point cloud acquisition equipment, it is impossible to completely control the angle between the coordinate system of the laser radar or TOF camera and the coordinate system of the carriage with the carriage wall as the coordinate axis plane from the installation method. Due to this deviation angle, the final collected point cloud data cannot be displayed in a standardized 3D format on the front end, and the installation quality and point cloud quality cannot be monitored because the initial angle is unknown. In this way, it is also impossible to directly determine the volume of irregularly placed goods in the carriage based on the point cloud data. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a point cloud data correction method, device, electronic device and storage medium, by determining the rotation matrix used to correct the original point cloud data, to obtain the target point cloud data, thereby realizing the offset correction of the point cloud data.

[0005] The present application provides a method for correcting point cloud data, the method comprising:

[0006] Acquire the original point cloud data in the target compartment collected by the point cloud collection device in an empty compartment state;

[0007] Performing multiple sampling point screening on multiple sampling points in the original point cloud data to determine a first target point set and a second target point set from the original point cloud data;

[0008] Performing fitting processing on the first target point set and the second target point set respectively, to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set;

[0009] Based on the coordinates of each sampling point in the first target point set and the second target point set, determine the bottom surface of the target carriage and the far side surface of the target carriage from the first fitting plane and the second fitting plane; the far side surface is the side surface of the target carriage surface far from the installation position of the point cloud acquisition device;

[0010] Determine respectively a first projection point of the coordinate origin in the bottom surface of the target compartment and a second projection point in the far side surface of the target compartment;

[0011] Determine a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point;

[0012] Based on the original point cloud data and the target rotation matrix, corrected target point cloud data is determined.

[0013] Optionally, the first target point set is determined by the following steps:

[0014] In each screening process, three sampling points are randomly selected from the original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points;

[0015] Determine a first distance from each sampling point in the original point cloud data to the reference plane;

[0016] Based on the sampling points whose first distance is less than the first preset distance threshold, a first candidate point set for this screening is constructed;

[0017] Determine whether the number of sampling points in the first candidate point set is greater than a first preset number, and determine whether the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset number of screening times threshold;

[0018] When the number of sampling points in the first candidate point set is greater than a first preset number and the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset screening number threshold, the first candidate point set is determined as the first target point set.

[0019] Optionally, the second target point set is determined by the following steps:

[0020] Deleting the sampling points in the first target point set from the original point cloud data, and updating the original point cloud data;

[0021] In each screening process, three sampling points are randomly selected from the updated original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points;

[0022] Determine a second distance from each sampling point in the original point cloud data to the reference plane;

[0023] Based on the sampling points whose second distance is less than the second preset distance threshold, a second candidate point set is constructed to obtain the screening;

[0024] Determine whether the number of sampling points in the second candidate point set is greater than a second preset number, and determine whether the corresponding number of screening times when constructing the second candidate point set does not exceed a second preset number of screening times threshold;

[0025] When the number of sampling points in the second candidate point set is greater than a second preset number and the number of screening times when constructing the second candidate point set does not exceed a second preset screening number threshold, the second candidate point set is determined as the second target point set.

[0026] Optionally, determining the bottom surface of the target compartment and the far side surface of the target compartment from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set includes:

[0027] Performing averaging processing on all sampling points in the first target point set and the second target point set respectively, to determine a first mean point of the first target point set and a second mean point of the second target point set;

[0028] Comparing the Y-axis coordinate values ​​of the first mean point and the second mean point;

[0029] The fitting plane corresponding to the mean point with a small Y-axis coordinate value is determined as the bottom surface of the target compartment, and the fitting plane corresponding to the mean point with a large Y-axis coordinate value is determined as the far side surface of the target compartment.

[0030] Optionally, the separately determining a first projection point of the coordinate origin in the first fitting plane and a second projection point in the second fitting plane includes:

[0031] Project the coordinate origin vertically onto the bottom surface of the target carriage to obtain a first projection point;

[0032] The coordinate origin is vertically projected onto the far side of the target carriage to obtain a second projection point.

[0033] Optionally, determining a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point includes:

[0034] A. Select any one of the first projection point or the second projection point as a target projection point, and calculate a candidate rotation matrix corresponding to the target projection point using the Rodrigues rotation formula based on the target projection point, a preset target point corresponding to the target projection point, and the coordinate origin;

[0035] B. Determine whether the number of the candidate rotation matrices reaches a third preset number, if not, execute step C; if yes, execute step D;

[0036] C. Rotate another projection point based on the candidate rotation matrix, use the projection point obtained after the rotation as the target projection point selected in step A, and return to execute step A;

[0037] D. Multiply the obtained third preset number of candidate rotation matrices to obtain a target rotation matrix, and the determination process ends.

[0038] Optionally, when the selected target projection point is the first projection point, the candidate rotation matrix corresponding to the target projection point is calculated using the Rodrigues rotation formula based on the target projection point, a preset target point corresponding to the target projection point, and the coordinate origin, including:

[0039] Determine a first projection vector based on the coordinates of the coordinate origin and the coordinates of the first projection point;

[0040] Determining a first target vector based on the coordinates of the coordinate origin and the coordinates of the first preset target point;

[0041] Based on the first projection vector and the first target vector, determining a rotation angle between the two vectors;

[0042] Based on the first projection vector, the first target vector and the rotation angle, a candidate rotation matrix corresponding to the first projection point is calculated using the Rodrigues rotation formula.

[0043] The present application also provides a point cloud data correction device, the correction device comprising:

[0044] An acquisition module is used to acquire the original point cloud data in the target compartment collected by the point cloud acquisition device in an empty compartment state;

[0045] A point set determination module, used for performing multiple sampling point screening on multiple sampling points in the original point cloud data, and determining a first target point set and a second target point set from the original point cloud data;

[0046] A fitting processing module, used to perform fitting processing on the first target point set and the second target point set respectively, so as to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set by fitting;

[0047] A first determination module is used to determine the bottom surface of the target car and the far side surface of the target car from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set; the far side surface is the side surface of the target car surface far from the installation position of the point cloud acquisition device;

[0048] A second determination module is used to respectively determine a first projection point of the coordinate origin in the bottom surface of the target compartment and a second projection point in the far side surface of the target compartment;

[0049] a target rotation matrix determination module, configured to determine a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point;

[0050] The target point cloud data determination module is used to determine the corrected target point cloud data based on the original point cloud data and the target rotation matrix.

[0051] Optionally, when the point set determination module is used to determine the first target point set, the point set determination module is used to:

[0052] In each screening process, three sampling points are randomly selected from the original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points;

[0053] Determine a first distance from each sampling point in the original point cloud data to the reference plane;

[0054] Based on the sampling points whose first distance is less than the first preset distance threshold, a first candidate point set for this screening is constructed;

[0055] Determine whether the number of sampling points in the first candidate point set is greater than a first preset number, and determine whether the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset number of screening times threshold;

[0056] When the number of sampling points in the first candidate point set is greater than a first preset number and the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset screening number threshold, the first candidate point set is determined as the first target point set.

[0057] Optionally, when the point set determination module is used to determine the second target point set, the point set determination module is used to:

[0058] Deleting the sampling points in the first target point set from the original point cloud data, and updating the original point cloud data;

[0059] In each screening process, three sampling points are randomly selected from the updated original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points;

[0060] Determine a second distance from each sampling point in the original point cloud data to the reference plane;

[0061] Based on the sampling points whose second distance is less than the second preset distance threshold, a second candidate point set is constructed to obtain the screening;

[0062] Determine whether the number of sampling points in the second candidate point set is greater than a second preset number, and determine whether the corresponding number of screening times when constructing the second candidate point set does not exceed a second preset number of screening times threshold;

[0063] When the number of sampling points in the second candidate point set is greater than a second preset number and the number of screening times when constructing the second candidate point set does not exceed a second preset screening number threshold, the second candidate point set is determined as the second target point set.

[0064] Optionally, when the first determination module is used to determine the bottom surface of the target compartment and the far side surface of the target compartment from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set, the first determination module is used to:

[0065] Performing averaging processing on all sampling points in the first target point set and the second target point set respectively, to determine a first mean point of the first target point set and a second mean point of the second target point set;

[0066] Comparing the Y-axis coordinate values ​​of the first mean point and the second mean point;

[0067] The fitting plane corresponding to the mean point with a small Y-axis coordinate value is determined as the bottom surface of the target compartment, and the fitting plane corresponding to the mean point with a large Y-axis coordinate value is determined as the far side surface of the target compartment.

[0068] Optionally, when the second determining module is used to respectively determine a first projection point of the coordinate origin in the first fitting plane and a second projection point in the second fitting plane, the second determining module is used to:

[0069] Project the coordinate origin vertically onto the bottom surface of the target carriage to obtain a first projection point;

[0070] The coordinate origin is vertically projected onto the far side of the target carriage to obtain a second projection point.

[0071] Optionally, when the target rotation matrix determination module is used to determine the target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, the first preset target point corresponding to the first projection point, and the second preset target point corresponding to the second projection point, the target rotation matrix determination module is used to:

[0072] Select any one of the first projection point or the second projection point as a target projection point, and calculate a candidate rotation matrix corresponding to the target projection point using a Rodrigues rotation formula based on the target projection point, a preset target point corresponding to the target projection point, and the coordinate origin;

[0073] Determining whether the number of the candidate rotation matrices reaches a third preset number;

[0074] When the answer is no, another projection point is rotated based on the candidate rotation matrix, and the projection point obtained after the rotation processing is used as the selected target projection point. Based on the target projection point, the preset target point corresponding to the target projection point, and the coordinate origin, the candidate rotation matrix corresponding to the target projection point is calculated using the Rodrigues rotation formula;

[0075] When the answer is yes, the obtained third preset number of candidate rotation matrices are multiplied to obtain the target rotation matrix, and the determination process ends.

[0076] Optionally, when the selected target projection point is the first projection point, the target rotation matrix determination module is used to calculate the candidate rotation matrix corresponding to the target projection point based on the target projection point, the preset target point corresponding to the target projection point, and the coordinate origin using the Rodrigues rotation formula, and the target rotation matrix determination module is used to:

[0077] Determine a first projection vector based on the coordinates of the coordinate origin and the coordinates of the first projection point;

[0078] Determining a first target vector based on the coordinates of the coordinate origin and the coordinates of the first preset target point;

[0079] Based on the first projection vector and the first target vector, determining a rotation angle between the two vectors;

[0080] Based on the first projection vector, the first target vector and the rotation angle, a candidate rotation matrix corresponding to the first projection point is calculated using the Rodrigues rotation formula.

[0081] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the correction method described above are performed.

[0082] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the correction method described above are executed.

[0083] The present application provides a method, device, electronic device and storage medium for correcting point cloud data, the correction method comprising: obtaining original point cloud data in a target compartment collected by a point cloud acquisition device in an empty compartment state; performing multiple sample point screening on multiple sampling points in the original point cloud data, and determining a first target point set and a second target point set from the original point cloud data; performing fitting processing on the first target point set and the second target point set, respectively, to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set; based on the coordinates of each sampling point in the first target point set and the second target point set, The bottom surface of the target car and the far side surface of the target car are determined from the combined plane and the second fitting plane; the far side surface is the side surface of the target car surface far from the installation position of the point cloud acquisition device; the first projection point of the coordinate origin in the bottom surface of the target car and the second projection point in the far side surface of the target car are determined respectively; based on the coordinate origin, the first projection point, the second projection point, the first preset target point corresponding to the first projection point and the second preset target point corresponding to the second projection point, the target rotation matrix for correcting the original point cloud data is determined; based on the original point cloud data and the target rotation matrix, the corrected target point cloud data is determined.

[0084] In this way, the present application first determines the target sampling points by screening the sampling points in the original point cloud data; then obtains two fitting planes by fitting the target sampling points, and determines the bottom surface of the car and the far side surface of the car based on the two fitting planes; then, constructs a rotation vector by projecting the origin on the plane, and uses multiple iterations to calculate the target rotation matrix; finally, corrects the original point cloud data based on the target rotation matrix to obtain target point cloud data consistent with the car coordinate system.

[0085] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0087] Figure 1 A flowchart of a method for correcting point cloud data provided in an embodiment of the present application;

[0088] Figure 2 It is a three-dimensional schematic diagram of the coordinate system;

[0089] Figure 3 A flowchart of a method for determining a target rotation matrix provided in an embodiment of the present application;

[0090] Figure 4 Schematic diagram of the original point cloud;

[0091] Figure 5 A schematic diagram of the structure of a point cloud data correction device provided in an embodiment of the present application;

[0092] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0093] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0094] In the modern logistics industry, in order to monitor the safety of goods and alarm abnormal events during transportation, it is necessary to monitor the volume of goods in the truck compartment and the rate of change of the volume in real time. The commonly used method is to collect point cloud data in the truck compartment based on LiDAR or TOF camera, and calculate the volume of irregularly placed goods in the compartment in real time.

[0095] However, during the installation of the point cloud acquisition equipment, it is impossible to completely control the angle between the coordinate system of the laser radar or TOF camera and the coordinate system of the carriage with the carriage wall as the coordinate axis plane from the installation method. Due to this deviation angle, the final collected point cloud data cannot be displayed in a standardized 3D format on the front end, and the installation quality and point cloud quality cannot be monitored because the initial angle is unknown. In this way, it is also impossible to directly calculate the volume of irregularly placed cargo in the carriage based on the point cloud data.

[0096] Based on this, an embodiment of the present application provides a method for correcting point cloud data, by determining a rotation matrix for correcting the original point cloud data to obtain target point cloud data, thereby achieving offset correction of the point cloud data.

[0097] See also Figure 1 , Figure 1 This is a flow chart of a method for correcting point cloud data provided by an embodiment of the present application. Figure 1 As shown in , the point cloud data correction method provided by the embodiment of the present application includes:

[0098] S101. Acquire original point cloud data in a target compartment collected by a point cloud collection device in an empty compartment state.

[0099] Here, the empty compartment state refers to the state where there are no items or goods in the monitored target compartment; the point cloud acquisition device may include a TOF camera or a laser radar and other devices; the original point cloud data is the remaining data after filtering the point cloud data collected by the point cloud acquisition device with a coordinate value of (0,0,0), and the coordinates of the sampling points in the original point cloud data are the coordinates in the world coordinate system. The compartment coordinate system of the target compartment coincides with the world coordinate system.

[0100] It should be noted that when the point cloud acquisition device is installed at the top corner of the rear of the car, the plane with the most sampling points in the acquired original point cloud data is the bottom of the car and the side of the car that is far away from the point cloud acquisition device. Generally, the sampling points of these two planes account for more than 90% of the total sampling points.

[0101] S102: Perform multiple sampling point screening on multiple sampling points in the original point cloud data to determine a first target point set and a second target point set from the original point cloud data.

[0102] Optionally, the first target point set is determined by the following steps: in each screening process, three sampling points are arbitrarily selected from the original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points; a first distance from each sampling point in the original point cloud data to the reference plane is determined; based on sampling points whose first distance is less than a first preset distance threshold, a first candidate point set for this screening is constructed; it is determined whether the number of sampling points in the first candidate point set is greater than a first preset number, and whether the corresponding number of screenings when constructing the first candidate point set does not exceed a first preset number of screening thresholds; when the number of sampling points in the first candidate point set is greater than the first preset number, and the corresponding number of screenings when constructing the first candidate point set does not exceed the first preset number of screening thresholds, the first candidate point set is determined as the first target point set.

[0103] In this step, firstly, some sampling points that meet the requirements are screened out from the sampling points in the original point cloud data to construct a first target point set. Specifically, the steps of constructing the first target point set include:

[0104] First, in each screening process, according to the principle of determining a plane with three points, three sampling points are randomly selected from multiple sampling points included in the original point cloud data, and the three randomly selected sampling points are determined as reference sampling points. A plane is obtained based on the three reference sampling points, and the obtained plane is determined as the reference plane.

[0105] Here, the point cloud data includes the coordinate values ​​of the sampling points, so the coordinate values ​​of any three reference sampling points can be obtained. In this way, in each screening, the plane equation of the reference plane selected for this screening can be obtained according to the plane equation calculation formula.

[0106] Then, according to the distance calculation formula from point to plane, all sampling points included in the original point cloud data are traversed in each screening, and the distance from each sampling point to the reference plane determined by the screening is determined, which is recorded as the first distance. Here, the distance from the sampling point to the reference plane is the vertical distance.

[0107] Then, multiple sampling points whose first distance is less than the first preset distance threshold are screened out to construct the selected sampling point set, which is recorded as the first candidate point set. Here, the selection of the first preset distance threshold is determined according to the accuracy parameter of the point cloud acquisition device, which is generally set to 3 to 5 cm. The higher the accuracy of the point cloud acquisition device, the closer the preset distance threshold is to 3 cm, and the lower the accuracy of the point cloud acquisition device, the closer the preset distance threshold is to 5 cm.

[0108] Finally, after each screening to obtain the first candidate point set, the number of sampling points included in the first candidate point set is counted to determine whether the number of sampling points included in the first candidate point set is greater than the first preset number, and to determine which screening this time is, and whether the number of screenings exceeds the first preset screening number threshold. When the number of sampling points in the first candidate point set is greater than the first preset number, and the corresponding number of screenings when constructing the first candidate point set does not exceed the first preset screening number threshold, the first candidate point set obtained by this screening is determined as the first target point set, and the screening of the first target point set ends.

[0109] Here, the selection of the first preset number is adaptively selected based on the number of sampling points included in the original point cloud data, and the first preset screening times threshold may also be preset based on experience.

[0110] In addition, if the number of sampling points in the first candidate point set is not greater than the first preset number, but the corresponding number of screening times when constructing the first candidate point set reaches the first preset screening number threshold, the screening of the first target point set is stopped, and the first candidate point set containing the largest number of sampling points among the multiple first candidate point sets obtained by multiple screenings is determined as the first target point set.

[0111] For example, assuming that the original point cloud data includes 10,000 sampling points, the first preset number is set to 4,000, and the first preset screening number threshold is 50. When the number of sampling points contained in the first candidate point set obtained by the first screening is greater than 4,000, the first candidate point set obtained by the first screening is directly determined as the first target point set, and the screening of the first target point set is stopped. However, when the number of sampling points contained in the first candidate point set obtained by the first screening is not greater than 4,000, the reference sampling points are reselected for the second screening, and the screening is repeated by analogy until the number of sampling points in the first candidate point set is greater than the first preset number, or the screening number reaches the preset threshold number, the screening of the first target point set is stopped. For example, when the number of sampling points contained in the first candidate point set obtained by the eighth screening is greater than 4,000, the first candidate point set obtained by the eighth screening is directly determined as the first target point set, and the screening of the first target point set is stopped. However, when the screening reaches the 50th time, the number of sampling points included in the determined first candidate point set is still no more than 4,000, and the number of sampling points included in the first candidate point set obtained by the fifth screening is the largest, so the first candidate point set determined by the fifth screening is determined as the first target point set.

[0112] Optionally, the sampling points in the original point cloud data including the first target point set are deleted, and the original point cloud data is updated; in each screening process, three sampling points are arbitrarily selected from the updated original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points; a second distance from each sampling point in the original point cloud data to the reference plane is determined, and a second candidate point set for this screening is constructed based on sampling points whose second distance is less than a second preset distance threshold; it is determined whether the number of sampling points in the second candidate point set is greater than a second preset number, and whether the corresponding number of screenings when constructing the second candidate point set does not exceed a second preset number of screening thresholds; when the number of sampling points in the second candidate point set is greater than the second preset number, and the number of screenings when constructing the second candidate point set does not exceed the second preset number of screening thresholds, the second candidate point set is determined as the second target point set.

[0113] In this step, after the first target point set is determined, the sampling points in the original point cloud data including the first target point set are deleted, and the remaining original point cloud data is determined as the original point cloud data for filtering the second target point set. The filtering means for determining the first target point set is executed to obtain the second target point set. The specific filtering means have been introduced above and will not be repeated here.

[0114] It should be noted that the basis for determining the second preset distance threshold is the same as the basis for determining the first preset distance threshold, and the two may be the same or different; the second preset number may be the same as or different from the first preset number; the second preset screening times threshold may be the same as or different from the first preset screening times threshold.

[0115] S103, performing fitting processing on the first target point set and the second target point set, respectively, to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set.

[0116] In this step, the least square method is used to fit the first target point set based on the coordinates of all sampling points included in the first target point set, and the first fitting plane corresponding to the first target point set is obtained. Here, the plane equation corresponding to the first fitting plane can also be determined. The least square method is used to fit the second target point set based on the coordinates of all sampling points included in the second target point set, and the second fitting plane corresponding to the second target point set is obtained. Here, the plane equation corresponding to the second fitting plane can also be determined.

[0117] S104. Based on the coordinates of each sampling point in the first target point set and the second target point set, determine the target car bottom surface and the target car far side surface from the first fitting plane and the second fitting plane; the far side surface is the side surface farthest from the car surface set by the point cloud acquisition device.

[0118] Here, the far side of the target car is exemplified. The target car generally includes six faces, namely, the front (carriage face close to the front of the car), the back (carriage face close to the rear of the car), the bottom, the top, the left side and the right side. In order to better collect the point cloud data in the car, the point cloud acquisition device is generally installed at the top corner of the back of the car. When the point cloud acquisition device is installed at the left top corner, the right side is the far side of the target car, and when the point cloud acquisition device is installed at the right top corner, the left side is the far side of the target car. Among them, each car face of the target car can be identified as a flat plane.

[0119] Optionally, the method of determining the bottom surface of the target car and the far side surface of the target car from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set includes: performing averaging processing on all sampling points in the first target point set and the second target point set, respectively, to determine a first mean point of the first target point set and a second mean point of the second target point set; comparing the Y-axis coordinate values ​​of the first mean point and the second mean point; determining the fitting plane corresponding to the mean point with a smaller Y-axis coordinate value as the bottom surface of the target car, and determining the fitting plane corresponding to the mean point with a larger Y-axis coordinate value as the far side surface of the target car.

[0120] In this step, after the first fitting plane and the second fitting plane are determined, which of the first fitting plane and the second fitting plane is the bottom surface of the target car and which is the far side surface of the target car is specifically determined in the following manner.

[0121] First, based on the respective coordinate values ​​of all sampling points included in the first target point set, all sampling points included in the first target point set are averaged to determine a first mean point of the first target point set, and the coordinate value of the first mean point is determined; based on the respective coordinate values ​​of all sampling points included in the second target point set, all sampling points included in the second target point set are averaged to determine a second mean point of the second target point set, and the coordinate value of the second mean point is determined.

[0122] Then, after the coordinate value of the first mean point and the coordinate value of the second mean point are determined, the Y-axis coordinate value in the coordinate value of the first mean point and the Y-axis coordinate value in the coordinate value of the second mean point are compared to obtain a comparison result.

[0123] Finally, the fitting plane corresponding to the mean point with a small Y-axis coordinate value indicated in the comparison result is determined as the bottom surface of the target car, and the fitting plane corresponding to the mean point with a large Y-axis coordinate value is determined as the far side surface of the target car.

[0124] It should be noted that the reason why the Y-axis coordinate value is selected for comparison is determined by the directions of the various indicating axes in the coordinate system. Figure 2 , Figure 2 is a three-dimensional schematic diagram of the coordinate system. The coordinate system here is both the world coordinate system and the car coordinate system, and the origin of the world coordinate system is also the origin of the camera coordinate system (not shown in the figure) corresponding to the point cloud acquisition device. Figure 2 As shown in , it can be seen that the point cloud acquisition device is installed at the right top corner, the X-axis points to the front of the target car, the Y-axis points to the left side of the target car, and the Z-axis points to the top of the target car. Figure 2 As shown, the Y-axis coordinate value of the bottom surface mean point must be smaller than the Y-axis coordinate value of the far side surface mean point.

[0125] In addition, it should be noted that the Z-axis coordinate values ​​can also be selected for comparison, and the fitting plane corresponding to the mean point with a small Z-axis coordinate value is determined as the bottom surface of the target car, and the fitting plane corresponding to the mean point with a large Z-axis coordinate value is determined as the far side surface of the target car. If the coordinate system axis changes, the coordinate values ​​of the appropriate target axis can also be adaptively selected for comparison to determine the fitting plane belonging to the bottom surface and the fitting plane belonging to the far side surface.

[0126] S105, respectively determining a first projection point of the coordinate origin in the bottom surface of the target compartment and a second projection point in the far side surface of the target compartment.

[0127] Optionally, the steps of respectively determining a first projection point of the coordinate origin in the bottom surface of the target car and a second projection point in the far side surface of the target car include: vertically projecting the coordinate origin onto the bottom surface of the target car to obtain the first projection point; and vertically projecting the coordinate origin onto the far side surface of the target car to obtain the second projection point.

[0128] Here, the bottom surface of the target car and the far side surface of the target car are determined based on the first fitting plane and the second fitting plane, so that the bottom surface equation of the target car and the far side surface equation of the target car can also be determined, and then based on the coordinate calculation formula of the projection point, the coordinates of the first projection point and the coordinates of the second projection point can be determined.

[0129] S106. Determine a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point.

[0130] In this step, according to the Rodrigues rotation formula, based on the coordinate origin, the first projection point, the second projection point, the first preset target point corresponding to the first projection point, and the second preset target point corresponding to the second projection point, the target rotation matrix for correcting the original point cloud data is determined.

[0131] Optional, see Figure 3 , Figure 3 Flow chart of a method for determining a target rotation matrix provided in an embodiment of the present application. Figure 3 As shown in , the method for determining the target rotation matrix provided in the embodiment of the present application includes:

[0132] S301, selecting any one projection point from the first projection point or the second projection point as a target projection point, and using the Rodrigues rotation formula to calculate a candidate rotation matrix corresponding to the target projection point based on the target projection point, a preset target point corresponding to the target projection point, and the coordinate origin.

[0133] Optionally, when the selected target projection point is the first projection point, the candidate rotation matrix corresponding to the target projection point is calculated based on the target projection point, the preset target point corresponding to the target projection point, and the coordinate origin using the Rodrigues rotation formula, including: determining a first projection vector based on the coordinates of the coordinate origin and the coordinates of the first projection point; determining a first target vector based on the coordinates of the coordinate origin and the coordinates of the first preset target point; determining a rotation angle between the two vectors based on the first projection vector and the first target vector; and calculating a candidate rotation matrix corresponding to the first projection point using the Rodrigues rotation formula based on the first projection vector, the first target vector and the rotation angle.

[0134] For example, the first projection point is the projection point of the coordinate origin on the bottom surface of the carriage, and the coordinates of the first projection point are recorded as P1(X1, Y1, Z1). Figure 2 The coordinate system and car structure shown in the figure, the coordinates of the first preset target point corresponding to the first projection point can be (0,0,-1). The first projection vector determined is the vector from the origin to the first projection point (the first projection vector is a unit vector), the first target vector determined is the vector from the origin to the first preset target point, the angle from the first projection vector to the first target vector is determined as the rotation angle, and then the candidate rotation matrix corresponding to the first projection point is calculated based on the following Rodrigues rotation formula.

[0135] r=E*cosθ+(1-cosθ)*n*n T +sinθ*n^

[0136] Here, r is the candidate rotation matrix, θ is the rotation angle, E is the third-order unit matrix, n is the unit vector obtained by cross-producting the first projection vector and the first target vector, and n T is the transpose of n. Let n be (n x ,n y ,n z ), n^ is a third-order matrix.

[0137]

[0138] In this way, the candidate rotation matrix r1 corresponding to the first projection point can be determined, and step S301 is performed once to obtain a candidate rotation matrix.

[0139] S302, determining whether the number of the candidate rotation matrices reaches a third preset number, if not, executing step S303, if yes, executing step S304.

[0140] Here, step S301 is performed once to obtain a candidate rotation matrix. The third preset number can be selected based on suitability based on expert experience.

[0141] S303, rotating another projection point based on the candidate rotation matrix, taking the projection point obtained after the rotation processing as the target projection point selected in step S301, and returning to execute step S302.

[0142] For example, performing rotation processing on another projection point based on the candidate rotation matrix may be to multiply the coordinates of the other projection point by the candidate rotation matrix of the target projection point.

[0143] As described in the above example, the selected target projection point is the first projection point, and the other projection point is the second projection point, and the coordinates are marked as P2(X2, Y2, Z2). The coordinates of the second projection point after rotation become P2 新 =P2*r1. Then the second projection point after processing is selected as the target projection point selected in step S301, and the operation of step S301 is performed to obtain the candidate rotation matrix r2 corresponding to the second projection point. In addition, when step S301 is performed for the third time, the target projection point is the first projection point processed based on the candidate rotation matrix r1 and the candidate rotation matrix r2, and the coordinates of the processed first projection point are P1 新=P1*r1*r2. When step S301 is executed for the fourth time, the target projection point is the second projection point processed based on the candidate rotation matrix r1, the candidate rotation matrix r2 and the candidate rotation matrix r3. The coordinates of the processed second projection point are P2 新 =P2*r1*r2*r3, and so on.

[0144] S304: Multiply the obtained third preset number of candidate rotation matrices to obtain a target rotation matrix, and the determination process ends.

[0145] For example, assuming that the third preset number is 4, step S301 is performed 4 times to obtain candidate rotation matrices r1, r2, r3 and r4, and the target rotation matrix R = r1*r2*r3*r4.

[0146] S107: Determine corrected target point cloud data based on the original point cloud data and the target rotation matrix.

[0147] After this step, based on the coordinates of the sampling points included in the original point cloud data, the coordinates of each sampling point in the original point cloud data can be multiplied by the target rotation matrix, and the coordinate points obtained after the multiplication are determined as the corrected target point cloud data.

[0148] For examples, see Figure 4 , Figure 4 As shown in the figure, the points in the solid line represent the original point cloud, and the dotted line represents the position of the original point cloud after rotation, which is also the position of the target car in the car coordinate system. By rotating the original point cloud data, point cloud data consistent with the car coordinate system will be obtained.

[0149] In this way, the present application first determines the target sampling points by screening the sampling points in the original point cloud data; then obtains two fitting planes by fitting the target sampling points, and determines the bottom surface of the car and the far side surface of the car based on the two fitting planes; then, constructs a rotation vector by projecting the origin on the plane, and uses multiple iterations to calculate the target rotation matrix; finally, corrects the original point cloud data based on the target rotation matrix to obtain target point cloud data consistent with the car coordinate system.

[0150] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of a point cloud data correction device provided in an embodiment of the present application. Figure 5 As shown in , the correction device 500 includes:

[0151] An acquisition module 510 is used to acquire the original point cloud data in the target compartment collected by the point cloud acquisition device in an empty compartment state;

[0152] A point set determination module 520 is used to perform multiple sampling point screening on multiple sampling points in the original point cloud data to determine a first target point set and a second target point set from the original point cloud data;

[0153] A fitting processing module 530 is used to perform fitting processing on the first target point set and the second target point set respectively, so as to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set by fitting;

[0154] A first determination module 540 is used to determine the bottom surface of the target compartment and the far side surface of the target compartment from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set; the far side surface is the side surface of the target compartment that is far from the installation position of the point cloud acquisition device;

[0155] A second determination module 550, for respectively determining a first projection point of the coordinate origin in the bottom surface of the target compartment and a second projection point in the far side surface of the target compartment;

[0156] A target rotation matrix determination module 560, configured to determine a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point;

[0157] The target point cloud data determination module 570 is used to determine the corrected target point cloud data based on the original point cloud data and the target rotation matrix.

[0158] Optionally, when the point set determination module 520 is used to determine the first target point set, the point set determination module 520 is used to:

[0159] In each screening process, three sampling points are randomly selected from the original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points;

[0160] Determine a first distance from each sampling point in the original point cloud data to the reference plane;

[0161] Based on the sampling points whose first distance is less than the first preset distance threshold, a first candidate point set for this screening is constructed;

[0162] Determine whether the number of sampling points in the first candidate point set is greater than a first preset number, and determine whether the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset number of screening times threshold;

[0163] When the number of sampling points in the first candidate point set is greater than a first preset number and the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset screening number threshold, the first candidate point set is determined as the first target point set.

[0164] Optionally, when the point set determination module 520 is used to determine the second target point set, the point set determination module 520 is used to:

[0165] Deleting the sampling points in the first target point set from the original point cloud data, and updating the original point cloud data;

[0166] In each screening process, three sampling points are randomly selected from the updated original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points;

[0167] Determine a second distance from each sampling point in the original point cloud data to the reference plane;

[0168] Based on the sampling points whose second distance is less than the second preset distance threshold, a second candidate point set is constructed to obtain the screening;

[0169] Determine whether the number of sampling points in the second candidate point set is greater than a second preset number, and determine whether the corresponding number of screening times when constructing the second candidate point set does not exceed a second preset number of screening times threshold;

[0170] When the number of sampling points in the second candidate point set is greater than a second preset number and the number of screening times when constructing the second candidate point set does not exceed a second preset screening number threshold, the second candidate point set is determined as the second target point set.

[0171] Optionally, when the first determining module 540 is used to determine the bottom surface of the target compartment and the far side surface of the target compartment from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set, the first determining module 540 is used to:

[0172] Performing averaging processing on all sampling points in the first target point set and the second target point set respectively, to determine a first mean point of the first target point set and a second mean point of the second target point set;

[0173] Comparing the Y-axis coordinate values ​​of the first mean point and the second mean point;

[0174] The fitting plane corresponding to the mean point with a small Y-axis coordinate value is determined as the bottom surface of the target compartment, and the fitting plane corresponding to the mean point with a large Y-axis coordinate value is determined as the far side surface of the target compartment.

[0175] Optionally, when the second determining module 550 is used to respectively determine a first projection point of the coordinate origin in the first fitting plane and a second projection point in the second fitting plane, the second determining module 550 is used to:

[0176] Project the coordinate origin vertically onto the bottom surface of the target carriage to obtain a first projection point;

[0177] The coordinate origin is vertically projected onto the far side of the target carriage to obtain a second projection point.

[0178] Optionally, when the target rotation matrix determination module 560 is used to determine the target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, the first preset target point corresponding to the first projection point, and the second preset target point corresponding to the second projection point, the target rotation matrix determination module 560 is used to:

[0179] Select any one of the first projection point or the second projection point as a target projection point, and calculate a candidate rotation matrix corresponding to the target projection point using a Rodrigues rotation formula based on the target projection point, a preset target point corresponding to the target projection point, and the coordinate origin;

[0180] Determining whether the number of the candidate rotation matrices reaches a third preset number;

[0181] When the answer is no, another projection point is rotated based on the candidate rotation matrix, and the projection point obtained after the rotation processing is used as the selected target projection point. Based on the target projection point, the preset target point corresponding to the target projection point, and the coordinate origin, the candidate rotation matrix corresponding to the target projection point is calculated using the Rodrigues rotation formula;

[0182] When the answer is yes, the obtained third preset number of candidate rotation matrices are multiplied to obtain the target rotation matrix, and the determination process ends.

[0183] Optionally, when the selected target projection point is the first projection point, the target rotation matrix determination module 560 is used to calculate the candidate rotation matrix corresponding to the target projection point based on the target projection point, the preset target point corresponding to the target projection point, and the coordinate origin using the Rodrigues rotation formula, and the target rotation matrix determination module 560 is used to:

[0184] Determine a first projection vector based on the coordinates of the coordinate origin and the coordinates of the first projection point;

[0185] Determining a first target vector based on the coordinates of the coordinate origin and the coordinates of the first preset target point;

[0186] Based on the first projection vector and the first target vector, determining a rotation angle between the two vectors;

[0187] Based on the first projection vector, the first target vector and the rotation angle, a candidate rotation matrix corresponding to the first projection point is calculated using the Rodrigues rotation formula.

[0188] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown in , the electronic device 600 includes a processor 610 , a memory 620 and a bus 630 .

[0189] The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device 600 is running, the processor 610 communicates with the memory 620 via the bus 630. When the machine-readable instructions are executed by the processor 610, the above-mentioned Figure 1 Until Figure 4 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0190] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 Until Figure 4 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0191] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0192] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0193] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0194] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0195] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0196] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for correcting point cloud data, characterized in that: The correction method includes: Acquire the original point cloud data in the target compartment collected by the point cloud collection device in an empty compartment state; Performing multiple sampling point screening on multiple sampling points in the original point cloud data to determine a first target point set and a second target point set from the original point cloud data; Performing fitting processing on the first target point set and the second target point set respectively, to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set; Based on the coordinates of each sampling point in the first target point set and the second target point set, determine the bottom surface of the target carriage and the far side surface of the target carriage from the first fitting plane and the second fitting plane; the far side surface is the side surface of the target carriage surface far from the installation position of the point cloud acquisition device; Determine respectively a first projection point of the coordinate origin in the bottom surface of the target compartment and a second projection point in the far side surface of the target compartment; Determine a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point; Based on the original point cloud data and the target rotation matrix, corrected target point cloud data is determined.

2. The correction method according to claim 1, characterized in that: The first target point set is determined by the following steps: In each screening process, three sampling points are randomly selected from the original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points; Determine a first distance from each sampling point in the original point cloud data to the reference plane; Based on the sampling points whose first distance is less than the first preset distance threshold, a first candidate point set for this screening is constructed; Determine whether the number of sampling points in the first candidate point set is greater than a first preset number, and determine whether the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset number of screening times threshold; When the number of sampling points in the first candidate point set is greater than a first preset number and the corresponding number of screening times when constructing the first candidate point set does not exceed a first preset screening number threshold, the first candidate point set is determined as the first target point set.

3. The correction method according to claim 2, characterized in that: The second target point set is determined by the following steps: Deleting the sampling points in the first target point set from the original point cloud data, and updating the original point cloud data; In each screening process, three sampling points are randomly selected from the updated original point cloud data to be determined as reference sampling points, and a reference plane is constructed based on the reference sampling points; Determine a second distance from each sampling point in the original point cloud data to the reference plane; Based on the sampling points whose second distance is less than the second preset distance threshold, a second candidate point set for this screening is constructed; Determine whether the number of sampling points in the second candidate point set is greater than a second preset number, and determine whether the corresponding number of screening times when constructing the second candidate point set does not exceed a second preset number of screening times threshold; When the number of sampling points in the second candidate point set is greater than a second preset number and the number of screening times when constructing the second candidate point set does not exceed a second preset screening number threshold, the second candidate point set is determined as the second target point set.

4. The correction method according to claim 1, characterized in that: The method of determining the bottom surface of the target carriage and the far side surface of the target carriage from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set comprises: Performing averaging processing on all sampling points in the first target point set and the second target point set respectively, to determine a first mean point of the first target point set and a second mean point of the second target point set; Comparing the Y-axis coordinate values ​​of the first mean point and the second mean point; The fitting plane corresponding to the mean point with a small Y-axis coordinate value is determined as the bottom surface of the target compartment, and the fitting plane corresponding to the mean point with a large Y-axis coordinate value is determined as the far side surface of the target compartment.

5. The correction method according to claim 1, characterized in that: The step of respectively determining a first projection point of a coordinate origin in the first fitting plane and a second projection point in the second fitting plane comprises: Project the coordinate origin vertically onto the bottom surface of the target carriage to obtain a first projection point; The coordinate origin is vertically projected onto the far side of the target carriage to obtain a second projection point.

6. The correction method according to claim 1, characterized in that: The determining of a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point includes: A. Select any one of the first projection point or the second projection point as a target projection point, and calculate a candidate rotation matrix corresponding to the target projection point using the Rodrigues rotation formula based on the target projection point, a preset target point corresponding to the target projection point, and the coordinate origin; B. Determine whether the number of the candidate rotation matrices reaches a third preset number, if not, execute step C; if yes, execute step D; C. Rotate another projection point based on the candidate rotation matrix, use the projection point obtained after the rotation as the target projection point selected in step A, and return to execute step A; D. Multiply the obtained third preset number of candidate rotation matrices to obtain a target rotation matrix, and the determination process ends.

7. The correction method according to claim 6, characterized in that: When the selected target projection point is the first projection point, the candidate rotation matrix corresponding to the target projection point is calculated using the Rodrigues rotation formula based on the target projection point, the preset target point corresponding to the target projection point, and the coordinate origin, including: Determine a first projection vector based on the coordinates of the coordinate origin and the coordinates of the first projection point; Determining a first target vector based on the coordinates of the coordinate origin and the coordinates of the first preset target point; Based on the first projection vector and the first target vector, determining a rotation angle between the two vectors; Based on the first projection vector, the first target vector and the rotation angle, a candidate rotation matrix corresponding to the first projection point is calculated using the Rodrigues rotation formula.

8. A point cloud data correction device, characterized in that: The correction device comprises: An acquisition module is used to acquire the original point cloud data in the target compartment collected by the point cloud acquisition device in an empty compartment state; A point set determination module, used for performing multiple sampling point screening on multiple sampling points in the original point cloud data, and determining a first target point set and a second target point set from the original point cloud data; A fitting processing module, used to perform fitting processing on the first target point set and the second target point set respectively, so as to obtain a first fitting plane corresponding to the first target point set and a second fitting plane corresponding to the second target point set by fitting; A first determination module is used to determine the bottom surface of the target car and the far side surface of the target car from the first fitting plane and the second fitting plane based on the coordinates of each sampling point in the first target point set and the second target point set; the far side surface is the side surface of the target car surface far from the installation position of the point cloud acquisition device; A second determination module is used to respectively determine a first projection point of the coordinate origin in the bottom surface of the target compartment and a second projection point in the far side surface of the target compartment; a target rotation matrix determination module, configured to determine a target rotation matrix for correcting the original point cloud data based on the coordinate origin, the first projection point, the second projection point, a first preset target point corresponding to the first projection point, and a second preset target point corresponding to the second projection point; The target point cloud data determination module is used to determine the corrected target point cloud data based on the original point cloud data and the target rotation matrix.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the machine-readable instructions are executed by the processor to execute the steps of the correction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the correction method according to any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Target object detection method and device and computer equipment

    CN110992356A

  • Three-dimensional point cloud data processing method, device, computer equipment and storage medium

    CN111639626A

  • Computing device and method for reconstructing curved surface of point cloud data

    US20150070354A1