Method and device for measuring volume of warehouse goods, computer device and storage medium
By performing deep filtering and point cloud filling processing on the 3D point cloud data of stored goods, the problem of low measurement accuracy in traditional methods is solved, and accurate measurement of the volume of goods of different specifications is achieved.
Patent Information
- Application Number
- CN202111619487.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2041-12-27
AI Technical Summary
Traditional methods for measuring cargo volume suffer from low accuracy, especially in warehousing environments where they cannot accurately measure the volume of cargo of different specifications.
By acquiring the 3D point cloud data of the goods to be tested in the warehouse, deep filtering and point cloud filling processes are performed, including the first, second and third filtering processes, to remove the influence of impurities. The effective point cloud data is selected by using the KD tree structure and nearest neighbor search. Finally, point cloud filling and volume calculation are performed.
It enables precise measurement of the volume of stored goods, improves measurement accuracy, and adapts to the measurement needs of goods of different specifications.
Smart Images

Figure CN116363192B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision technology, and in particular to a method, apparatus, computer equipment, and storage medium for measuring the volume of stored goods. Background Technology
[0002] With the continuous development of machine vision technology, the methods for measuring cargo volume have also been greatly improved.
[0003] Traditional methods for measuring cargo volume typically employ manual measurement or planar two-dimensional vision technology. Manual measurement relies heavily on the accuracy of the measuring ruler, resulting in significant subjective variability, high workload, and low efficiency. Planar two-dimensional vision technology, on the other hand, calculates the actual size of an object by utilizing the conversion relationship between pixel length and physical length under a fixed depth of field. However, due to the limitations of its imaging principle, it cannot perform specific analysis based on the actual situation of objects appearing larger when closer and smaller when farther away. It can only measure goods of a single specification. Therefore, when this method is combined with logistics applications, it cannot perform targeted measurements for goods of different specifications, nor can it accurately measure the volume of stored goods.
[0004] Therefore, traditional methods for measuring cargo volume suffer from low accuracy. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, computer equipment, and storage medium for measuring the volume of stored goods, so as to improve the accuracy of volume measurement of stored goods.
[0006] In a first aspect, this application provides a method for measuring the volume of stored goods, comprising:
[0007] Acquire 3D point cloud data of the warehouse goods to be tested;
[0008] Based on the preset order of impurity influence, the 3D point cloud data is subjected to deep filtering to obtain filtered 3D point cloud data.
[0009] The filtered 3D point cloud data is filled with point cloud data to obtain the target 3D point cloud data.
[0010] The volume information of the goods to be measured in the warehouse is obtained by analyzing the target 3D point cloud data.
[0011] In some embodiments of this application, the deep filtering process includes the following sequence: a first filtering process, a second filtering process, and a third filtering process; wherein, the first filtering process is used to filter out the third target point cloud data in the three-dimensional point cloud data to obtain a second point cloud set; the second filtering process is used to filter out the fifth target point cloud data in the second point cloud set to obtain a fourth point cloud set; and the third filtering process is used to filter out the seventh target point cloud data in the fourth point cloud set to obtain filtered three-dimensional point cloud data.
[0012] In some embodiments of this application, based on a preset impurity influence order, deep filtering is performed on 3D point cloud data to obtain filtered 3D point cloud data. This includes: acquiring first target point cloud data corresponding to the 3D point cloud data to obtain a first point cloud set; in response to the first target point cloud data satisfying a preset coordinate threshold condition, clustering and filtering the first target point cloud data to obtain second target point cloud data in each point cloud set; wherein the second target point cloud data includes Z-axis data; for each point cloud set, selecting the second target point cloud data with the minimum Z-axis data as the third target point cloud data, to perform a first filtering process on the 3D point cloud data, statistically obtaining a second point cloud set; and performing a second filtering process on the third target point cloud data to obtain filtered 3D point cloud data.
[0013] In some embodiments of this application, a second filtering process is performed on the third target point cloud data to obtain filtered 3D point cloud data, including: establishing a first KD tree structure based on the third target point cloud data; performing a nearest neighbor search on the third target point cloud data based on the first KD tree structure to obtain a third point cloud set including k fourth target point cloud data; calculating the standard deviation of the third point cloud set based on the Z-axis data of the fourth target point cloud data; in response to the standard deviation being less than a preset standard deviation threshold, retaining each fourth target point cloud data as a fifth target point cloud data to perform a second filtering process on the third target point cloud data and statistically obtain a fourth point cloud set; and performing a third filtering process on the fourth point cloud set to obtain filtered 3D point cloud data.
[0014] In some embodiments of this application, the method for measuring the volume of stored goods further includes: in response to a standard deviation greater than or equal to a preset standard deviation threshold, calculating the first Z-axis average value of the third point cloud set based on the Z-axis data of the fourth target point cloud data; filtering out the fourth target point cloud data whose Z-axis data is greater than the first Z-axis average value as the fifth target point cloud data, so as to perform a second filtering process on the third target point cloud data and statistically obtain the fourth point cloud set.
[0015] In some embodiments of this application, a third filtering process is performed on the fourth point cloud set to obtain filtered 3D point cloud data, including: removing ground point cloud data from the fourth point cloud set to obtain a fifth point cloud set including sixth target point cloud data; obtaining first average distance data between each sixth target point cloud data to update a preset point distance threshold based on the first average distance data to obtain an updated point distance threshold; establishing a second KD tree structure corresponding to the sixth target point cloud data to obtain second average distance data based on the second KD tree structure; and, in response to the second average distance data being less than the updated point distance threshold, retaining the sixth target point cloud data and ground point cloud data as seventh target point cloud data to update the fifth point cloud set to obtain an updated fifth point cloud set.
[0016] In some embodiments of this application, updating a preset point distance threshold based on first average distance data to obtain an updated point distance threshold includes: obtaining the quotient between the first average distance data and the preset average distance to obtain a point distance threshold scaling factor; obtaining the product between the point distance threshold scaling factor and the preset point distance threshold to update the preset point distance threshold and obtain an updated point distance threshold.
[0017] In some embodiments of this application, obtaining the second average distance data according to the second KD tree structure includes: performing a nearest neighbor search on the sixth target point cloud data according to the second KD tree structure to obtain a set of nearest neighbor point clouds including k nearest neighbor point clouds; obtaining the point cloud distance between each sixth target point cloud data and each nearest neighbor point cloud to obtain a distance set; and obtaining the average distance corresponding to the point cloud distance to obtain the second average distance data.
[0018] In some embodiments of this application, the method for measuring the volume of stored goods further includes: in response to the second average distance data being greater than or equal to the updated distance threshold, filtering out the sixth target point cloud data to update the fifth point cloud set, thereby obtaining the updated fifth point cloud set; adding ground point cloud data to the updated fifth point cloud set to perform a third filtering process on the fourth point cloud set; and using the point cloud data in the updated fifth point cloud set as the seventh target point cloud data to statistically obtain the filtered three-dimensional point cloud data.
[0019] In some embodiments of this application, point cloud filling processing is performed on filtered 3D point cloud data to obtain target 3D point cloud data, including: obtaining initial point cloud data based on a preset bar frame length scaling factor and a preset bar frame step size; filtering filtered 3D point cloud data within a preset bar frame range based on the initial point cloud data and a preset in-frame center point cloud to obtain in-frame point cloud data; obtaining a second Z-axis average value based on the Z-axis data of the in-frame point cloud data; and performing point cloud filling processing on the filtered 3D point cloud data based on the second Z-axis average value and the in-frame center point cloud to obtain target 3D point cloud data.
[0020] In some embodiments of this application, point cloud filling processing is performed on the filtered 3D point cloud data based on the average value of the second Z-axis and the center point cloud within the frame to obtain target 3D point cloud data. This includes: performing point cloud boundary filling processing on the filtered 3D point cloud data based on the average value of the second Z-axis and the center point cloud within the frame to obtain pre-filled 3D point cloud data; and performing interpolation filling on the pre-filled 3D point cloud data based on a piecewise linear interpolation method to obtain target 3D point cloud data.
[0021] In some embodiments of this application, before acquiring the three-dimensional point cloud data of the goods to be tested, the method further includes: acquiring the initial three-dimensional point cloud data of the goods to be tested, and performing a three-dimensional coordinate transformation on the initial three-dimensional point cloud data to obtain an initial plane normal vector; performing ground fitting on the initial three-dimensional point cloud data to obtain a true plane normal vector; acquiring the angle information between the true plane normal vector and the initial plane normal vector; and performing coordinate correction on the initial three-dimensional point cloud data based on the angle information to obtain three-dimensional point cloud data.
[0022] In some embodiments of this application, parsing the target three-dimensional point cloud data to obtain the cargo volume information of the warehouse cargo to be measured includes: accumulating the Z-axis data of the target three-dimensional point cloud data to obtain cargo height information; obtaining the product between the cargo height information and the step size square value to obtain cargo volume information; wherein, the step size square value is the product of the squares of the preset bar frame step size.
[0023] Secondly, this application provides a volume measuring device for stored goods, comprising:
[0024] The point cloud acquisition module is used to acquire the three-dimensional point cloud data of the warehouse goods to be tested;
[0025] The point cloud filtering module is used to perform deep filtering on 3D point cloud data based on a preset order of impurity influence, so as to obtain filtered 3D point cloud data.
[0026] The point cloud filling module is used to fill the filtered 3D point cloud data to obtain the target 3D point cloud data.
[0027] The volume analysis module is used to analyze the target 3D point cloud data to obtain the volume information of the goods to be tested in the warehouse.
[0028] Thirdly, this application also provides a computer device, comprising:
[0029] One or more processors;
[0030] The memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by a processor to implement the method for measuring the volume of stored goods as described in the first aspect above.
[0031] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform steps in a method for measuring the volume of stored goods.
[0032] Fifthly, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the first aspect described above.
[0033] The aforementioned method, apparatus, computer equipment, and storage medium for measuring the volume of stored goods involve a server acquiring 3D point cloud data of the stored goods to be measured. Based on a preset impurity influence order, the server performs deep filtering on the 3D point cloud data to obtain filtered 3D point cloud data. This filtered 3D point cloud data is then filled with point cloud data to obtain target 3D point cloud data. Finally, the target 3D point cloud data is analyzed to obtain the volume information of the stored goods to be measured. Using this method, the point cloud data of the stored goods to be measured can be accurately extracted and improved, thereby effectively enhancing the accuracy of volume measurement of stored goods. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a schematic diagram illustrating a scenario for the method of measuring the volume of stored goods provided in the embodiments of this application.
[0036] Figure 2 This is a flowchart illustrating the method for measuring the volume of stored goods provided in the embodiments of this application;
[0037] Figure 3 This is a schematic diagram of the interface for the 3D point cloud data provided in the embodiments of this application. Figure 1 ;
[0038] Figure 4 This is a schematic diagram of the interface for the 3D point cloud data provided in the embodiments of this application. Figure 2 ;
[0039] Figure 5 This is a schematic diagram of the interface for the 3D point cloud data provided in the embodiments of this application. Figure 3 ;
[0040] Figure 6 This is a schematic diagram of the interface for the 3D point cloud data provided in the embodiments of this application. Figure 4 ;
[0041] Figure 7 This is a schematic diagram of the interface for the 3D point cloud data provided in the embodiments of this application. Figure 5 ;
[0042] Figure 8 This is a schematic diagram of the architecture of the volume measurement system for stored goods provided in the embodiments of this application;
[0043] Figure 9 This is a schematic diagram of the structure of the volume measuring device for stored goods provided in the embodiments of this application;
[0044] Figure 10 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0047] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0048] The volume measurement method for stored goods provided in this application mainly involves machine vision technology. Machine vision technology is an interdisciplinary field involving artificial intelligence, computer science, image processing, pattern recognition, and many other areas. It mainly uses computers to simulate human visual functions, extracting information from images of objective things, processing and understanding it, and ultimately using it for actual detection, measurement, and control. Specifically, machine vision technology refers to using optical imaging technology (usually using a camera) to acquire images of the target being measured, and then using fast image processing and pattern recognition algorithms to obtain information such as the target's size, position, orientation, spectral characteristics, structure, and defects from the acquired images, thereby enabling tasks such as product inspection, classification, and grouping.
[0049] In this embodiment of the application, the method for measuring the volume of stored goods provided can be applied to, for example... Figure 1 The volume measurement system shown includes a terminal 102 and a server 104. Terminal 102 can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. Such a device can include cellular or other communication devices with single-line displays, multi-line displays, or no multi-line displays. Specifically, terminal 102 can be a desktop terminal or a mobile terminal; it can also be a mobile phone, tablet computer, or laptop computer. Server 104 can be a standalone server or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. The cloud server consists of a large number of computers or network servers based on cloud computing. Furthermore, terminal 102 and server 104 establish a communication connection through a network, which can be any of a wide area network (WAN), local area network (LAN), or metropolitan area network (MAN).
[0050] Those skilled in the art will understand that Figure 1 The application environment shown is merely one applicable scenario for the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include more than one. Figure 1 The number of devices shown may be more or less. For example, Figure 1 Only one server, 104, is shown. It is understood that this warehouse cargo volume measurement system may also include one or more other servers; specific details are not limited here. Additionally, as... Figure 1 As shown, the volume measurement system may also include a memory for storing data, such as storing three-dimensional point cloud data of the goods to be measured in the warehouse.
[0051] It should be noted that, Figure 1 The schematic diagram of the volume measurement system shown is merely an example. The volume measurement system and scenario described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. As those skilled in the art will know, with the evolution of volume measurement systems and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0052] See Figure 2 This application provides a method for measuring the volume of stored goods. This embodiment mainly applies this method to the above-mentioned... Figure 1 Taking server 104 as an example, the method includes steps S201 to S204, as follows:
[0053] S201, acquire the 3D point cloud data of the warehouse goods to be tested.
[0054] The goods to be tested can be any volume of goods stored in a warehouse. The warehouse can be of any shape and size, and the goods can also be of any shape and size. For example, the goods to be tested could be grain, coal, etc.
[0055] Point clouds, in this context, refer to the set of point data on the surface of a product obtained through measuring instruments during reverse engineering. Based on the density of the points, they can be categorized as sparse or dense point clouds. Three-dimensional point clouds refer to a set of point clouds existing in three spatial dimensions: left-right, up-down, and front-back. It should be noted that the three-dimensional point cloud data involved in this application's embodiments is in the format "XYZI," where "XYZ" represents the spatial location of the point cloud in the world coordinate system, and "I" represents the intensity of the radar point cloud.
[0056] In practice, the 3D point cloud data of the stored goods to be measured can be obtained from a lidar system. The lidar's laser generates and emits a light pulse, which strikes the object and reflects back to be received by a receiver. The receiver can then accurately measure the propagation time of the light pulse from emission to reflection. Since the speed of light is known, the propagation time can be converted into a distance measurement. Finally, by combining the laser's height and scanning angle, the 3D coordinates (X, Y, Z) of each ground spot can be accurately calculated.
[0057] Therefore, server 104 can acquire 3D point cloud data of the stored goods to be measured via a pre-established communication connection with a lidar. The acquisition method can be waiting for real-time transmission from the lidar, actively accessing the data at a preset time, or forwarding it through other intermediate media devices; this application does not limit the specific method. However, it should be noted that the 3D point cloud data acquired by server 104 at this time can be 3D point cloud data that has been converted to a world coordinate system, such as... Figure 3 As shown, the direction of the warehouse's wide side is the X direction, the direction of the warehouse's long side is the Y direction, the direction of the warehouse's wall height is the Z direction, and the intersection of the warehouse's long side, wide side, and the ground at the bottom right corner is the origin O.
[0058] In one embodiment, prior to this step, the method further includes: acquiring initial three-dimensional point cloud data of the stored goods to be tested, and performing three-dimensional coordinate transformation on the initial three-dimensional point cloud data to obtain an initial plane normal vector; performing ground fitting on the initial three-dimensional point cloud data to obtain a true plane normal vector; acquiring the angle information between the true plane normal vector and the initial plane normal vector; and performing coordinate correction on the initial three-dimensional point cloud data based on the angle information to obtain three-dimensional point cloud data.
[0059] In specific implementation, this embodiment proposes that the three-dimensional point cloud data obtained by the server 104 is not only data that has undergone coordinate system transformation, but also data that has undergone coordinate system correction. This embodiment will explain in detail how to perform coordinate correction on the initial three-dimensional point cloud data.
[0060] Specifically, after the server 104 initially acquires the three-dimensional point cloud data of the goods to be measured in the warehouse, it first converts it to the world coordinate system to determine the origin O of the three-dimensional point cloud data. This facilitates subsequent analysis of coordinates and volume calculation based on the origin O. However, since the three-dimensional point cloud data may not be accurately converted to the world coordinate system, the server 104 will also perform coordinate correction on it, such as using "ransac" to fit the ground, thereby eliminating the transformation error of the Z-axis and improving the accuracy of subsequent volume calculation.
[0061] Furthermore, "ransac" is an abbreviation for Random Sample Consensus, an algorithm that calculates model parameters of data from a set of sample datasets containing outliers to obtain valid sample data. Before server 104 performs coordinate correction operations using this algorithm, it can use the initially acquired 3D point cloud data as the initial 3D point cloud data to perform "ransac" ground fitting on the initial 3D point cloud data to obtain the true plane normal vector "v1". The 3D coordinate transformation that was performed before fitting can also determine the initial plane normal vector "v2" based on its initial transformation result. It should be noted that the steps of obtaining the true plane normal vector "v1" and the initial plane normal vector "v2" are not sequential.
[0062] Furthermore, after obtaining the real plane normal vector "v1" and the initial plane normal vector "v2", server 104 can calculate the difference between "v1" and "v2" as the angle information "θ" between the real plane normal vector and the initial plane normal vector. In this way, by rotating the initially transformed 3D point cloud data according to the angle information "θ", the coordinate correction of the 3D point cloud data can be achieved.
[0063] S202, based on the preset order of impurity influence, performs deep filtering on the 3D point cloud data to obtain filtered 3D point cloud data.
[0064] The order of influence of impurities can be a preset order based on the influence of volume measurement from largest to smallest. For example, the order of influence of impurities is as follows: other surfaces of the warehouse body except the ground, operating vehicles, shelves, and suspended objects in the air.
[0065] In practical implementation, in order to accurately measure the volume of stored goods, after acquiring the 3D point cloud data of the stored goods to be measured, the server 104 also needs to remove the point cloud data belonging to the warehouse, as well as the point cloud data of other miscellaneous objects that affect the measurement of the goods volume. Therefore, this application proposes three filtering methods, including: first filtering processing, second filtering processing, and third filtering processing, so as to achieve deep filtering processing of 3D point cloud data through these three steps. The specific implementation steps will be described in detail below.
[0066] In one embodiment, the deep filtering process includes the following sequence: a first filtering process, a second filtering process, and a third filtering process; wherein, the first filtering process is used to filter out the third target point cloud data in the 3D point cloud data to obtain a second point cloud set; the second filtering process is used to filter out the fifth target point cloud data in the second point cloud set to obtain a fourth point cloud set; and the third filtering process is used to filter out the seventh target point cloud data in the fourth point cloud set to obtain filtered 3D point cloud data.
[0067] In a specific implementation, the first filtering process, the second filtering process, and the third filtering process are implemented in sequence. The first filtering process mainly includes clipping filtering and vertical de-duplication. The second filtering process mainly includes nearest neighbor filtering in the Z-axis direction. The third filtering process mainly includes adaptive density filtering. The specific acquisition steps and processing steps of the third target point cloud data, the fifth target point cloud data, and the seventh target point cloud data involved in this embodiment will be sequentially described in the following embodiments.
[0068] In one embodiment, this step includes: obtaining first target point cloud data corresponding to three-dimensional point cloud data to obtain a first point cloud set; in response to the first target point cloud data satisfying a preset coordinate threshold condition, performing clustering screening on the first target point cloud data to obtain second target point cloud data in each point cloud set; where the second target point cloud data includes Z-axis data; for each point cloud set, screening out the second target point cloud data with the minimum Z-axis data as the third target point cloud data to perform the first filtering process on the three-dimensional point cloud data, and statistically obtaining a second point cloud set; performing the second filtering process on the third target point cloud data to obtain the filtered three-dimensional point cloud data.
[0069] In a specific implementation, the server 104 can perform downsampling on the three-dimensional point cloud data to obtain the downsampled three-dimensional point cloud data as the first target point cloud data, and statistically obtain it as the first point cloud set. Among them, the sampling radius of the downsampling can be "0.1m", or other parameters can be set. Specifically, this application does not make a limitation.
[0070] Further, before analyzing each first target point cloud data included in the first point cloud set, the server 104 has the size coordinate thresholds of the warehouse in the world coordinate system built in, specifically: X_MIN, X_MAX, Y_MIN, Y_MAX, Z_MIN, Z_MAX. Using the above size coordinate thresholds, the server 104 can further analyze and judge whether each first target point cloud data satisfies the preset coordinate threshold condition, and the coordinate threshold condition is composed of the above size coordinate thresholds, specifically: the point cloud p satisfies the condition of "(p.x>X_MIN)&(p.x<X_MAX)&(p.y>Y_MIN)&(p.y<Y_MAX)&(p.z>Z_MAX)&(p.z<Z_MAX)", where the "&" means "and", and "p.x, p.y, p.z" are the X-axis coordinate value, Y-axis coordinate value, and Z-axis coordinate value of the currently judged first target point cloud data "p".
[0071] For example, after acquiring the first target point cloud data, server 104 will determine whether each first target point cloud data "p" satisfies the following conditions: the X-axis coordinate value is between the size coordinate thresholds (X_MIN to X_MAX), the Y-axis coordinate value is between the size coordinate thresholds (Y_MIN to Y_MAX), and the Z-axis coordinate value is between the size coordinate thresholds (Z_MIN to Z_MAX). If the above coordinate threshold conditions are met, the first target point cloud data "p" can be retained; if the above coordinate threshold conditions are not met, it is removed. In this way, by traversing all the first target point cloud data "p", the retained first target point cloud data can be obtained.
[0072] Furthermore, the above steps all take into account the impact of each surface of the warehouse on the measurement of cargo volume. In addition, there may be points with the same (x, y) coordinates but different z in the vertical direction (Z-axis direction) of the point cloud. However, in order to improve the accuracy of cargo volume measurement, only one point needs to be retained in this case.
[0073] For example, the retained first target point cloud data can be further clustered and filtered. This involves searching for all points in the retained first target point cloud data that satisfy "(p_f.x == px) & (p_f.y == py)", resulting in point cloud sets "P_f" (first target point cloud data belonging to the same P_f can be used as second target point cloud data, and second target point cloud data within the same "P_f" have the same X and Y coordinates; therefore, "p_f.x" and "p_f.y" can serve as cluster centers). After this, server 104 can filter each point cloud set "P_f" to select the second target point cloud data with the minimum Z-axis value as the third target point cloud data. That is, the second target point cloud data in each point cloud set "P_f" includes the Z-axis data "p_f.z", and the filtered third target point cloud data has the Z-axis data "p_f_min". After this, server 104 can perform a second filtering process on the third target point cloud data. The specific steps of the second filtering process will be described in detail below.
[0074] In one embodiment, this step includes: establishing a first KD-tree structure based on the third target point cloud data; performing a nearest neighbor search on the third target point cloud data based on the first KD-tree structure to obtain a third point cloud set including k fourth target point cloud data; calculating the standard deviation of the third point cloud set based on the Z-axis data of the fourth target point cloud data; retaining each fourth target point cloud data as a fifth target point cloud data in response to the standard deviation being less than a preset standard deviation threshold, and performing a second filtering process on the third target point cloud data to obtain a fourth point cloud set; and performing a third filtering process on the fourth point cloud set to obtain filtered three-dimensional point cloud data.
[0075] In specific implementation, to better separate noise from sources such as work vehicles, shelves, and suspended objects in the warehouse, this embodiment provides a nearest neighbor filter based on the vertical direction (z-direction) for efficient filtering of the aforementioned point cloud noise. Specifically, server 104 can first establish a KDTree on the third target point cloud data to obtain a first KD-tree structure. Here, a KD-tree (K-Dimensional) is a data structure for partitioning a k-dimensional data space.
[0076] Furthermore, server 104 can perform a nearest neighbor search on a point cloud in the third target point cloud data based on the first KD tree structure, "k=30", to obtain a third point cloud set "P_n". Then, it calculates the average "z_mean" and / or standard deviation "z_std" for the z-coordinates in the third point cloud set "P_n". If the standard deviation "z_std < THRES_STD", then in response to the standard deviation being less than the preset standard deviation threshold "THRES_STD", all fourth target point cloud data in the third point cloud set "P_n" are retained as the fifth target point cloud data, thus obtaining the fourth point cloud set. After this, server 104 also needs to perform a third filtering process on the fourth point cloud set. The specific steps of the third filtering process will be described in detail below.
[0077] In one embodiment, this step includes: in response to a standard deviation greater than or equal to a preset standard deviation threshold, calculating the first Z-axis average value of the third point cloud set based on the Z-axis data of the fourth target point cloud data; filtering out the fourth target point cloud data whose Z-axis data is greater than the first Z-axis average value as the fifth target point cloud data, so as to perform a second filtering process on the third target point cloud data and statistically obtain the fourth point cloud set.
[0078] In specific implementation, this embodiment will further explain the case where the standard deviation "z_std" is not less than the standard deviation threshold "THRES_STD". That is, if server 104 detects "z_std≥THRES_STD", it will iterate through the third point cloud set "P_n" and only retain the fourth target point cloud data in "P_n" whose z value is greater than the average value "z_mean" as the fifth target point cloud data, and obtain the fourth point cloud set. The effect of this second filtering process can be found in [reference needed]. Figure 4 .
[0079] In one embodiment, this step includes: filtering out ground point cloud data from the fourth point cloud set to obtain a fifth point cloud set including sixth target point cloud data; obtaining first average distance data between each sixth target point cloud data to update a preset point distance threshold based on the first average distance data to obtain an updated point distance threshold; establishing a second KD tree structure corresponding to the sixth target point cloud data to obtain second average distance data based on the second KD tree structure; and, in response to the second average distance data being less than the updated point distance threshold, retaining the sixth target point cloud data and ground point cloud data as seventh target point cloud data to update the fifth point cloud set to obtain an updated fifth point cloud set.
[0080] In practice, in order to better separate noise from the warehouse, such as noise from work vehicles, shelves, and suspended objects, and to avoid some noise remaining in the previous steps that has not been fully filtered out, this embodiment will provide an adaptive density filter to supplement the filtering of the point cloud noise.
[0081] Specifically, server 104 can first filter out the ground point cloud data in the fourth point cloud set, and the remaining point cloud data can be used as the sixth target point cloud data to obtain a fifth point cloud set including the sixth target point cloud data. Further, server 104 can calculate the average distance between each sixth target point cloud data to obtain a first average distance data "voxel_size", and update the preset point distance threshold "distance_threshold_orgin" based on the first average distance data "voxel_size" to obtain the updated point distance threshold "distance_threshold". The calculation relationship between each data will be explained in detail below.
[0082] Furthermore, server 104 can establish a KDTree on the sixth target point cloud data to obtain a second KD tree structure. Then, based on the second KD tree structure, it can perform a nearest neighbor search on a point cloud in the sixth target point cloud data to obtain the second average distance data "distance_mean". The specific implementation steps will be described in detail below.
[0083] Furthermore, if server 104 detects "distance_mean < distance_threshold", it can retain the point cloud for nearest neighbor search as described above. This process is repeated for all sixth target point cloud data in the fifth point cloud set until all retained sixth target point cloud data are obtained, which are then used as the seventh target point cloud data.
[0084] In one embodiment, this step includes: obtaining the quotient between the first average distance data and the preset average distance to obtain a point distance threshold scaling factor; obtaining the product between the point distance threshold scaling factor and the preset point distance threshold to update the preset point distance threshold and obtain the updated point distance threshold.
[0085] In the specific implementation, in order to update the preset point distance threshold, server 104 can calculate the quotient of the first average distance data "voxel_size" and the preset average distance "mean_distance" to obtain the point distance threshold scaling factor "ratio", that is, "ratio = voxel_size / mean_distance". Then, it calculates the product between the point distance threshold scaling factor "ratio" and the point distance threshold "distance_threshold_orgin" to obtain the updated point distance threshold "distance_threshold", that is, "distance_threshold = distance_threshold_orgin * ratio".
[0086] In one embodiment, this step includes: performing a nearest neighbor search on the sixth target point cloud data according to the second KD tree structure to obtain a set of nearest neighbor point clouds including k nearest neighbor point clouds; obtaining the point cloud distance between each sixth target point cloud data and each nearest neighbor point cloud to obtain a distance set; and obtaining the average distance corresponding to the point cloud distance to obtain the second average distance data.
[0087] In the specific implementation, before the server 104 obtains the second average distance data, it can perform a nearest neighbor search on a certain sixth target point cloud data in the fifth point cloud set according to the second KD tree structure. That is, it searches for the k nearest neighbors of each sixth target point cloud data to obtain the nearest neighbor point cloud set "P_n". Then, it calculates the distance between each sixth target point cloud data and its k nearest neighbors to obtain the distance set "nn_dist". The average distance of the distance set "nn_dist" is then calculated to obtain the second average distance data "distance_mean".
[0088] In one embodiment, this step includes: in response to the second average distance data being greater than or equal to the updated distance threshold, filtering out the sixth target point cloud data to update the fifth point cloud set, thereby obtaining the updated fifth point cloud set; adding ground point cloud data to the updated fifth point cloud set to perform a third filtering process on the fourth point cloud set; and using the point cloud data in the updated fifth point cloud set as the seventh target point cloud data to statistically obtain the filtered three-dimensional point cloud data.
[0089] In the specific implementation, if the second average distance data "distance_mean" is greater than or equal to the updated distance threshold "distance_threshold", then the sixth target point cloud data is filtered out. This process is repeated for each sixth target point cloud data in the fifth point cloud set to analyze which data is retained and which is filtered out in order to update the fifth point cloud set and obtain the updated fifth point cloud set.
[0090] Furthermore, after obtaining the updated fifth point cloud set based on the analysis of this embodiment, or after obtaining the updated fifth point cloud set based on the analysis of the above embodiments, the initially filtered ground point cloud data can be added back, that is, the ground point cloud data can be added to the updated fifth point cloud set to obtain a point cloud set "P_G" including the seventh target point cloud data. The effect of this third filtering process can be found in [reference needed]. Figure 5 .
[0091] S203 performs point cloud filling processing on the filtered 3D point cloud data to obtain the target 3D point cloud data.
[0092] In specific implementation, point cloud filling includes not only filling the boundaries of the point cloud, but also filling the coverage of the point cloud. The filling steps for different locations can be preset in a specific order. This application embodiment does not make specific limitations, but the following will describe the process in detail with boundary filling first and coverage filling second.
[0093] In one embodiment, this step includes: obtaining initial point cloud data based on a preset bar frame length scaling factor and a preset bar frame step size; filtering out filtered 3D point cloud data within a preset bar frame range based on the initial point cloud data and a preset in-frame center point cloud to obtain in-frame point cloud data; obtaining a second Z-axis average value based on the Z-axis data of the in-frame point cloud data; and performing point cloud filling processing on the filtered 3D point cloud data based on the second Z-axis average value and the in-frame center point cloud to obtain target 3D point cloud data.
[0094] The bar length scaling factor is denoted as "mult", and the bar step size is denoted as "delta".
[0095] In the specific implementation, the point cloud set "P_G" obtained by the previous three filtering steps includes the filtered 3D point cloud data, and the size coordinate thresholds are: X_MIN, X_MAX, Y_MIN, Y_MAX, Z_MIN, Z_MAX. First, on the boundary line of x = X_MIN, find the point in the (delta*mult, delta) bar region as the starting point cloud data "begin_point".
[0096] Furthermore, the preset center point clouds within the bounding boxes include: (x = X_MIN, y = y*), (x = x*, y = Y_MIN), (x = x*, y = Y_MAX), and (x = X_MAX, y = y*). The steps for obtaining the point cloud data within the bounding boxes based on the initial point cloud data "begin_point" and the center point clouds of each bounding box, and then obtaining the average value of the second Z-axis, to obtain the target 3D point cloud data, include the following:
[0097] (1) Starting from “begin_point” to the right (y+ direction), use an adaptive bar box to find the point cloud data within the range of “(X_MIN-delta*mult≤x≤X_MIN+delta*mult)&(y-delta≤y≤y+delta)” centered on the coordinate point (x=X_MIN,y=y*). This forms the point set “P_t”. Then, the average of the Z-axis data (z values) of all points in this point set “P_t” is calculated to obtain the second Z-axis average value “z_p_mean”. Finally, (X_MIN,y*,z_p_mean) is added to the point cloud set “P” that can be filled with boundary points. This process is repeated for all coordinate values in this direction (y+).
[0098] (2) Starting from “begin_point” to the left (y- direction), the operation in (1) above iterates through all coordinate values in this direction (y-).
[0099] (3) Starting from the coordinate point (x=X_MIN,y=Y_MIN), use an adaptive bar box to find the point cloud data within the range of “(Y_MIN-delta*mult≤y≤Y_MIN+delta*mult)&(x-delta≤x≤x+delta)” centered on the coordinate point (x=x*,y=Y_MIN), forming a point set “P_t”. Then, average the Z-axis data (z values) of all points in this point set “P_t” to obtain the second Z-axis average value “z_p_mean”. Finally, add (x*,Y_MIN,z_p_mean) to the point cloud set “P” that can be filled with boundary points, and traverse all coordinate values in this direction (x+).
[0100] (4) Starting from the coordinate point (x=X_MIN,y=Y_MAX), use an adaptive bar box to find the point cloud data within the range of “(Y_MAX-delta*mult≤y≤Y_MAX+delta*mult)&(x-delta≤x≤x+delta)” centered on the coordinate point (x=x*,y=Y_MAX), forming a point set “P_t”. Then, average the Z-axis data (z values) of all points in this point set “P_t” to obtain the second Z-axis average value “z_p_mean”. Finally, add (x*,Y_MAX,z_p_mean) to the point cloud set “P” that can be filled with boundary points, and traverse all coordinate values in this direction (x+).
[0101] (5) From (x=X_MAX,y=Y_MIN) to the right (y+ direction), use an adaptive bar box to find the point cloud data within the box center point cloud (x=X_MAX,y=y*) with the coordinate point as the center point, within the range of "(X_MAX-delta*mult≤x≤X_MAX+delta*mult)&(y-delta≤y≤y+delta)", forming a point set "P_t". Then, average the Z-axis data (z value) of all points in this point set "P_t" to obtain the second Z-axis average value "z_p_mean". Finally, add (X_MAX,y*,z_p_mean) to the point cloud set "P" that can be filled with boundary points, and traverse all coordinate values in this direction (y+).
[0102] Thus, the point cloud set "P" obtained through the above analysis can be used as the target 3D point cloud data, and the target 3D point cloud data includes the point cloud data in the point cloud set "P_G". The point cloud boundary filling effect can be found in [reference needed]. Figure 6 .
[0103] In one embodiment, this step includes: performing point cloud boundary filling processing on the filtered 3D point cloud data based on the second Z-axis average value and the center point cloud within the frame to obtain pre-filled 3D point cloud data; and performing interpolation filling on the pre-filled 3D point cloud data based on a piecewise linear interpolation method to obtain target 3D point cloud data.
[0104] In specific implementation, the detailed steps of point cloud boundary filling processing have been described in the above embodiments. Afterwards, the server 104 can also use a piecewise linear interpolation method to interpolate and fill the point cloud data output in the previous step to obtain sufficiently complete and accurate target 3D point cloud data. The effect of this interpolation and filling processing can be found in [reference needed]. Figure 7 .
[0105] S204, parse the target 3D point cloud data to obtain the cargo volume information of the warehouse goods to be tested.
[0106] In the specific implementation, after the server 104 performs the preliminary operation on the three-dimensional point cloud data of the goods to be tested in the warehouse, it will obtain sufficiently complete and accurate target three-dimensional point cloud data, which will be used as the basis for volume measurement analysis to obtain the volume of the goods to be tested stored in the warehouse. The specific steps will be explained in detail below.
[0107] In one embodiment, this step includes: accumulating the Z-axis data of the target 3D point cloud data to obtain cargo height information; obtaining the product between the cargo height information and the step size squared value to obtain cargo volume information; wherein the step size squared value is the product of the squares of a preset bar frame step size.
[0108] In the specific implementation, the Z-axis data (z-value) of the target 3D point cloud data is accumulated to obtain the cargo height information "H". Then, "H*delta*delta" is calculated to obtain the cargo volume information. The value of the bar frame step size "delta" can be "0.01" or even less than "0.01", but the smaller the value, the higher the accuracy.
[0109] The volume measurement method for stored goods in the above embodiments involves the server acquiring 3D point cloud data of the stored goods to be measured, and performing deep filtering on the 3D point cloud data based on a preset impurity influence order to obtain filtered 3D point cloud data. Then, point cloud filling processing is performed on the filtered 3D point cloud data to obtain target 3D point cloud data. Finally, the target 3D point cloud data is parsed to obtain the volume information of the stored goods to be measured. Using this method, the point cloud data of the stored goods to be measured can be accurately extracted and improved, thereby effectively improving the accuracy of volume measurement of stored goods.
[0110] To facilitate a deeper understanding of the embodiments of this application by those skilled in the art, the following will be combined with Figure 8 Provide a specific example.
[0111] See Figure 8 The volume measurement system for stored goods can integrate a correction module, a filtering module, a boundary filling module, a filling module, and a volume calculation module. This volume measurement system is installed in server 104. After acquiring the three-dimensional point cloud data of the stored goods to be measured, the operating system of server 104 first inputs the three-dimensional point cloud data into the volume measurement system of the integrated module. The data then sequentially passes through the correction module for z-axis coordinate correction, the filtering module and the boundary filling module for filtering out noise and suspended matter and filling the point cloud boundary, the filling module for filling the point cloud, and the volume calculation module for calculating the volume result, thus obtaining the volume information of the stored goods to be measured.
[0112] In this embodiment, the server acquires the 3D point cloud data of the goods to be tested in the warehouse, and performs deep filtering on the 3D point cloud data based on a preset impurity influence order to obtain filtered 3D point cloud data. Then, point cloud filling processing is performed on the filtered 3D point cloud data to obtain the target 3D point cloud data. Finally, the target 3D point cloud data is parsed to obtain the volume information of the goods to be tested in the warehouse. Using this method, the point cloud data of the goods to be tested can be accurately extracted and improved, thereby effectively improving the accuracy of volume measurement of the goods.
[0113] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0114] To better implement the volume measurement method for stored goods provided in the embodiments of this application, based on the volume measurement method for stored goods proposed in the embodiments of this application, the embodiments of this application also provide a volume measurement device for stored goods, such as... Figure 9 As shown, the volume measuring device 900 includes:
[0115] The point cloud acquisition module 910 is used to acquire the three-dimensional point cloud data of the warehouse goods to be tested.
[0116] The point cloud filtering module 920 is used to perform deep filtering on the three-dimensional point cloud data based on a preset order of impurity influence, so as to obtain filtered three-dimensional point cloud data.
[0117] The point cloud filling module 930 is used to perform point cloud filling processing on the filtered 3D point cloud data to obtain the target 3D point cloud data.
[0118] The volume analysis module 940 is used to analyze the target 3D point cloud data to obtain the volume information of the warehouse goods to be measured.
[0119] In one embodiment, the deep filtering process includes the following sequence: a first filtering process, a second filtering process, and a third filtering process; wherein, the first filtering process is used to filter out the third target point cloud data in the 3D point cloud data to obtain a second point cloud set; the second filtering process is used to filter out the fifth target point cloud data in the second point cloud set to obtain a fourth point cloud set; and the third filtering process is used to filter out the seventh target point cloud data in the fourth point cloud set to obtain filtered 3D point cloud data.
[0120] In one embodiment, the point cloud filtering module 920 is further configured to acquire first target point cloud data corresponding to the three-dimensional point cloud data to obtain a first point cloud set; in response to the first target point cloud data satisfying a preset coordinate threshold condition, clustering and filtering the first target point cloud data to obtain second target point cloud data in each point cloud set; wherein the second target point cloud data includes Z-axis data; for each point cloud set, selecting the second target point cloud data with the minimum Z-axis data as the third target point cloud data, so as to perform a first filtering process on the three-dimensional point cloud data and statistically obtain a second point cloud set; performing a second filtering process on the third target point cloud data to obtain filtered three-dimensional point cloud data.
[0121] In one embodiment, the point cloud filtering module 920 is further configured to: establish a first KD tree structure based on the third target point cloud data; perform a nearest neighbor search on the third target point cloud data based on the first KD tree structure to obtain a third point cloud set including k fourth target point cloud data; calculate the standard deviation of the third point cloud set based on the Z-axis data of the fourth target point cloud data; in response to the standard deviation being less than a preset standard deviation threshold, retain each fourth target point cloud data as a fifth target point cloud data to perform a second filtering process on the third target point cloud data, and statistically obtain a fourth point cloud set; and perform a third filtering process on the fourth point cloud set to obtain filtered three-dimensional point cloud data.
[0122] In one embodiment, the point cloud filtering module 920 is further configured to, in response to a standard deviation greater than or equal to a preset standard deviation threshold, calculate the first Z-axis average value of the third point cloud set based on the Z-axis data of the fourth target point cloud data; filter out the fourth target point cloud data whose Z-axis data is greater than the first Z-axis average value as the fifth target point cloud data, so as to perform a second filtering process on the third target point cloud data and statistically obtain the fourth point cloud set.
[0123] In one embodiment, the point cloud filtering module 920 is further configured to filter out ground point cloud data in the fourth point cloud set to obtain a fifth point cloud set including the sixth target point cloud data; obtain first average distance data between each sixth target point cloud data to update a preset point distance threshold based on the first average distance data to obtain an updated point distance threshold; establish a second KD tree structure corresponding to the sixth target point cloud data to obtain second average distance data based on the second KD tree structure; and, in response to the second average distance data being less than the updated point distance threshold, retain the sixth target point cloud data and ground point cloud data as the seventh target point cloud data to update the fifth point cloud set to obtain an updated fifth point cloud set.
[0124] In one embodiment, the point cloud filtering module 920 is further configured to obtain the quotient between the first average distance data and the preset average distance to obtain the point distance threshold scaling factor; obtain the product between the point distance threshold scaling factor and the preset point distance threshold to update the preset point distance threshold and obtain the updated point distance threshold.
[0125] In one embodiment, the point cloud filtering module 920 is further configured to perform nearest neighbor search on the sixth target point cloud data according to the second KD tree structure to obtain a set of nearest neighbor point clouds including k nearest neighbor point clouds; obtain the point cloud distance between each sixth target point cloud data and each nearest neighbor point cloud to obtain a distance set; and obtain the average distance corresponding to the point cloud distance to obtain the second average distance data.
[0126] In one embodiment, the point cloud filtering module 920 is further configured to, in response to the second average distance data being greater than or equal to the updated distance threshold, filter out the sixth target point cloud data to update the fifth point cloud set, thereby obtaining the updated fifth point cloud set; add ground point cloud data to the updated fifth point cloud set to perform a third filtering process on the fourth point cloud set; and use the point cloud data in the updated fifth point cloud set as the seventh target point cloud data to statistically obtain the filtered three-dimensional point cloud data.
[0127] In one embodiment, the point cloud filling module 930 is further configured to: obtain initial point cloud data based on a preset bar frame length scaling factor and a preset bar frame step size; filter out filtered 3D point cloud data within a preset bar frame range based on the initial point cloud data and a preset center point cloud within the frame to obtain point cloud data within the frame; obtain a second Z-axis average value based on the Z-axis data of the point cloud data within the frame; and perform point cloud filling processing on the filtered 3D point cloud data based on the second Z-axis average value and the center point cloud within the frame to obtain target 3D point cloud data.
[0128] In one embodiment, the point cloud filling module 930 is further configured to perform point cloud boundary filling processing on the filtered three-dimensional point cloud data based on the average value of the second Z-axis and the center point cloud within the frame, to obtain the initially filled three-dimensional point cloud data; and to perform interpolation filling on the initially filled three-dimensional point cloud data based on the piecewise linear interpolation method, to obtain the target three-dimensional point cloud data.
[0129] In one embodiment, the volume measuring device 900 further includes a coordinate correction module, which is used to acquire initial three-dimensional point cloud data of the warehouse goods to be measured, and to perform three-dimensional coordinate transformation on the initial three-dimensional point cloud data to obtain an initial plane normal vector; and to perform ground fitting on the initial three-dimensional point cloud data to obtain a true plane normal vector; to acquire the angle information between the true plane normal vector and the initial plane normal vector; and to perform coordinate correction on the initial three-dimensional point cloud data according to the angle information to obtain three-dimensional point cloud data.
[0130] In one embodiment, the volume analysis module 940 is further used to accumulate the Z-axis data of the target three-dimensional point cloud data to obtain cargo height information; and to obtain the product between the cargo height information and the step size square value to obtain cargo volume information; wherein the step size square value is the product of the squares of the preset bar frame step size.
[0131] In the above embodiments, point cloud data of the warehouse goods to be measured can be accurately extracted and improved, thereby effectively improving the accuracy of volume measurement of the warehouse goods.
[0132] It should be noted that the specific limitations regarding the volume measurement device for stored goods can be found in the limitations on the volume measurement method for stored goods mentioned above, and will not be repeated here. Each module in the aforementioned volume measurement device for stored goods can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independently of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.
[0133] In some embodiments of this application, the volume measuring device 900 for stored goods can be implemented as a computer program, which can be implemented in, for example... Figure 10 The computer device shown operates on this system. The computer device's memory can store the various program modules that make up the volume measuring device 900 for the stored goods, for example... Figure 9 The point cloud acquisition module 910, point cloud filtering module 920, point cloud filling module 930, and volume analysis module 940 shown; the computer program composed of each program module causes the processor to execute the steps in the methods for measuring the volume of stored goods in the various embodiments of this application described in this specification. For example, Figure 10 The computer device shown can be used as follows Figure 9The point cloud acquisition module 910 in the volume measurement device 900 for stored goods shown executes step S201. The computer device can execute step S202 via the point cloud filtering module 920. The computer device can execute step S203 via the point cloud filling module 930. The computer device can execute step S204 via the volume resolution module 940. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communication with external computer devices via a network connection. When the computer program is executed by the processor, it implements a method for measuring the volume of stored goods.
[0134] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0135] In some embodiments of this application, a computer device is provided, including one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor as described in the method for measuring the volume of stored goods. The steps of the method for measuring the volume of stored goods may be steps from the methods for measuring the volume of stored goods described in the various embodiments above.
[0136] In some embodiments of this application, a computer-readable storage medium is provided, storing a computer program that is loaded by a processor, causing the processor to execute the steps of the above-described method for measuring the volume of stored goods. The steps of the method for measuring the volume of stored goods may be the steps in the methods for measuring the volume of stored goods described in the various embodiments above.
[0137] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0138] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above provides a detailed description of a method, apparatus, computer equipment, and storage medium for measuring the volume of stored goods according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for measuring the volume of stored goods, characterized in that, include: Acquire 3D point cloud data of the warehouse goods to be tested; Based on a preset order of impurity influence, the three-dimensional point cloud data is subjected to deep filtering to obtain filtered three-dimensional point cloud data. The filtered 3D point cloud data is then subjected to point cloud filling processing to obtain the target 3D point cloud data; The target 3D point cloud data is analyzed to obtain the cargo volume information of the warehouse goods to be tested; The step of performing point cloud filling processing on the filtered 3D point cloud data to obtain target 3D point cloud data includes: Based on the preset bar length scaling factor and the preset bar step size, the starting point cloud data is obtained; Based on the starting point cloud data and the preset center point cloud within the frame, the filtered 3D point cloud data within the preset bar frame range is selected to obtain the point cloud data within the frame. The second Z-axis average value is obtained based on the Z-axis data of the point cloud data within the frame; Based on the average value of the second Z-axis and the center point cloud within the frame, the filtered 3D point cloud data is filled with point cloud data to obtain the target 3D point cloud data.
2. The method as described in claim 1, characterized in that, The deep filtering process is performed in the following order: a first filtering process, a second filtering process, and a third filtering process; wherein... The first filtering process is used to filter out the third target point cloud data in the three-dimensional point cloud data to obtain the second point cloud set; The second filtering process is used to filter out the fifth target point cloud data in the second point cloud set in order to obtain the fourth point cloud set; The third filtering process is used to filter out the seventh target point cloud data in the fourth point cloud set to obtain the filtered three-dimensional point cloud data.
3. The method as described in claim 2, characterized in that, The method of performing deep filtering on the 3D point cloud data based on a preset impurity influence order to obtain filtered 3D point cloud data includes: Obtain the first target point cloud data corresponding to the three-dimensional point cloud data to obtain the first point cloud set; In response to the first target point cloud data satisfying a preset coordinate threshold condition, the first target point cloud data is clustered and filtered to obtain the second target point cloud data in each point cloud set; wherein, the second target point cloud data includes Z-axis data; For each point cloud set, the second target point cloud data with the minimum Z-axis data is selected as the third target point cloud data, so as to perform a first filtering process on the three-dimensional point cloud data and obtain the second point cloud set. The third target point cloud data is subjected to a second filtering process to obtain the filtered three-dimensional point cloud data.
4. The method as described in claim 3, characterized in that, The second filtering process on the third target point cloud data to obtain the filtered 3D point cloud data includes: Based on the third target point cloud data, establish the first KD tree structure; Based on the first KD tree structure, a nearest neighbor search is performed on the third target point cloud data to obtain a third point cloud set including k fourth target point cloud data. Calculate the standard deviation of the third point cloud set based on the Z-axis data of the fourth target point cloud data; In response to the standard deviation being less than a preset standard deviation threshold, each of the fourth target point cloud data is retained as the fifth target point cloud data, so as to perform a second filtering process on the third target point cloud data and statistically obtain the fourth point cloud set. The fourth point cloud set is subjected to a third filtering process to obtain the filtered three-dimensional point cloud data.
5. The method as described in claim 4, characterized in that, The method further includes: In response to the standard deviation being greater than or equal to a preset standard deviation threshold, the first Z-axis average value of the third point cloud set is calculated based on the Z-axis data of the fourth target point cloud data; The fourth target point cloud data whose Z-axis data is greater than the average value of the first Z-axis is selected as the fifth target point cloud data, and the third target point cloud data is subjected to a second filtering process to obtain the fourth point cloud set.
6. The method as described in claim 5, characterized in that, The third filtering process applied to the fourth point cloud set to obtain the filtered 3D point cloud data includes: By filtering out the ground point cloud data in the fourth point cloud set, a fifth point cloud set including the sixth target point cloud data is obtained; Obtain the first average distance data between the point cloud data of each of the sixth targets, and update the preset point distance threshold based on the first average distance data to obtain the updated point distance threshold; Establish a second KD tree structure corresponding to the sixth target point cloud data, and obtain the second average distance data based on the second KD tree structure; In response to the second average distance data being less than the updated point distance threshold, the sixth target point cloud data and the ground point cloud data are retained as the seventh target point cloud data to update the fifth point cloud set, resulting in the updated fifth point cloud set.
7. The method as described in claim 6, characterized in that, The step of updating the preset point distance threshold based on the first average distance data to obtain the updated point distance threshold includes: Obtain the quotient between the first average distance data and the preset average distance to get the point distance threshold scaling factor; Obtain the product between the point distance threshold scaling factor and the preset point distance threshold, and update the preset point distance threshold to obtain the updated point distance threshold.
8. The method as described in claim 6, characterized in that, The step of obtaining the second average distance data based on the second KD tree structure includes: Based on the second KD tree structure, a nearest neighbor search is performed on the sixth target point cloud data to obtain a set of nearest neighbor point clouds including k nearest neighbor point clouds; Obtain the point cloud distances between each of the sixth target point cloud data and each of the nearest neighbor point clouds to obtain a distance set; Obtain the average distance corresponding to the point cloud distance to get the second average distance data.
9. The method as described in claim 6, characterized in that, The method further includes: In response to the second average distance data being greater than or equal to the updated distance threshold, the sixth target point cloud data is filtered out to update the fifth point cloud set, resulting in an updated fifth point cloud set; The ground point cloud data is added to the updated fifth point cloud set to perform a third filtering process on the fourth point cloud set; The point cloud data in the updated fifth point cloud set is used as the seventh target point cloud data, and the filtered three-dimensional point cloud data is obtained statistically.
10. The method as described in claim 1, characterized in that, The step of performing point cloud filling processing on the filtered 3D point cloud data based on the second Z-axis average value and the center point cloud within the frame to obtain the target 3D point cloud data includes: Based on the average value of the second Z-axis and the center point cloud within the frame, the filtered 3D point cloud data is subjected to point cloud boundary filling processing to obtain the pre-filled 3D point cloud data. Based on the piecewise linear interpolation method, the initially filled 3D point cloud data is interpolated and filled to obtain the target 3D point cloud data.
11. The method as described in claim 1, characterized in that, Before acquiring the 3D point cloud data of the goods to be tested in the warehouse, the following steps are also included: Acquire initial 3D point cloud data of the stored goods to be tested, and perform 3D coordinate transformation on the initial 3D point cloud data to obtain initial plane normal vectors; and Ground fitting is performed on the initial 3D point cloud data to obtain the true plane normal vector; Obtain the angle information between the real plane normal vector and the initial plane normal vector; Based on the included angle information, the initial three-dimensional point cloud data is subjected to coordinate correction to obtain the three-dimensional point cloud data.
12. The method as described in claim 1, characterized in that, The process of parsing the target 3D point cloud data to obtain the cargo volume information of the warehouse goods to be tested includes: By summing the Z-axis data of the target's three-dimensional point cloud data, the cargo height information is obtained; The product of the cargo height information and the square of the step size is obtained to obtain the cargo volume information; The step size squared value is the product of the squares of the preset bar frame step size.
13. A volume measuring device for stored goods, characterized in that, include: The point cloud acquisition module is used to acquire the three-dimensional point cloud data of the warehouse goods to be tested; The point cloud filtering module is used to perform deep filtering on the three-dimensional point cloud data based on a preset order of impurity influence, so as to obtain filtered three-dimensional point cloud data. The point cloud filling module is used to perform point cloud filling processing on the filtered 3D point cloud data to obtain the target 3D point cloud data. The volume analysis module is used to analyze the target three-dimensional point cloud data to obtain the cargo volume information of the warehouse cargo to be tested; The point cloud filling module is further used for: Based on the preset bar length scaling factor and the preset bar step size, the starting point cloud data is obtained; Based on the starting point cloud data and the preset center point cloud within the frame, the filtered 3D point cloud data within the preset bar frame range is selected to obtain the point cloud data within the frame. The second Z-axis average value is obtained based on the Z-axis data of the point cloud data within the frame; Based on the average value of the second Z-axis and the center point cloud within the frame, the filtered 3D point cloud data is filled with point cloud data to obtain the target 3D point cloud data.
14. A computer device, characterized in that, The computer device includes: One or more processors; The memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the method for measuring the volume of stored goods as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, It contains a computer program that is loaded by a processor to perform the steps in the method for measuring the volume of stored goods as described in any one of claims 1 to 12.
Citation Information
Patent Citations
Automatic material stacking, material taking and material stacking and taking method and system for material yard
CN110194375A
Handheld volume measuring device based on 3D camera
CN111307037A
Height measurement method and device based on target and equipment
CN113805157A