Method, device, computer equipment and storage medium for determining stockpile point cloud
By projecting point cloud data into a two-dimensional grid and identifying the height sub-range, the problem of low processing efficiency caused by clustering operations in the prior art is solved, and the effect of quickly obtaining point cloud data of the material pile is achieved.
Patent Information
- Application Number
- CN202211052467.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The prior art requires multiple clustering operations when processing material stack point cloud data, making it difficult to quickly obtain material stack point cloud data under large data volumes.
Point cloud data is projected into multiple two-dimensional grids, and the point cloud data of the material stack is determined by identifying the height sub-range that meets the preset stack height distribution conditions, thereby avoiding the use of clustering methods.
Through the identification method based on height values, point cloud data of the material pile can be quickly obtained, saving computing resources and improving processing efficiency.
Smart Images

Figure CN115407323B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of point cloud processing technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for determining a stockpile point cloud. Background Art
[0002] Materials are typically stored in piles. Automatically acquiring and processing point cloud data from the piles in this storage method provides crucial insights for subsequent inventory management and automated loading and unloading. Effectively distinguishing the point cloud data of the piles from that of interfering objects is crucial for accurately obtaining parameter data for the piles.
[0003] In traditional technology, in order to obtain point cloud data of a material pile, it is first necessary to collect initial point cloud data of the test scene containing the material pile. Then, a clustering method is used to segment the point cloud data of the material pile and the point cloud data of the interference objects. The point cloud data of the interference objects is then eliminated from the initial point cloud data to obtain the point cloud data of the material pile.
[0004] However, traditional clustering methods involve multiple iterations of clustering operations to determine the final cluster center, which consumes significant computing resources. When the point cloud data volume is large, it is difficult to quickly obtain point cloud data of the stockpile. Summary of the Invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for determining a material pile point cloud that can quickly obtain point cloud data of the material pile in order to address the above technical problems.
[0006] In a first aspect, the present application provides a method for determining a stockpile point cloud. The method comprises:
[0007] Projecting point cloud data corresponding to a scene to be measured into a plurality of two-dimensional grids to obtain a first height value set of all points in each two-dimensional grid; wherein the scene to be measured is a scene including a stockpile;
[0008] For each two-dimensional grid, determining a height range of all points in the two-dimensional grid according to the maximum value in the first height value set;
[0009] For each two-dimensional grid, within the height range, identifying a height sub-range that satisfies a preset stockpile height distribution condition;
[0010] The point cloud data of the stockpile is determined based on the point cloud data within the height sub-range.
[0011] In one embodiment, the height sub-range is a subsequence of continuous height intervals corresponding to the stockpile; and for each two-dimensional grid, within the height range, identifying a height sub-range that satisfies a preset stockpile height distribution condition comprises:
[0012] For each two-dimensional grid, the height range is divided into a preset interval division method to obtain a height interval sequence consisting of multiple height intervals and the first number of all points in each height interval;
[0013] For each two-dimensional grid, identifying, based on the first number, at least one continuous height interval subsequence in the height interval sequence; wherein the continuous height interval subsequence is a sequence consisting of at least two continuous height intervals, and each height interval in the continuous height interval subsequence contains a point;
[0014] For each two-dimensional grid, a second number of all points in each continuous height interval subsequence is obtained, and based on the second number, a continuous height interval subsequence corresponding to the stockpile is determined in the at least one continuous height interval subsequence.
[0015] In one embodiment, determining, based on the second number, a continuous height interval subsequence corresponding to the stockpile in the at least one continuous height interval subsequence includes:
[0016] Determine a lowest continuous height interval subsequence in the at least one continuous height interval subsequence, and use the lowest continuous height interval subsequence as a target continuous height interval subsequence;
[0017] Comparing the second number of all points in the target continuous height interval subsequence with a preset number threshold;
[0018] If the second number of all points in the target continuous height interval subsequence is greater than or equal to the preset number threshold, the target continuous height interval subsequence is determined as the continuous height interval subsequence corresponding to the stockpile;
[0019] If the second number of all points in the target continuous height interval subsequence is less than the preset number threshold, determining the next lowest continuous height interval subsequence in the at least one continuous height interval subsequence, and using the next lowest continuous height interval subsequence as the target continuous height interval sequence;
[0020] Return to the step of comparing the second number of all points in the target continuous height interval subsequence with the preset number threshold until a continuous height interval subsequence corresponding to the stockpile is determined from the at least one continuous height interval subsequence.
[0021] In one embodiment, determining the point cloud data of the stockpile based on the point cloud data within the height sub-range includes:
[0022] In all two-dimensional grids, the point cloud data within the height sub-range is determined as the point cloud data of the stockpile.
[0023] In one embodiment, determining the point cloud data of the stockpile based on the point cloud data within the height sub-range includes:
[0024] For each two-dimensional grid, obtaining a second height value set of all points in a continuous height interval subsequence corresponding to the stockpile, and determining an initial material height value corresponding to the two-dimensional grid based on the second height value set;
[0025] For each target two-dimensional grid, obtaining the initial material height value corresponding to the reliable two-dimensional grid in the neighborhood of the target two-dimensional grid; wherein the target two-dimensional grid is the two-dimensional grid among all the two-dimensional grids except the two-dimensional grid at the outermost edge;
[0026] For each target two-dimensional grid, determining a reference material height value corresponding to the target two-dimensional grid according to initial material height values corresponding to reliable two-dimensional grids in the neighborhood of the target two-dimensional grid;
[0027] For each target two-dimensional grid, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to a preset difference threshold, then according to the reference material height value, the number of rows and columns of the target two-dimensional grid, the corrected point cloud data corresponding to the material pile in the target two-dimensional grid is determined;
[0028] The corrected point cloud data corresponding to the material pile in the target two-dimensional grid and the point cloud data in the continuous height interval subsequence corresponding to the material pile in other two-dimensional grids are determined as the point cloud data of the material pile.
[0029] In one embodiment, the method further comprises:
[0030] For each target two-dimensional grid, obtaining an initial two-dimensional grid in the neighborhood of the target two-dimensional grid;
[0031] If the third number of all points in the initial two-dimensional grid is greater than or equal to a preset threshold, the initial two-dimensional grid is determined as a candidate two-dimensional grid;
[0032] Construct polygonal areas based on the location data of all candidate two-dimensional grids;
[0033] If the position data of the target two-dimensional grid is located within the polygonal area, the candidate two-dimensional grid is determined as the reliable two-dimensional grid.
[0034] In one embodiment, the method further comprises:
[0035] Acquiring initial point cloud data within the scene to be measured; wherein the initial point cloud data is collected by multiple point cloud scanning devices;
[0036] Calculating the confidence level of each point originating from a target point cloud scanning device based on the initial point cloud data and the position data of each point cloud scanning device; wherein the target point cloud scanning device is the point cloud scanning device that actually scans the point;
[0037] For each point, if the confidence level satisfies a preset unreliable point condition, the point is determined as an unreliable point;
[0038] In the initial point cloud data, the point data of the unreliable points are eliminated to obtain the point cloud data corresponding to the scene to be measured.
[0039] In a second aspect, the present application further provides a device for determining a stockpile point cloud. The device comprises:
[0040] A point cloud projection module is used to project the point cloud data corresponding to the scene to be measured into multiple two-dimensional grids to obtain a set of first height values of all points in each two-dimensional grid; wherein the scene to be measured is a scene containing a stockpile;
[0041] a range determination module, configured to determine, for each two-dimensional grid, a height range of all points in the two-dimensional grid according to a maximum value in the first height value set;
[0042] A range identification module is used to identify, for each two-dimensional grid, a height sub-range within the height range that meets a preset stockpile height distribution condition;
[0043] The point cloud determination module is used to determine the point cloud data of the material pile based on the point cloud data within the height sub-range.
[0044] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:
[0045] Projecting point cloud data corresponding to a scene to be measured into a plurality of two-dimensional grids to obtain a first height value set of all points in each two-dimensional grid; wherein the scene to be measured is a scene including a stockpile;
[0046] For each two-dimensional grid, determining a height range of all points in the two-dimensional grid according to the maximum value in the first height value set;
[0047] For each two-dimensional grid, within the height range, identifying a height sub-range that satisfies a preset stockpile height distribution condition;
[0048] The point cloud data of the stockpile is determined based on the point cloud data within the height sub-range.
[0049] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0050] Projecting point cloud data corresponding to a scene to be measured into a plurality of two-dimensional grids to obtain a first height value set of all points in each two-dimensional grid; wherein the scene to be measured is a scene including a stockpile;
[0051] For each two-dimensional grid, determining a height range of all points in the two-dimensional grid according to the maximum value in the first height value set;
[0052] For each two-dimensional grid, within the height range, identifying a height sub-range that satisfies a preset stockpile height distribution condition;
[0053] The point cloud data of the stockpile is determined based on the point cloud data within the height sub-range.
[0054] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0055] Projecting point cloud data corresponding to a scene to be measured into a plurality of two-dimensional grids to obtain a first height value set of all points in each two-dimensional grid; wherein the scene to be measured is a scene including a stockpile;
[0056] For each two-dimensional grid, determining a height range of all points in the two-dimensional grid according to the maximum value in the first height value set;
[0057] For each two-dimensional grid, within the height range, identifying a height sub-range that satisfies a preset stockpile height distribution condition;
[0058] The point cloud data of the stockpile is determined based on the point cloud data within the height sub-range.
[0059] The above-described method, apparatus, computer device, storage medium, and computer program product for determining a material pile point cloud first projects the point cloud data corresponding to a scene to be measured, including a material pile, onto multiple two-dimensional grids to obtain a first set of height values for all points within each two-dimensional grid. Then, for each two-dimensional grid, the height range of all points within the two-dimensional grid is determined based on the maximum value in the first set of height values. Then, for each two-dimensional grid, a height sub-range within the height range that satisfies a preset material pile height distribution condition is identified. Finally, based on the point cloud data within the height sub-range, the point cloud data for the material pile is determined. It will be understood that the present application divides the point cloud data into two-dimensional grids and identifies the height sub-range within which the material pile is located within the height range determined by all points contained in each two-dimensional grid. Thus, the point cloud data for the material pile can be found within the point cloud data within this height sub-range. This method identifies the height region within which the material pile is located based on the height value information, and then locates the point cloud data for the material pile within this height region. This method eliminates the need for clustering to obtain the point cloud data for the material pile, conserves computational resources, and facilitates rapid acquisition of the point cloud data for the material pile. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 FIG. 1 is an application environment diagram of a method for determining a stockpile point cloud in one embodiment;
[0061] Figure 2 A schematic diagram of a flow chart of a refinement scheme for identifying, within a height range, a height sub-range that satisfies a preset stockpile height distribution condition for each two-dimensional grid in one embodiment;
[0062] Figure 3 1 is a structural block diagram of a device for determining a stockpile point cloud in one embodiment;
[0063] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0065] In one embodiment, Figure 1As shown, a method for determining a point cloud of a material pile is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a point cloud scanning device, and can also be applied to a system including a point cloud scanning device and a server, and is implemented through the interaction between the point cloud scanning device and the server. Among them, the point cloud scanning device can be, but is not limited to, a millimeter wave radar and a light field camera. Taking into account that in actual scenarios, there is a large amount of dust in the environment where the material pile is located, in order to effectively avoid the interference of dust on scanning imaging, in one embodiment, a millimeter wave radar is used. The reason is that its wavelength is longer, and the propagation process can better avoid dust interference, so that the material pile in the scene to be measured can be better imaged. The server can be implemented as an independent server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:
[0066] Step S102 : Projecting the point cloud data corresponding to the scene to be measured into a plurality of two-dimensional grids to obtain a first height value set of all points in each two-dimensional grid.
[0067] The scene to be measured is a scene containing a stockpile. The point cloud data includes the plane position data of the point and the first height value of the point. The plane position data of point i can be represented by (x(i), y(i)), and the first height value of point i can be represented by z(i). A two-dimensional grid refers to a grid divided based on a horizontal plane (e.g., the ground) within the scene to be measured. A first height value set refers to a set consisting of at least one first height value.
[0068] Specifically, the server projects the point data of each point in the point cloud data into the corresponding two-dimensional grid based on the plane position data of the point, and obtains a set of first height values of all points in each two-dimensional grid.
[0069] Step S104 : for each two-dimensional grid, determine the height range of all points in the two-dimensional grid according to the maximum value in the first height value set.
[0070] Specifically, for each two-dimensional grid, the server determines the height range of all points in the two-dimensional grid according to the minimum height value and the maximum height value in the first height value set. In one embodiment, assuming that for each two-dimensional grid, the minimum height value of the point is z min , the maximum height value is z max , then the height range is (z min , z max ).
[0071] Step S106: for each two-dimensional grid, within the height range, identify a height sub-range that meets a preset stockpile height distribution condition.
[0072] Specifically, for each two-dimensional grid, the server identifies a height sub-range within the height range that meets the preset material pile height distribution conditions, that is, finds the height range of the material pile in each two-dimensional grid. In one embodiment, the height sub-range is a continuous height interval sub-sequence corresponding to the material pile. Based on this, the server divides the height range in a preset interval division method for each two-dimensional grid to obtain a height interval sequence consisting of multiple height intervals and the first number of all points in each height interval. Then, for each two-dimensional grid, the server identifies at least one continuous height interval sub-sequence in the height interval sequence based on the first number. A continuous height interval sub-sequence is a sequence consisting of at least two continuous height intervals, and each height interval in the continuous height interval sub-sequence contains points. Finally, for each two-dimensional grid, the second number of all points in each continuous height interval sub-sequence is obtained, and based on the second number, the continuous height interval sub-sequence corresponding to the material pile is determined in at least one continuous height interval sub-sequence.
[0073] Step S108 : determining the point cloud data of the discharge pile based on the point cloud data within the height sub-range.
[0074] Specifically, because the height sub-range within each two-dimensional grid represents the height range of the material pile within that two-dimensional grid, the server can determine the point cloud data of the material pile based on the point cloud data within the height sub-range. In one embodiment, the server determines the point cloud data within the height sub-range within all two-dimensional grids as the point cloud data of the material pile. In another embodiment, the server determines the point cloud data within a subsequence of consecutive height intervals as the point cloud data of the material pile.
[0075] In the above-mentioned method for determining a material pile point cloud, the point cloud data corresponding to the scene to be measured, including the material pile, is first projected onto multiple two-dimensional grids to obtain a first set of height values for all points within each two-dimensional grid. Then, for each two-dimensional grid, the height range of all points within the two-dimensional grid is determined based on the maximum value in the first set of height values. Then, for each two-dimensional grid, a height sub-range within the height range that satisfies a preset material pile height distribution condition is identified. Finally, based on the point cloud data within the height sub-range, the point cloud data of the material pile is determined. It will be understood that this method divides the point cloud data into two-dimensional grids and identifies the height sub-range within which the material pile is located within the height range determined by all points contained in each two-dimensional grid. Thus, the point cloud data of the material pile can be found within the point cloud data within this height sub-range. This method identifies the height region where the material pile is located based on the height value information, and then finds the point cloud data of the material pile within this height region. This method eliminates the need for clustering to obtain the point cloud data of the material pile, saves computational resources, and facilitates the rapid acquisition of the point cloud data of the material pile.
[0076] In one embodiment, the height sub-range is a continuous height interval subsequence corresponding to the stockpile. The continuous height interval subsequence is a sequence consisting of at least two continuous height intervals, and each height interval in the continuous height interval subsequence contains a point. The height interval is obtained by dividing the height range into intervals. Based on this, Figure 2 As shown, step S106 includes the following steps:
[0077] Step S1062: For each two-dimensional grid, the height range is divided into a predetermined interval division method to obtain a height interval sequence consisting of a plurality of height intervals and the first number of all points in each height interval;
[0078] Step S1064: for each two-dimensional grid, identifying at least one continuous height interval subsequence in the height interval sequence according to the first number;
[0079] Step S1066: for each two-dimensional grid, obtain the second number of all points in each continuous height interval subsequence, and determine the continuous height interval subsequence corresponding to the stockpile in at least one continuous height interval subsequence based on the second number.
[0080] Specifically, the server has a pre-stored section size. The height range is (z min , z max The server calculates the number of intervals based on the interval size and height range: Where floor represents rounding down. Thus, the server divides the height range according to the interval size and the number of intervals, obtaining a height interval sequence consisting of sectionNum height intervals and the first number of all points in each height interval. In one embodiment, a bins array is used to store the first number of all points in each height interval. As shown in Table 1, which is an exemplary format of a bins array, it indicates that the height interval sequence is a sequence of 10 height intervals.
[0081] 3 1 2 2 0 0 5 2 0 0
[0082] Table 1
[0083] Then, for each two-dimensional grid, the server identifies at least one continuous height interval subsequence in the height interval sequence based on the first number. Taking Table 1 as an example, the point cloud within the two-dimensional grid covers two continuous height interval subsequences in the height dimension (z dimension), namely: a continuous height interval subsequence consisting of the height intervals of 3, 1, 2, and 2, and a continuous height interval subsequence consisting of the height intervals of 5 and 2. In other embodiments, if no continuous height interval subsequence is identified in the height interval sequence based on the first number, the step of ending the process is executed.
[0084] Afterwards, the server obtains the second number of all points in each continuous height interval subsequence for each two-dimensional grid, and determines the continuous height interval subsequence corresponding to the stockpile in at least one continuous height interval subsequence based on the second number. In one embodiment, the server determines the lowest continuous height interval subsequence in at least one continuous height interval subsequence and uses the lowest continuous height interval subsequence as the target continuous height interval subsequence; compares the second number of all points in the target continuous height interval subsequence with a preset number threshold; if the second number of all points in the target continuous height interval subsequence is greater than or equal to the preset number threshold, the target continuous height interval subsequence is determined as the continuous height interval subsequence corresponding to the stockpile; if the second number of all points in the target continuous height interval subsequence is less than the preset number threshold, the server determines the next lowest continuous height interval subsequence in at least one continuous height interval subsequence and uses the next lowest continuous height interval subsequence as the target continuous height interval sequence; and returns to the step of comparing the second number of all points in the target continuous height interval subsequence with the preset number threshold until a continuous height interval subsequence corresponding to the stockpile is determined from at least one continuous height interval subsequence. The preset number threshold is an empirical value obtained through long-term model simulation research and development and the collection, demonstration and verification of experimental data.
[0085] In this embodiment, the height range within each two-dimensional grid is divided into intervals. Within this divided height interval sequence, at least one continuous height interval subsequence is identified, i.e., the height range where an object is present. Within these height ranges, the corresponding continuous height interval subsequence is then identified, i.e., the height range where the material pile is located. This allows accurate determination of the material point cloud data based on the height range of the material pile, improving the accuracy of material pile point cloud recognition.
[0086] In one embodiment, the method further includes: calculating the index (indY, indX) of any point (x(i), y(i)) in the two-dimensional grid by the following formula:
[0087]
[0088]
[0089] Among them, floor means rounding down, roi.min_x represents the minimum x value among the boundary values in the horizontal plane area of the scene to be measured, roi.min_y represents the minimum y value among the boundary values in the horizontal plane area of the scene to be measured, and blockSize.x and blockSize.y represent the size data of the two-dimensional grid.
[0090] By calculating the index of a point in a two-dimensional grid, it is convenient to subsequently use this index to find the point cloud data within the corresponding two-dimensional grid. For example, in step S102, the first set of height values can be obtained by determining all points within each two-dimensional grid based on the index corresponding to the point, and then determining the first set of height values for all points within each two-dimensional grid. It is understood that in other steps involved in the embodiment of the present application, if it involves the process of obtaining point cloud data within a two-dimensional grid, the point cloud data within each two-dimensional grid can be found using the above-mentioned index information.
[0091] In one embodiment, the method further includes: calculating an interval identifier (ID) of the height interval in which any point z(i) is located by the following formula:
[0092]
[0093] By establishing an association between the interval identifier of the height interval and all points in the height interval, it is convenient to find the point cloud data in the corresponding height interval through the interval identifier.
[0094] In one embodiment, a possible implementation of step S1066 of "determining, based on the second number, a continuous height interval subsequence corresponding to the stockpile in at least one continuous height interval subsequence" is provided. Based on the above embodiment, the implementation includes the following steps:
[0095] Step S106a, determining the lowest continuous height interval subsequence in at least one continuous height interval subsequence, and using the lowest continuous height interval subsequence as a target continuous height interval subsequence;
[0096] Step S106b, comparing the second number of all points in the target continuous height interval subsequence with a preset number threshold;
[0097] Step S106c: if the second number of all points in the target continuous height interval subsequence is greater than or equal to the preset number threshold, the target continuous height interval subsequence is determined as the continuous height interval subsequence corresponding to the stockpile;
[0098] Step S106d: If the second number of all points in the target continuous height interval subsequence is less than the preset number threshold, then in at least one continuous height interval subsequence, determine the next lowest continuous height interval subsequence, and use the next lowest continuous height interval subsequence as the target continuous height interval sequence;
[0099] Step S106e, returns to the step of comparing the second number of all points in the target continuous height interval subsequence with the preset number threshold, that is, returns to step S106c, until the continuous height interval subsequence corresponding to the discharge pile is determined from at least one continuous height interval subsequence.
[0100] Specifically, the server first finds the lowest continuous height interval subsequence from at least one continuous height interval subsequence. If the second numbers of all points in the lowest continuous height interval subsequence are less than the preset number threshold, the server finds the next lowest continuous height interval subsequence. If the second numbers of all points in the next lowest continuous height interval subsequence are less than the preset number threshold, the server continues to traverse each continuous height interval subsequence in order from low to high until a continuous height interval subsequence is found in which the second numbers of all points are greater than or equal to the preset number threshold. The continuous height interval subsequence that meets the number threshold requirement is determined as the continuous height interval subsequence corresponding to the pile.
[0101] In this embodiment, we consider the presence of multiple cloud points within the two-dimensional grid, such as when there are high-rise metal supports above a pile, which can result in interference noise above the metal supports. Since piles of material on the ground are typically located in the lowest area, we first search the lowest continuous height interval subsequence, determining whether the second number of all points within this continuous height interval subsequence meets the material count threshold requirement. If so, this continuous height interval subsequence corresponds to the pile. Otherwise, we continue searching for the next lowest continuous height interval subsequence until we determine the continuous height interval subsequence corresponding to the pile.
[0102] In one embodiment, step S108 includes the following steps:
[0103] Step S1081: for each two-dimensional grid, obtain a second height value set of all points in a continuous height interval subsequence corresponding to the stockpile, and determine an initial material height value corresponding to the two-dimensional grid based on the second height value set;
[0104] Step S1082: for each target two-dimensional grid, obtaining the initial material height value corresponding to the reliable two-dimensional grid in the neighborhood of the target two-dimensional grid;
[0105] Step S1083, for each target two-dimensional grid, determining a reference material height value corresponding to the target two-dimensional grid based on the initial material height values corresponding to the reliable two-dimensional grids in the neighborhood of the target two-dimensional grid;
[0106] Step S1084: For each target two-dimensional grid, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to a preset difference threshold, then the corrected point cloud data corresponding to the material pile in the target two-dimensional grid is determined based on the reference material height value and the number of rows and columns of the target two-dimensional grid;
[0107] Step S1085: Determine the point cloud data of the stockpile by using the corrected point cloud data corresponding to the stockpile in the target two-dimensional grid and the point cloud data in the continuous height interval subsequence corresponding to the stockpiles in other two-dimensional grids.
[0108] Among them, the target two-dimensional grid is the two-dimensional grid except the two-dimensional grids located at the outermost edges among all two-dimensional grids. That is, the target grid refers to the two-dimensional grid where i > 1 and i < rows, and j > 1 and j < cols. i represents the row number of the two-dimensional grid, j represents the column number of the two-dimensional grid, rows represents the total number of rows of all two-dimensional grids, and cols represents the total number of columns of all two-dimensional grids.
[0109] Specifically, for each two-dimensional grid, the server obtains the interval identifier of each height interval in the continuous height interval subsequence corresponding to the stockpile, and then obtains the set of second height values of all points associated with this interval identifier. Based on the set of second height values, the server determines the initial material height value corresponding to the two-dimensional grid. In one embodiment, the server determines the maximum height value in the set of second height values as the initial material height value corresponding to the two-dimensional grid. The determination method of the initial material height value corresponding to the two-dimensional grid in this embodiment is relatively simple. In another embodiment, the server determines the average value of the height values in the set of second height values as the initial material height value corresponding to the two-dimensional grid. In this embodiment, the adverse effects caused by the error of a single height value can be eliminated, which is beneficial to ensuring the accuracy of the initial material height value. In yet another embodiment, the server determines the mode of the height values in the set of second height values as the initial material height value corresponding to the two-dimensional grid. In this embodiment, the adverse effects caused by the error of a single height value can be eliminated, which is beneficial to ensuring the accuracy of the initial material height value.
[0110] Then, for each target two-dimensional grid, the server obtains the initial material height value corresponding to the reliable two-dimensional grid in the neighborhood of the target two-dimensional grid. In one embodiment, for each target two-dimensional grid, the server obtains eight initial two-dimensional grids in the eight-neighborhood of the target two-dimensional grid. For the target two-dimensional grid (i, j), the eight two-dimensional grids in its eight-neighborhood are (i-1, j-1), (i-1, j), (i-1, j+1), (i, j-1), (i, j+1), (i+1, j-1), (i+1, j), (i+1, j+1). Then, the server determines the reliable two-dimensional grid from the eight initial two-dimensional grids. In one embodiment, the server directly determines the eight initial two-dimensional grids as reliable two-dimensional grids. In another embodiment, the server obtains an initial two-dimensional grid within the neighborhood of each target two-dimensional grid; if the third number of all points in the initial two-dimensional grid is greater than or equal to a preset threshold, the initial two-dimensional grid is determined as a candidate two-dimensional grid; a polygonal area is constructed based on the position data of all candidate two-dimensional grids; if the position data of the target two-dimensional grid is within the polygonal area, the candidate two-dimensional grid is determined as a reliable two-dimensional grid.
[0111] Afterwards, the server determines, for each target two-dimensional grid, a reference material height value corresponding to the target two-dimensional grid based on the initial material height values corresponding to the reliable two-dimensional grids within the neighborhood of the target two-dimensional grid. In one embodiment, the server determines the mean of the initial material height values corresponding to the reliable two-dimensional grids within the eight neighborhoods of the target two-dimensional grid as the reference material height value corresponding to the target two-dimensional grid. In another embodiment, the server determines the minimum value among the initial material height values corresponding to the reliable two-dimensional grids within the eight neighborhoods of the target two-dimensional grid as the reference material height value corresponding to the target two-dimensional grid. In yet another embodiment, the server determines the maximum value among the initial material height values corresponding to the reliable two-dimensional grids within the eight neighborhoods of the target two-dimensional grid as the reference material height value corresponding to the target two-dimensional grid. In yet another embodiment, the server determines the mode of the initial material height values corresponding to the reliable two-dimensional grids within the eight neighborhoods of the target two-dimensional grid as the reference material height value corresponding to the target two-dimensional grid.
[0112] Afterwards, for each target two-dimensional grid, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to the preset difference threshold, the server determines the corrected point cloud data corresponding to the material pile in the target two-dimensional grid based on the reference material height value, the number of rows and columns of the target two-dimensional grid. The preset difference threshold is an empirical value obtained through long-term model simulation research and development and the collection, demonstration and verification of experimental data. Specifically, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to the preset difference threshold, the server substitutes the reference material height value, the number of rows and columns of the target two-dimensional grid into the following point cloud data correction formula to obtain the corrected point cloud data corresponding to the material pile in the target two-dimensional grid. At the same time, the server deletes the original point cloud data in the target two-dimensional grid.
[0113]
[0114] Where x, y, and z represent the corrected point cloud data, roi represents the boundary value of the horizontal plane area in the scene to be measured, min_x represents the minimum value of x in the boundary value, min_y represents the minimum value of y in the boundary value, blockSize.x and blockSize.y represent the size data of the two-dimensional grid, i represents the row number of the target two-dimensional grid, and j represents the column number of the target two-dimensional grid.
[0115] On the other hand, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is less than the preset difference threshold, it is determined that the initial material height value is normal.
[0116] Finally, the server determines the corrected point cloud data corresponding to the material pile in the target two-dimensional grid and the point cloud data in the continuous height interval subsequence corresponding to the material pile in other two-dimensional grids as the point cloud data of the material pile.
[0117] In this embodiment, considering that in the point cloud data of the material pile, the point cloud data corresponding to local burrs caused by imaging errors may have a sudden change in height value compared to the surrounding point cloud data, the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value determined by the initial material height value corresponding to the two-dimensional grid within the neighborhood is calculated. If the difference is large, it indicates a sudden change in the point cloud data, that is, the presence of a local burr, and the point cloud data at that location needs to be corrected. To this end, a preset point cloud data correction formula is used to obtain the corrected point cloud data corresponding to the material pile within the two-dimensional grid. This point cloud data correction formula uses the reference material height value as the height value of the corrected point cloud. In this way, the resulting point cloud data of the material pile is more accurate.
[0118] In one embodiment, a specific method for determining a reliable two-dimensional grid includes the following steps:
[0119] Step S112, for each target two-dimensional grid, obtaining an initial two-dimensional grid in the neighborhood of the target two-dimensional grid;
[0120] Step S114: if the third number of all points in the initial two-dimensional grid is greater than or equal to a preset threshold, the initial two-dimensional grid is determined as a candidate two-dimensional grid;
[0121] Step S116, constructing a polygonal area based on the position data of all candidate two-dimensional grids;
[0122] Step S118: If the position data of the target two-dimensional grid is located within the polygonal area, the candidate two-dimensional grid is determined as a reliable two-dimensional grid.
[0123] Specifically, in one embodiment, for each target 2D grid, the server obtains eight initial 2D grids within the target 2D grid's eight-neighborhood. The server then compares the third number of all points within each initial 2D grid with a preset threshold. If the third number is greater than or equal to the threshold, indicating that valid point cloud data exists within the initial 2D grid, the initial 2D grid is then identified as a candidate 2D grid. The preset threshold is an empirical value derived through long-term model simulation development and experimental data collection, demonstration, and verification. The server then constructs a polygonal region based on the position data of all candidate 2D grids (e.g., (i-1, j-1), (i-1, j), (i-1, j+1), (i, j+1), (i+1, j+1), (i+1, j), (i+1, j-1), and (i, j-1)). The server then determines whether the position data (i, j) of the target 2D grid lies within the polygonal region. If so, the server identifies the candidate 2D grid as a reliable 2D grid. If not, the server terminates the process.
[0124] In this embodiment, by comparing the third number of all points in the initial two-dimensional grid with a preset threshold, the two-dimensional grids with valid point cloud data can be found, and then a polygonal area is constructed based on the position data of these two-dimensional grids, and it is determined whether the position data of the target two-dimensional grid is within the polygonal area. If so, it indicates that there are reliable neighborhood reference values around the target two-dimensional grid. In this way, the point cloud data of the target two-dimensional grid is corrected using the reliable neighborhood reference values, which is conducive to improving the accuracy of the correction.
[0125] In one embodiment, the method further comprises the following steps:
[0126] Step S122, obtaining initial point cloud data within the scene to be measured;
[0127] Step S124, calculating the confidence level of each point originating from the target point cloud scanning device based on the initial point cloud data and the position data of each point cloud scanning device;
[0128] Step S126: for each point, if the confidence level satisfies the preset unreliable point condition, the point is determined as an unreliable point;
[0129] Step S128 : removing the point data of unreliable points from the initial point cloud data to obtain point cloud data corresponding to the scene to be measured.
[0130] The initial point cloud data is collected by multiple point cloud scanning devices, and the target point cloud scanning device is the point cloud scanning device that actually scans the points.
[0131] Specifically, within the scene to be measured, initial point cloud data is obtained by scanning with multiple point cloud scanning devices and uploaded to the server. Generally, the use of multiple point cloud scanning devices to work together is suitable for situations where the area of the scene to be measured is large. Taking two point cloud scanning devices as an example, the far point scanned by the first point cloud scanning device is set within the main area of the scanning area of the second point cloud scanning device, thereby completing the best complementarity, thereby achieving the purpose of completely covering the area within the scene to be measured. In the initial point cloud data, the point data of each point is associated with the device identification of the point cloud scanning device that actually scanned the point, that is, the device ID. The server calculates the confidence level that each point originates from the target point cloud scanning device based on the position data of each point in the initial point cloud data and the position data of each point cloud scanning device. This confidence level is used to characterize the probability that each point originates from the target point cloud scanning device.
[0132] In one embodiment, the server calculates the relative distance between each point and each point cloud scanning device based on the position data of each point in the initial point cloud data and the position data of each point cloud scanning device. The server then calculates the reciprocal of the relative distance between each point and each point cloud scanning device. The server then sums the reciprocals of the relative distances between each point and multiple point cloud scanning devices to obtain a sum of the reciprocals. Finally, the server divides the reciprocal of the relative distance between each point and the target point cloud scanning device by the sum of the reciprocals to obtain a confidence score that each point originated from the target point cloud scanning device.
[0133] For example, assuming that the two-dimensional coordinates of point i in the horizontal plane are (x(i), y(i)), and the two-dimensional coordinates of point cloud scanning device j in the horizontal plane are (radar(j).x, radar(j).y), the relative distance between point i and point cloud scanning device j is: In one embodiment, if there are two point cloud scanning devices, the device identifier of the first point cloud scanning device is device serial number 1, and the two-dimensional coordinates of the first point cloud scanning device in the horizontal plane are (radar(1).x, radar(1).y); the device identifier of the second point cloud scanning device is device serial number 2, and the two-dimensional coordinates of the second point cloud scanning device in the horizontal plane are (radar(2).x, radar(2).y). According to the above relative distance calculation formula, the relative distance between point i and point cloud scanning device 1 is dist(1), and the relative distance between point i and point cloud scanning device 2 is dist(2). In one embodiment, assuming that the point cloud scanning device that actually scans point i is point cloud scanning device 1, that is, the target point cloud scanning device, then the confidence level that point i originates from target point cloud scanning device 1 is:
[0134] For each point, the server determines it as an unreliable point if the confidence level that the point originated from the target point cloud scanning device meets a preset unreliable point condition. In one embodiment, for each point, the server obtains the device identifier of the target point cloud scanning device, the actual source of the point. The server then obtains a preset confidence threshold associated with the device identifier. Finally, if the confidence level that the point originated from the target point cloud scanning device is less than or equal to the preset confidence threshold, the server determines the point as an unreliable point.
[0135] Continuing with the previous example, assume that the preset confidence threshold associated with device serial number 1 of the target point cloud scanning device 1 is 0.6, and the confidence that point i originates from the target point cloud scanning device 1 is 0.2. Since 0.2<0.6, point i is an unreliable point.
[0136] The server removes the point data of unreliable points from the initial point cloud data to obtain the point cloud data corresponding to the scene to be measured.
[0137] In this embodiment, the confidence of each point originating from the target point cloud scanning device is calculated through the confidence calculation formula and compared with the preset confidence threshold. Unreliable points with lower confidence can be found, that is, points with poor accuracy of position data can be found. Then, after eliminating the point data of these unreliable points, the point cloud data corresponding to the scene to be tested will be more accurate, which is beneficial to the accuracy of subsequent material pile point cloud recognition.
[0138] In one embodiment, there is only one point cloud scanning device. Usually, only one point cloud scanning device is used, which is suitable for situations where the area of the scene to be measured is small, so that one point cloud scanning device can completely cover the area within the scene to be measured. Since the point cloud scanning device has angle and distance errors during the scanning process, the accuracy of the position data of points farther away from the point cloud scanning device is poor. Therefore, it is necessary to eliminate the point data of unreliable points with poor data accuracy. In this regard, in one embodiment, the server calculates the relative distance between each point and the point cloud scanning device based on the position data of each point in the initial point cloud data and the position data of the point cloud scanning device. Then, for each point, if the relative distance is greater than a preset distance threshold, the server determines the point as an unreliable point. Finally, the server eliminates the point data of unreliable points in the initial point cloud data to obtain the point cloud data corresponding to the scene to be measured.
[0139] In this embodiment, a preset distance threshold is set to find unreliable points that are far away from the point cloud scanning device, and then the point data of the unreliable points are eliminated from the initial point cloud data, so that the accuracy of the retained point cloud data is higher, which is conducive to the subsequent accurate identification of the point cloud data of the material pile.
[0140] In one embodiment, the position data of each point in the initial point cloud data is coordinate data in the world coordinate system. The coordinate data is obtained as follows: first, the point cloud scanning device is installed at a higher position, for example, in an indoor scene, it can be installed on a fixed dome. The point cloud scanning device performs an all-round scan of the pile of materials through an internal pitch-horizontal rotation device, or follows a carrier device such as a guide rail. Taking the point cloud scanning device as a radar scanning system as an example, the parameter directly obtained by the radar scanning is the radial distance r, and the pitch-horizontal rotation device or the carrier device outputs the pitch angle ε and the azimuth angle α. The radial distance r, the pitch angle ε and the azimuth angle α are used as the source data output by the radar scanning system in the polar coordinate system.
[0141] Then, the source data in the polar coordinate system is converted to the radar coordinate system (rectangular coordinate system) using the following formula to obtain x, y and z:
[0142] x=r×cos(ε)×sin(α);
[0143] y = r × cos(ε) × cos(α);
[0144] z=r×sin(ε);
[0145] Afterwards, since the coordinate data in the radar coordinate system uses the radar itself as the origin of the coordinate system, it is not conducive to the user's understanding and analysis. Therefore, the coordinate data in the radar coordinate system needs to be converted to the world coordinate system using the following formula to obtain x', y' and z', which are the initial point cloud data in the scene to be measured.
[0146] make
[0147]
[0148]
[0149] but
[0150] X′=[RT]X;
[0151] Where R represents the rotation matrix and T represents the translation matrix.
[0152] When there are multiple point cloud scanning devices, the initial point cloud data also includes the device identification of the target point cloud scanning device where each point actually originates, such as a radar serial number.
[0153] In this embodiment, the source data directly collected by the point cloud scanning device is transformed into a coordinate system twice to obtain point cloud data in the world coordinate system. The point cloud data in the world coordinate system is more in line with the actual situation of the actual scene, which is helpful for the user's understanding and analysis. It should be understood that although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0154] Based on the same inventive concept, embodiments of the present application also provide a material pile point cloud determination device for implementing the aforementioned material pile point cloud determination method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of the one or more material pile point cloud determination device embodiments provided below can be found in the limitations of the material pile point cloud determination method described above and will not be further elaborated here.
[0155] In one embodiment, Figure 3 As shown, a device for determining a stockpile point cloud is provided, comprising:
[0156] The point cloud projection module 202 is used to project the point cloud data corresponding to the scene to be measured into multiple two-dimensional grids to obtain a set of first height values of all points in each two-dimensional grid; wherein the scene to be measured is a scene including a stockpile;
[0157] A range determination module 204 is configured to determine, for each two-dimensional grid, a height range of all points in the two-dimensional grid according to a maximum value in the first height value set;
[0158] Range identification module 206, for identifying, for each two-dimensional grid, within the height range, a height sub-range that satisfies a preset stockpile height distribution condition;
[0159] The point cloud determination module 208 is configured to determine the point cloud data of the discharge pile based on the point cloud data within the height sub-range.
[0160] In one embodiment, the height sub-range is a subsequence of continuous height intervals corresponding to the stockpile. The range identification module 206 is specifically configured to, for each two-dimensional grid, divide the height range into a predetermined interval division method, thereby obtaining a height interval sequence consisting of multiple height intervals and a first number of all points within each height interval; for each two-dimensional grid, based on the first number, identify at least one continuous height interval subsequence in the height interval sequence; wherein a continuous height interval subsequence is a sequence consisting of at least two continuous height intervals, each height interval in the continuous height interval subsequence containing points; for each two-dimensional grid, obtain a second number of all points within each continuous height interval subsequence, and, based on the second number, determine a continuous height interval subsequence corresponding to the stockpile in the at least one continuous height interval subsequence.
[0161] In one embodiment, the range identification module 206 is specifically used to determine the lowest continuous height interval subsequence in at least one continuous height interval subsequence, and use the lowest continuous height interval subsequence as the target continuous height interval subsequence; compare the second numbers of all points in the target continuous height interval subsequence with the preset number threshold; if the second numbers of all points in the target continuous height interval subsequence are greater than or equal to the preset number threshold, then determine the target continuous height interval subsequence as the continuous height interval subsequence corresponding to the material pile; if the second numbers of all points in the target continuous height interval subsequence are less than the preset number threshold, then determine the second lowest continuous height interval subsequence in at least one continuous height interval subsequence, and use the second lowest continuous height interval subsequence as the target continuous height interval sequence; return to the step of comparing the second numbers of all points in the target continuous height interval subsequence with the preset number threshold until the continuous height interval subsequence corresponding to the material pile is determined from at least one continuous height interval subsequence.
[0162] In one embodiment, the point cloud determination module 208 is specifically configured to determine point cloud data within a height sub-range in all two-dimensional grids as point cloud data of the stockpile.
[0163] In one embodiment, the point cloud determination module 208 is specifically configured to obtain, for each two-dimensional grid, a second height value set of all points within a continuous height interval subsequence corresponding to the stockpile, and determine an initial material height value corresponding to the two-dimensional grid based on the second height value set; obtain, for each target two-dimensional grid, initial material height values corresponding to the two-dimensional grids within the neighborhood of the target two-dimensional grid, wherein the target two-dimensional grid is a two-dimensional grid other than the two-dimensional grid at the outermost edge of all the two-dimensional grids; determine, for each target two-dimensional grid, a reference material height value corresponding to the target two-dimensional grid based on the initial material height values corresponding to the two-dimensional grids within the neighborhood of the target two-dimensional grid; determine, for each target two-dimensional grid, corrected point cloud data corresponding to the stockpile within the target two-dimensional grid based on the reference material height value, the number of rows and columns of the target two-dimensional grid, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to a preset difference threshold, and determine the corrected point cloud data corresponding to the stockpile within the target two-dimensional grid based on the reference material height value and the number of rows and columns of the target two-dimensional grid; and determine the corrected point cloud data corresponding to the stockpile within the target two-dimensional grid and the point cloud data within the continuous height interval subsequence corresponding to the stockpile within other two-dimensional grids as the point cloud data of the stockpile.
[0164] Each module in the aforementioned device for determining a stockpile point cloud may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0165] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a method for determining a stockpile point cloud.
[0166] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0167] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0168] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0169] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0171] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. 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). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0172] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, 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.
[0173] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for determining a stockpile point cloud, characterized in that: The method comprises: Projecting point cloud data corresponding to a scene to be measured into a plurality of two-dimensional grids to obtain a first height value set of all points in each two-dimensional grid; wherein the scene to be measured is a scene including a stockpile; For each two-dimensional grid, determining a height range of all points in the two-dimensional grid according to the maximum value in the first height value set; For each two-dimensional grid, within the height range, identifying a height sub-range that satisfies a preset stockpile height distribution condition; Determining point cloud data of the stockpile based on the point cloud data within the height sub-range; The height sub-range is a continuous height interval sub-sequence corresponding to the stockpile; for each two-dimensional grid, within the height range, identifying a height sub-range that meets a preset stockpile height distribution condition includes: For each two-dimensional grid, the height range is divided into a preset interval division method to obtain a height interval sequence consisting of multiple height intervals and the first number of all points in each height interval; For each two-dimensional grid, identifying, based on the first number, at least one continuous height interval subsequence in the height interval sequence; wherein the continuous height interval subsequence is a sequence consisting of at least two continuous height intervals, and each height interval in the continuous height interval subsequence contains a point; For each two-dimensional grid, obtaining a second number of all points in each continuous height interval subsequence, and determining, in the at least one continuous height interval subsequence, a continuous height interval subsequence corresponding to the stockpile based on the second number; Determining, based on the second number, a continuous height interval subsequence corresponding to the stockpile in the at least one continuous height interval subsequence includes: Determine a lowest continuous height interval subsequence in the at least one continuous height interval subsequence, and use the lowest continuous height interval subsequence as a target continuous height interval subsequence; Comparing the second number of all points in the target continuous height interval subsequence with a preset number threshold; If the second number of all points in the target continuous height interval subsequence is greater than or equal to the preset number threshold, the target continuous height interval subsequence is determined as the continuous height interval subsequence corresponding to the stockpile; If the second number of all points in the target continuous height interval subsequence is less than the preset number threshold, determining the next lowest continuous height interval subsequence in the at least one continuous height interval subsequence, and using the next lowest continuous height interval subsequence as the target continuous height interval sequence; Return to the step of comparing the second number of all points in the target continuous height interval subsequence with the preset number threshold until a continuous height interval subsequence corresponding to the stockpile is determined from the at least one continuous height interval subsequence.
2. The method according to claim 1, characterized in that Determining the point cloud data of the stockpile based on the point cloud data within the height sub-range includes: In all two-dimensional grids, the point cloud data within the height sub-range is determined as the point cloud data of the stockpile.
3. The method according to claim 1, characterized in that Determining the point cloud data of the stockpile based on the point cloud data within the height sub-range includes: For each two-dimensional grid, obtaining a second height value set of all points in a continuous height interval subsequence corresponding to the stockpile, and determining an initial material height value corresponding to the two-dimensional grid based on the second height value set; For each target two-dimensional grid, obtaining the initial material height value corresponding to the reliable two-dimensional grid in the neighborhood of the target two-dimensional grid; wherein the target two-dimensional grid is the two-dimensional grid among all the two-dimensional grids except the two-dimensional grid at the outermost edge; For each target two-dimensional grid, determining a reference material height value corresponding to the target two-dimensional grid according to initial material height values corresponding to reliable two-dimensional grids in the neighborhood of the target two-dimensional grid; For each target two-dimensional grid, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to a preset difference threshold, then according to the reference material height value, the number of rows and columns of the target two-dimensional grid, the corrected point cloud data corresponding to the material pile in the target two-dimensional grid is determined; The corrected point cloud data corresponding to the material pile in the target two-dimensional grid and the point cloud data in the continuous height interval subsequence corresponding to the material pile in other two-dimensional grids are determined as the point cloud data of the material pile.
4. The method according to claim 3, characterized in that The method further comprises: For each target two-dimensional grid, obtaining an initial two-dimensional grid in the neighborhood of the target two-dimensional grid; If the third number of all points in the initial two-dimensional grid is greater than or equal to a preset threshold, the initial two-dimensional grid is determined as a candidate two-dimensional grid; Construct polygonal areas based on the location data of all candidate two-dimensional grids; If the position data of the target two-dimensional grid is located within the polygonal area, the candidate two-dimensional grid is determined as the reliable two-dimensional grid.
5. The method according to claim 1, wherein The method further comprises: Acquiring initial point cloud data within the scene to be measured; wherein the initial point cloud data is collected by multiple point cloud scanning devices; Calculating the confidence level of each point originating from a target point cloud scanning device based on the initial point cloud data and the position data of each point cloud scanning device; wherein the target point cloud scanning device is the point cloud scanning device that actually scans the point; For each point, if the confidence level satisfies a preset unreliable point condition, the point is determined as an unreliable point; In the initial point cloud data, the point data of the unreliable points are eliminated to obtain the point cloud data corresponding to the scene to be measured.
6. A device for determining a stockpile point cloud, characterized in that: The device comprises: A point cloud projection module is used to project the point cloud data corresponding to the scene to be measured into multiple two-dimensional grids to obtain a set of first height values of all points in each two-dimensional grid; wherein the scene to be measured is a scene containing a stockpile; a range determination module, configured to determine, for each two-dimensional grid, a height range of all points in the two-dimensional grid according to a maximum value in the first height value set; A range identification module is used to identify, for each two-dimensional grid, a height sub-range within the height range that meets a preset stockpile height distribution condition; a point cloud determination module, configured to determine point cloud data of the stockpile based on the point cloud data within the height sub-range; The height sub-range is a continuous height interval subsequence corresponding to the stockpile; the range identification module is specifically configured to divide the height range into a preset interval division method for each two-dimensional grid, thereby obtaining a height interval sequence consisting of a plurality of height intervals and the first number of all points in each height interval; For each two-dimensional grid, identifying, based on the first number, at least one continuous height interval subsequence in the height interval sequence; wherein the continuous height interval subsequence is a sequence consisting of at least two continuous height intervals, and each height interval in the continuous height interval subsequence contains a point; For each two-dimensional grid, obtaining a second number of all points in each continuous height interval subsequence, and determining, in the at least one continuous height interval subsequence, a continuous height interval subsequence corresponding to the stockpile based on the second number; The range identification module is specifically configured to determine a lowest continuous altitude interval subsequence in the at least one continuous altitude interval subsequence, and use the lowest continuous altitude interval subsequence as a target continuous altitude interval subsequence; Comparing the second number of all points in the target continuous height interval subsequence with a preset number threshold; If the second number of all points in the target continuous height interval subsequence is greater than or equal to the preset number threshold, the target continuous height interval subsequence is determined as the continuous height interval subsequence corresponding to the stockpile; If the second number of all points in the target continuous height interval subsequence is less than the preset number threshold, determining the next lowest continuous height interval subsequence in the at least one continuous height interval subsequence, and using the next lowest continuous height interval subsequence as the target continuous height interval sequence; Return to the step of comparing the second number of all points in the target continuous height interval subsequence with the preset number threshold until a continuous height interval subsequence corresponding to the stockpile is determined from the at least one continuous height interval subsequence.
7. The device according to claim 6, characterized in that The point cloud determination module is specifically configured to determine, within all two-dimensional grids, the point cloud data within the height sub-range as the point cloud data of the stockpile.
8. The device according to claim 6, characterized in that The point cloud determination module is specifically configured to obtain, for each two-dimensional grid, a second height value set of all points in a continuous height interval subsequence corresponding to the stockpile, and determine an initial material height value corresponding to the two-dimensional grid based on the second height value set; For each target two-dimensional grid, obtaining the initial material height value corresponding to the reliable two-dimensional grid in the neighborhood of the target two-dimensional grid; wherein the target two-dimensional grid is the two-dimensional grid among all the two-dimensional grids except the two-dimensional grid at the outermost edge; For each target two-dimensional grid, determining a reference material height value corresponding to the target two-dimensional grid according to initial material height values corresponding to reliable two-dimensional grids in the neighborhood of the target two-dimensional grid; For each target two-dimensional grid, if the difference between the initial material height value corresponding to the target two-dimensional grid and the reference material height value is greater than or equal to a preset difference threshold, then according to the reference material height value, the number of rows and columns of the target two-dimensional grid, the corrected point cloud data corresponding to the material pile in the target two-dimensional grid is determined; The corrected point cloud data corresponding to the material pile in the target two-dimensional grid and the point cloud data in the continuous height interval subsequence corresponding to the material pile in other two-dimensional grids are determined as the point cloud data of the material pile.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Material pile point cloud determination method and device, computer equipment and storage medium
CN115407322A