Method and device for correcting carriage point cloud posture
By filtering and attitude correction of the car point cloud data, the stability and accuracy of car loading rate calculation are solved, automatic attitude correction is realized, installation efficiency is improved and costs are reduced.
Patent Information
- Application Number
- CN202111160789.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2041-09-30
AI Technical Summary
The existing car point cloud correction scheme cannot meet the stability and accuracy of car loading rate calculation, mainly due to irregular installation of workers and errors caused by cargo impacting the gimbal during transportation.
By acquiring point cloud data of the car and performing filtering processing, the rotation angle is determined using the width of the filtered point cloud data in the target direction to achieve automatic attitude correction.
It ensures the stability and accuracy of the calculation of the car loading rate, improves installation efficiency, reduces hardware and maintenance costs, and does not require manual intervention and additional assistance.
Smart Images

Figure CN113933817B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional measurement and machine vision technology, and in particular to a method and device for correcting the point cloud posture of a carriage. Background Art
[0002] With the advancement of automation in the logistics industry, intelligent logistics is increasingly being applied to fundamental aspects of the industry, including transportation, warehousing, distribution, packaging, and loading and unloading. Intelligently calculating vehicle load rates is a necessary requirement for digital management and improved efficiency in the logistics industry. With the maturity and development of depth camera technology, depth cameras have become widely used in vehicle load rate calculation. However, due to factors such as vehicle coverage, improper installation procedures by workers, and cargo impacting sensors, the point clouds collected by depth cameras can contain errors.
[0003] Existing solutions primarily use a gimbal to record the depth camera's rotation angle, thereby calibrating the vehicle's point cloud from various poses to a standard pose. However, due to improper installation by workers and the impact of cargo on the gimbal during transportation, the standard pose can deviate. Using projection to calculate the load factor can result in inaccurate load factor calculations. Summary of the Invention
[0004] The problem solved by the present invention is that the existing carriage point cloud correction solution cannot meet the stability and accuracy of carriage loading rate calculation.
[0005] To solve the above problems, the present invention provides a method for correcting the point cloud posture of a car body, comprising: acquiring point cloud data of the car body, and filtering the point cloud data; determining the rotation angle of the point cloud data relative to the standard posture based on the width of the filtered point cloud data in the target direction; the width in the target direction is the difference between the maximum and minimum values of the point cloud data in the target direction; and automatically correcting the posture of the point cloud data according to the rotation angle.
[0006] Optionally, determining the rotation angle of the point cloud data relative to the standard posture based on the width of the filtered point cloud data in the target direction includes: calculating a first difference between the maximum value and the minimum value of the filtered point cloud data in the first direction, and / or a second difference between the maximum value and the minimum value of the point cloud data in the second direction; the first direction is perpendicular to the second direction; determining the offset angle corresponding to the minimum value of the first difference by traversing the offset angles to obtain the heading angle of the point cloud data relative to the standard posture, and / or determining the offset angle corresponding to the minimum value of the second difference by traversing the offset angles to obtain the pitch angle of the point cloud data relative to the standard posture.
[0007] Optionally, determining the rotation angle of the point cloud data relative to the standard posture based on the width of the filtered point cloud data in the target direction also includes: calculating the sum of the first difference and the second difference; determining the offset angle corresponding to the minimum value of the sum of the first difference and the second difference by traversing the offset angles, and obtaining the flip angle of the point cloud data relative to the standard posture.
[0008] Optionally, the filtering processing of the point cloud data includes: filtering the point cloud data using at least one of the following point cloud filtering algorithms: radius filtering, statistical filtering, and confidence filtering.
[0009] Optionally, obtaining the point cloud data of the car includes: collecting three-dimensional spatial information of the car through a depth camera to obtain the point cloud data of the car; the point cloud data is a data set including multiple points, and each point corresponds to a three-dimensional coordinate.
[0010] Optionally, the method further includes: calculating a carriage loading rate based on the point cloud data after automatic posture correction.
[0011] Optionally, the carriage comprises an approximately cubic structure; the first direction is a horizontal direction, and the second direction is a vertical direction.
[0012] The present invention provides a device for correcting the point cloud posture of a carriage, comprising: an acquisition module for acquiring point cloud data of the carriage and filtering the point cloud data; a rotation angle determination module for determining the rotation angle of the point cloud data relative to a standard posture based on the width of the filtered point cloud data in a target direction; the width in the target direction is the difference between the maximum and minimum values of the point cloud data in the target direction; and a correction module for automatically correcting the posture of the point cloud data based on the rotation angle.
[0013] Optionally, the rotation angle determination module is specifically used to: calculate a first difference between the maximum value and the minimum value of the filtered point cloud data in a first direction, and / or a second difference between the maximum value and the minimum value of the point cloud data in a second direction; the first direction is perpendicular to the second direction; determine the offset angle corresponding to the minimum value of the first difference by traversing the offset angle, and obtain the heading angle of the point cloud data relative to the standard posture, and / or determine the offset angle corresponding to the minimum value of the second difference by traversing the offset angle, and obtain the pitch angle of the point cloud data relative to the standard posture.
[0014] Optionally, the rotation angle determination module is specifically used to: calculate the sum of the first difference and the second difference; determine the offset angle corresponding to the minimum value of the sum of the first difference and the second difference by traversing the offset angles, and obtain the flip angle of the point cloud data relative to the standard posture.
[0015] The method and device for correcting the car point cloud posture provided by the present invention can determine the rotation angle of the point cloud data relative to the standard posture based on the width of the point cloud data in the target direction after filtering processing, and then realize automatic posture correction based on the rotation angle, thereby ensuring the stability and accuracy of the car loading rate measurement, without the need for manual intervention and additional assistance, improving installation efficiency, and reducing hardware and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0017] Figure 1 Schematic diagram of the installation effect of the depth camera in an embodiment of the present invention;
[0018] Figure 2 1 is a schematic flow chart of a method for correcting a vehicle body point cloud posture in one embodiment of the present invention;
[0019] Figure 3 This is a schematic diagram of the projection of the car body point cloud data onto the XZ plane;
[0020] Figure 4 This is a schematic diagram of the projection of the car point cloud data onto the XY plane;
[0021] Figure 5 The present invention is a schematic structural diagram of a device for correcting a vehicle point cloud posture according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the above-mentioned objects, features and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0023] Figure 1 This is a schematic diagram of the installation effect of a depth camera, which is used to collect point cloud data or depth maps inside the vehicle. Figure 1 As shown, a depth camera 20 is installed at a top corner in the vehicle compartment 10 .
[0024] Some depth cameras can directly output point cloud data, while others can output depth maps. Depth values can be converted into point cloud data by combining the depth camera's internal parameters. Point cloud data refers to a dataset of points in a coordinate system, typically consisting of three-dimensional X, Y, and Z coordinates. In 3D computer graphics and computer vision, a depth map is an image that contains information about the distance from the surface of a scene object to the viewpoint.
[0025] Based on the acquired point cloud data, the carriage loading rate can be calculated, providing a data basis for digital management of the logistics industry and improving efficiency.
[0026] Figure 2 FIG. 1 is a schematic flow chart of a method for correcting a car body point cloud posture in one embodiment of the present invention, the method comprising:
[0027] S202, obtaining the point cloud data of the carriage and performing filtering processing on the point cloud data.
[0028] The depth camera can capture the three-dimensional spatial information of the vehicle cabin, generating point cloud data. The point cloud data captured by the depth camera typically contains random noise, necessitating filtering to improve the accuracy of the vehicle cabin point cloud posture correction. In this embodiment, the point cloud data can be filtered using at least one of the following point cloud filtering algorithms: radius filtering, statistical filtering, and confidence filtering.
[0029] Specifically, the radius filtering algorithm: each point in the original point cloud that contains at least a certain number of neighboring points in the specified radius neighborhood is considered a normal point and retained; otherwise, it is considered a noise point and removed; the statistical filtering algorithm: for each point, calculate its average distance to all nearby points (assuming that the result is a Gaussian distribution, whose shape is determined by the mean and standard deviation), then the points with an average distance outside the standard range can be defined as outliers and removed from the data; the confidence filtering algorithm: filters out data that does not meet the confidence threshold, and can retain data greater than or less than the threshold according to actual needs.
[0030] Among them, the radius filtering algorithm mainly addresses isolated point noise. The search radius and point cloud number threshold in the radius filter can be set according to the actual length of the carriage and the depth camera parameters. For example, when measuring a 9.6-meter-long carriage, the depth camera resolution is 320*240 and the field of view is 60°*45°. It can be estimated that at 9.6 meters, the physical size represented by a single point cloud is approximately 4 centimeters. Therefore, in order to avoid filtering out the valid point cloud of the farthest carriage, the radius in the radius filter can be set to 10 centimeters and the point cloud number threshold can be set to 4 to 6.
[0031] The radius filtering algorithm can filter out some isolated points. However, some noise points are composed of a small area. These point clouds are caused by the depth camera's inaccurate ranging of highly reflective or low-reflective materials. For this reason, a statistical filtering algorithm can be used in this implementation to filter out point clouds that do not conform to the global distribution through statistical analysis, or to perform confidence filtering based on the confidence of each point cloud.
[0032] S204 : Determine the rotation angle of the point cloud data relative to the standard posture according to the width of the filtered point cloud data in the target direction.
[0033] Among them, the width in the target direction is the difference between the maximum and minimum values of the point cloud data in the target direction. The depth camera may not be in the standard posture when collecting point cloud data, resulting in an angle between the direction of the point cloud data and the standard posture, that is, the rotation angle. Due to the above rotation, the width of the projection of the point cloud data in the target direction is greater than the actual width corresponding to the point cloud data, so the above rotation angle can be determined based on the width of the projection. Specifically, it can be rotated in small amplitudes in sequence, and the width of the point cloud data in the target direction is calculated each time it is rotated. Since the minimum value of the width corresponds to the actual width when the width is equal to the actual width, the minimum value of the width can be obtained after traversing the rotation angles. At this time, the corresponding rotation angle is the rotation angle of the point cloud data relative to the standard posture.
[0034] Alternatively, based on the fact that most carriages are roughly rectangular, the target directions are determined as horizontal, vertical, and vertical. By determining the rotation angles in the three directions, the point cloud data can be further calibrated.
[0035] S206: Automatically correct the posture of the point cloud data according to the rotation angle.
[0036] Optionally, a corresponding posture correction matrix may be determined according to the above rotation angle, and then the point cloud data may be automatically corrected according to the posture correction matrix.
[0037] The method for correcting the carriage point cloud posture provided by an embodiment of the present invention can determine the rotation angle of the point cloud data relative to the standard posture based on the width of the point cloud data in the target direction after filtering processing, and then realize automatic posture correction based on the rotation angle, thereby ensuring the stability and accuracy of the carriage loading rate measurement, without the need for manual intervention and additional assistance, improving installation efficiency, and reducing hardware and maintenance costs.
[0038] For example, a regular car can be approximated as a cuboid, or the car can include an approximately cubic structure. By using this modeling approach, by calculating the maximum and minimum values of the car point cloud data in the X and Y axis directions, the rotation angle of the car point cloud to the standard posture can be estimated, thereby calculating the posture correction matrix. The X axis is the horizontal direction of the car, which is parallel to the ground; the Y axis is the vertical direction of the car, which is perpendicular to the ground; and the Z axis is the horizontal longitudinal direction of the car, which is along the direction of the car's movement.
[0039] As a feasible implementation, the above S204 may be performed according to the following steps:
[0040] (1) Calculating a first difference between a maximum value and a minimum value of the filtered point cloud data in a first direction, and / or a second difference between a maximum value and a minimum value of the point cloud data in a second direction; the first direction is perpendicular to the second direction. The first direction may be horizontal, and the second direction may be vertical.
[0041] (2) Determine the offset angle corresponding to the minimum value of the above-mentioned first difference by traversing the offset angle, and obtain the heading angle of the point cloud data relative to the standard posture, and / or determine the offset angle corresponding to the minimum value of the above-mentioned second difference by traversing the offset angle, and obtain the pitch angle of the point cloud data relative to the standard posture.
[0042] Figure 3 The figure below shows the projection of the car point cloud data onto the XZ plane. Line segments AB and CD represent the width of the car entrance. Points A and D represent the minimum and maximum values of the car point cloud on the X-axis, respectively. Line segment ED represents the distance from point A to point D on the X-axis, i.e., the first difference between the maximum and minimum values of the car point cloud on the X-axis.
[0043] According to the right triangle theorem, the hypotenuse is longer than the lengths of any of the other two sides, so ED ≥ CD for any rotation angle. ED = CD if and only if the car is not rotated. In this case, the difference between the maximum and minimum values of the car point cloud on the X-axis, ED, is minimal (i.e., equal to CD).
[0044] Based on prior knowledge, the car's offset angle on each axis is limited to -90° to 90°. Therefore, according to the above theory, by looping through the angles, for example, by setting the angle interval to 1, we can determine the offset angle of the current car point cloud data to the standard pose, that is, the heading angle. Similarly, by calculating the angle corresponding to the minimum of the second difference between the maximum and minimum values of the car point cloud on the Y axis, we can determine the pitch angle of the car point cloud to the standard pose.
[0045] If the car point cloud has offset angles on all axes in three-dimensional space, considering the particularity of roll angle estimation, it is necessary to first calculate the heading angle and pitch angle of the car point cloud data to the standard posture.
[0046] Figure 4 The diagram below shows the projection of the car point cloud data onto the XY plane. The roll angle of the car point cloud to the standard pose cannot be estimated by the minimum difference between the maximum and minimum values on the Z axis. However, it can be estimated by the minimum sum of the first and second differences on the X and Y axes.
[0047] For example, Figure 4 In any case, the line segments AF and DE in always have DE ≥ CD and AF ≥ AD. The sum of the line segments AF and DE will be minimized if and only if the carriage posture is calibrated to the standard posture, thus obtaining the flip angle of the carriage point cloud to the standard posture.
[0048] Therefore, the above method can conveniently calculate the offset angle of the car point cloud corresponding to each coordinate axis to the standard posture, so as to automatically correct the posture of the car point cloud by constructing a rotation matrix.
[0049] Furthermore, after correction, the carriage loading rate can be calculated based on the point cloud data after automatic posture correction.
[0050] Embodiments of the present invention can automatically correct the carriage's point cloud pose based on the three-dimensional spatial information captured by a depth camera. This automatic pose correction can be achieved as long as the carriage's point cloud contains a cube-like structure. This method of automatically correcting the carriage's point cloud pose ensures the stability and accuracy of carriage loading rate calculations, eliminating the need for manual intervention or additional assistance, improving installation efficiency and reducing solution and maintenance costs. The point cloud pose can be automatically corrected regularly, independent of the initial state of the equipment installation, improving the robustness of the solution.
[0051] Figure 5 FIG. 1 is a schematic structural diagram of a device for correcting a car body point cloud posture according to an embodiment of the present invention, the device comprising:
[0052] An acquisition module 501 is used to acquire point cloud data of the vehicle compartment and perform filtering on the point cloud data;
[0053] The rotation angle determination module 502 is configured to determine the rotation angle of the point cloud data relative to the standard posture based on the width of the filtered point cloud data in the target direction; the width in the target direction is the difference between the maximum and minimum values of the point cloud data in the target direction;
[0054] The correction module 503 is configured to automatically perform posture correction on the point cloud data according to the rotation angle.
[0055] The device for correcting the carriage point cloud posture provided by an embodiment of the present invention can determine the rotation angle of the point cloud data relative to the standard posture based on the width of the point cloud data in the target direction after filtering processing, and then realize automatic posture correction based on the rotation angle, thereby ensuring the stability and accuracy of the carriage loading rate measurement, without the need for manual intervention and additional assistance, improving installation efficiency, and reducing hardware and maintenance costs.
[0056] Optionally, as an embodiment, the rotation angle determination module 502 is specifically used to: calculate a first difference between the maximum value and the minimum value of the filtered point cloud data in a first direction, and / or a second difference between the maximum value and the minimum value of the point cloud data in a second direction; the first direction is perpendicular to the second direction; determine the offset angle corresponding to the minimum value of the first difference by traversing the offset angles, and obtain the heading angle of the point cloud data relative to the standard posture, and / or determine the offset angle corresponding to the minimum value of the second difference by traversing the offset angles, and obtain the pitch angle of the point cloud data relative to the standard posture.
[0057] Optionally, as an embodiment, the rotation angle determination module 502 is specifically used to: calculate the sum of the first difference and the second difference; determine the offset angle corresponding to the minimum value of the sum of the first difference and the second difference by traversing the offset angles, and obtain the flip angle of the point cloud data relative to the standard posture.
[0058] Optionally, as an embodiment, the acquisition module 501 is specifically configured to: perform filtering processing on the point cloud data using at least one of the following point cloud filtering algorithms: radius filtering, statistical filtering, and confidence filtering.
[0059] Optionally, as an embodiment, the acquisition module 501 is specifically used to: collect three-dimensional spatial information of the car through a depth camera to obtain point cloud data of the car; the point cloud data is a data set including multiple points, and each point corresponds to a three-dimensional coordinate.
[0060] Optionally, as an embodiment, it further includes a loading rate calculation module, which is used to calculate the vehicle compartment loading rate based on the point cloud data after automatic posture correction.
[0061] Optionally, as an embodiment, the carriage includes an approximately cubic structure; the first direction is a horizontal direction, and the second direction is a vertical direction.
[0062] This embodiment further provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the various processes of the above-described embodiment and achieves the same technical effects. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0063] Of course, those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the control device through a computer, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include the process of the embodiment of the correction method of the vehicle point cloud posture as described above, wherein the storage medium may be a memory, a disk, an optical disk, etc.
[0064] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0065] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other.
[0066] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for correcting the point cloud posture of a vehicle compartment, characterized in that: include: Acquiring point cloud data of the carriage and performing filtering processing on the point cloud data; Determine the rotation angle of the point cloud data relative to the standard posture according to the width of the filtered point cloud data in the target direction; the width in the target direction is the difference between the maximum and minimum values of the point cloud data in the target direction; Automatically correcting the attitude of the point cloud data according to the rotation angle; Determining the rotation angle of the point cloud data relative to the standard posture according to the width of the filtered point cloud data in the target direction includes: Calculating a first difference between a maximum value and a minimum value of the filtered point cloud data in a first direction, and / or a second difference between a maximum value and a minimum value of the point cloud data in a second direction; the first direction is perpendicular to the second direction; Determine the offset angle corresponding to the minimum value of the first difference by traversing the offset angles, and obtain the heading angle of the point cloud data relative to the standard posture; and / or determine the offset angle corresponding to the minimum value of the second difference by traversing the offset angles, and obtain the pitch angle of the point cloud data relative to the standard posture; Calculating the sum of the first difference and the second difference; The offset angle corresponding to the minimum value of the sum of the first difference and the second difference is determined by traversing the offset angles, so as to obtain a flip angle of the point cloud data relative to the standard posture.
2. The method according to claim 1, characterized in that The filtering process on the point cloud data includes: The point cloud data is filtered using at least one of the following point cloud filtering algorithms: radius filtering, statistical filtering, and confidence filtering.
3. The method according to claim 1, characterized in that The step of obtaining the point cloud data of the carriage includes: The three-dimensional spatial information of the carriage is collected by a depth camera to obtain point cloud data of the carriage; the point cloud data is a data set including multiple points, and each point corresponds to a three-dimensional coordinate.
4. The method according to claim 1, wherein The method further comprises: The carriage loading rate is calculated based on the point cloud data after automatic posture correction.
5. The method according to claim 1, wherein The carriage comprises an approximately cubic structure; the first direction is a horizontal direction, and the second direction is a vertical direction.
6. A device for correcting the point cloud posture of a vehicle compartment, characterized in that: include: An acquisition module, used to acquire point cloud data of the carriage and perform filtering processing on the point cloud data; a rotation angle determination module, configured to determine the rotation angle of the point cloud data relative to the standard posture based on the width of the filtered point cloud data in the target direction; the width in the target direction is the difference between the maximum and minimum values of the point cloud data in the target direction; a correction module, configured to automatically perform posture correction on the point cloud data according to the rotation angle; The rotation angle determination module is specifically used to: Calculating a first difference between a maximum value and a minimum value of the filtered point cloud data in a first direction, and / or a second difference between a maximum value and a minimum value of the point cloud data in a second direction; The first direction is perpendicular to the second direction; Determine the offset angle corresponding to the minimum value of the first difference by traversing the offset angles, and obtain the heading angle of the point cloud data relative to the standard posture; and / or determine the offset angle corresponding to the minimum value of the second difference by traversing the offset angles, and obtain the pitch angle of the point cloud data relative to the standard posture; Calculating the sum of the first difference and the second difference; The offset angle corresponding to the minimum value of the sum of the first difference and the second difference is determined by traversing the offset angles, so as to obtain a flip angle of the point cloud data relative to the standard posture.