Method, device and storage medium for estimating the volume of an object

Through radar scanning and point cloud data processing, high-density measurement points and minimum bounding boxes are screened, which solves the problem of inaccurate estimation of irregular objects in the prior art, and realizes high-precision volume calculation of complex point cloud models.

CN113947630BActive Publication Date: 2024-12-06G7 TECH (SHANGHAI) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111222181.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2024-12-06
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

The existing method of calculating irregular object volumes based on point cloud data is not accurate enough, especially in complex point cloud models. The quality of tetrahedral division affects the accuracy of the algorithm model, resulting in unstable calculation results.

Method used

The point cloud data of the initial measurement point is obtained through radar scanning, converted into a spatial point cloud coordinate system, divided area blocks, filtered out high-density measurement points, determined the minimum bounding box, and calculated the volume of the bounding box to estimate the object volume.

Benefits of technology

It improves the accuracy of irregular object volume estimation, is suitable for complex point cloud models, and enhances the stability and accuracy of the calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947630B_ABST
    Figure CN113947630B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and storage medium for estimating the volume of an object. Scanning a target area with a radar to obtain point cloud data of multiple initial measurement points, where a target object is placed, and the point cloud data includes the radar coordinate positions of the initial measurement points in the radar coordinate system; converting the radar coordinate positions of the multiple initial measurement points in the radar coordinate system into point cloud coordinate positions in a spatial point cloud coordinate system; dividing the scanned image obtained by the radar scanning to obtain multiple area blocks; selecting multiple selected measurement points from multiple initial measurement points according to the point cloud density value of each area block; determining the minimum bounding box used to characterize the target object according to the point cloud coordinate positions of the multiple selected measurement points in the spatial point cloud coordinate system; determining the estimated volume of the target object according to the volume of the minimum bounding box, thereby improving the accuracy of volume estimation of irregular objects based on point cloud data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of volume estimation, and in particular to a method, device and storage medium for estimating the volume of an object. Background Art

[0002] The research on simultaneous positioning and mapping mainly uses the projection method to calculate the volume of point clouds. The three-dimensional point cloud is converted into a plane point cloud by projection, and then the plane point cloud is triangulated and meshed. Then, the height information in the point cloud is restored to the three-dimensional point cloud, and the volume of the formed cylinders is calculated respectively, and finally the volume of the cylinders is accumulated. This method is not suitable for calculating the point cloud volume of complex point cloud models. Moreover, the method of dividing the point cloud model into many tetrahedrons is related to the accuracy of the algorithm model, so the accuracy of the calculation cannot be guaranteed. Therefore, the existing method of calculating the volume based on the three-dimensional point cloud data of irregular objects is not accurate enough for estimating the volume of complex objects, and related algorithm research is also very scarce. Summary of the invention

[0003] In view of this, the purpose of the present application is to provide a method, device and storage medium for estimating the volume of an object, thereby improving the accuracy of volume estimation of irregular objects based on point cloud data.

[0004] In a first aspect, an embodiment of the present application provides a method for estimating the volume of an object, comprising:

[0005] The target area is scanned by radar to obtain point cloud data of multiple initial measuring points, wherein a target object is placed in the target area, and the point cloud data includes radar coordinate positions of the initial measuring points in a radar coordinate system; the radar coordinate positions of the multiple initial measuring points in the radar coordinate system are converted into point cloud coordinate positions in a spatial point cloud coordinate system; the scanned image obtained by the radar scanning is divided to obtain multiple area blocks; according to the point cloud density value of each area block, multiple selected measuring points are screened out from the multiple initial measuring points; according to the point cloud coordinate positions of the multiple selected measuring points in the spatial point cloud coordinate system, a minimum bounding box for characterizing the target object is determined; and according to the volume of the minimum bounding box, an estimated volume of the target object is determined.

[0006] Preferably, the radar coordinate position includes a radar coordinate value in the X-axis direction, a radar coordinate value in the Y-axis direction, and a radar coordinate value in the Z-axis direction, wherein for each initial measuring point, coordinate transformation is performed in the following manner: the radar coordinate value in the Z-axis direction of the initial measuring point is increased by a target scanning height value so that the initial measuring point is translated to a scanning plane, and a first transformed coordinate position of the initial measuring point under the scanning plane is obtained, the scanning plane is a horizontal plane where the radar is located, and the target scanning height value is a distance value between the installation position of the radar and the horizontal plane where the target object is located; the first transformed coordinate position of the initial measuring point is rotated around the Y-axis by a first target angle value , to obtain the second converted coordinate position of the initial measuring point, the first target angle value refers to the first angle value formed by the radar itself and the vertical direction; the second converted coordinate position of the initial measuring point is rotated around the X axis by the second target angle value to obtain the third converted coordinate position of the initial measuring point, the second target angle value refers to the second angle value formed by the radar itself and the horizontal direction; the radar coordinate value in the Z-axis direction of the third converted coordinate position of the initial measuring point is increased by the target scanning height value to obtain the fourth converted coordinate position of the initial measuring point, and the obtained fourth converted coordinate position is determined as the point cloud coordinate position of the initial measuring point in the spatial point cloud coordinate system.

[0007] Preferably, the point cloud density value of each area block is determined in the following manner: determining the total number of point clouds contained in the area block; counting the number of measurement points of the initial measurement points falling into the area block; calculating the ratio of the counted number of measurement points to the determined total number of point clouds, and determining the ratio as the point cloud density value of the area block.

[0008] Preferably, the step of selecting a plurality of selected measuring points from a plurality of initial measuring points according to the point cloud density value of each area block comprises: for each area block, performing the following processing: comparing the point cloud density value of the area block with a density threshold, if the point cloud density value of the area block is less than the density threshold, deleting the initial measuring points falling into the area block, if the point cloud density value of the area block is not less than the density threshold, retaining the initial measuring points falling into the area block; and determining the retained initial measuring points in all area blocks as a plurality of selected measuring points.

[0009] Preferably, the point cloud coordinate position includes a first point cloud coordinate value in the X-axis direction, a second point cloud coordinate value in the Y-axis direction, and a third point cloud coordinate value in the Z-axis direction, wherein the step of determining a minimum bounding box for characterizing the target object according to the point cloud coordinate positions of multiple selected measuring points in the spatial point cloud coordinate system includes: determining the maximum first point cloud coordinate value and the minimum first point cloud coordinate value in the X-axis direction, the maximum second point cloud coordinate value and the minimum second point cloud coordinate value in the Y-axis direction, and the maximum third point cloud coordinate value and the minimum third point cloud coordinate value in the Z-axis direction according to the point cloud coordinate positions of multiple selected measuring points; and determining the minimum enclosing point cloud solid formed by the maximum first point cloud coordinate value, the minimum first point cloud coordinate value, the maximum second point cloud coordinate value, the minimum second point cloud coordinate value, the maximum third point cloud coordinate value and the minimum third point cloud coordinate value as the minimum bounding box.

[0010] Preferably, the step of determining the estimated volume of the target object based on the volume of the minimum bounding box includes: determining the target surface of the minimum bounding box, the target surface being a plane formed by any two axes of the X-axis, the Y-axis, and the Z-axis; slicing the minimum bounding box along a coordinate axis perpendicular to the target surface to obtain multiple point cloud slices; calculating the slice volume of each point cloud slice; and determining the sum of all slice volumes as the estimated volume of the target object.

[0011] Preferably, each point cloud slice has a target thickness value, and the number of multiple point cloud slices is the ratio of the target side length value to the target thickness value, and the target side length value is the difference between the maximum point cloud coordinate value and the minimum point cloud coordinate value corresponding to the coordinate axis perpendicular to the target surface.

[0012] Preferably, the volume estimation method further includes: determining the actual volume of the target object; determining the volume estimation accuracy based on the actual volume and the estimated volume of the target object; and adjusting the scanning frame rate of the radar based on the volume estimation accuracy.

[0013] In a second aspect, an embodiment of the present application further provides a device for estimating the volume of an object, comprising:

[0014] The initial point cloud acquisition module scans the target area through the radar to obtain the point cloud data of multiple initial measurement points. The target object is placed in the target area. The point cloud data includes the radar coordinate position of the initial measurement point in the radar coordinate system;

[0015] A coordinate conversion module converts the radar coordinate positions of multiple initial measurement points in the radar coordinate system into point cloud coordinate positions in the space point cloud coordinate system;

[0016] A region division module divides the scanned image obtained by radar scanning to obtain multiple region blocks;

[0017] The measuring point screening module selects multiple selected measuring points from multiple initial measuring points according to the point cloud density value of each area block;

[0018] A bounding box determination module determines a minimum bounding box for representing a target object according to the point cloud coordinate positions of a plurality of selected measuring points in a spatial point cloud coordinate system;

[0019] The volume estimation module determines the estimated volume of the target object based on the volume of the minimum bounding box.

[0020] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method for estimating the volume of an object are executed.

[0021] The embodiments of the present application provide a method, device and storage medium for estimating the volume of an object. The method obtains point cloud data of an initial measurement point of a scene where a target object is located by scanning a target area with a radar, converts the coordinates of the initial measurement point in a radar coordinate system into coordinates in a spatial point cloud coordinate system, divides the area according to the radar scanning image, and screens out multiple selected measurement points corresponding to the contour of the target object according to the point cloud density of each area. The minimum bounding box representing the target object is determined based on the multiple selected measurement points, and the estimated volume of the target object is determined according to the volume of the minimum bounding box, thereby improving the accuracy of volume estimation of irregular objects based on point cloud data.

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

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

[0024] Figure 1 A flow chart of a method for estimating the volume of an object provided in an embodiment of the present application;

[0025] Figure 2 A flowchart of a coordinate conversion method provided in an embodiment of the present application;

[0026] Figure 3 A flow chart of a method for calculating a point cloud density value provided in an embodiment of the present application;

[0027] Figure 4A flow chart of a method for determining and selecting a measuring point provided in an embodiment of the present application;

[0028] Figure 5 A flowchart of a method for determining a minimum bounding box provided in an embodiment of the present application;

[0029] Figure 6 A flowchart of a method for determining a minimum bounding box volume provided by an embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of a device for estimating the volume of an object provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0032] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0033] In the prior art, the research on simultaneous positioning and mapping mainly uses the projection method to calculate the volume of the point cloud. The three-dimensional point cloud is converted into a plane point cloud by projection, and then the plane point cloud is triangulated and meshed. Then, the height information in the point cloud is restored to the three-dimensional point cloud, and the volume of the formed cylinders is calculated respectively, and finally the volume of the cylinders is accumulated. This method is not suitable for calculating the point cloud volume of complex point cloud models. Moreover, the method of dividing the point cloud model into many tetrahedrons is related to the accuracy of the algorithm model, so the accuracy of the calculation cannot be guaranteed. Therefore, the existing method of calculating the volume based on the three-dimensional point cloud data of irregular objects is not accurate enough for estimating the volume of complex objects, and related algorithm research is also very scarce.

[0034] In response to the above problems, embodiments of the present application provide a method, device and storage medium for estimating the volume of an object, which are described below through embodiments.

[0035] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.

[0036] See also Figure 1 , is a method for estimating the volume of an object provided in an embodiment of the present application, the method comprising:

[0037] Step S101, scanning a target area by radar to obtain point cloud data of a plurality of initial measuring points, wherein a target object is placed in the target area, and the point cloud data includes radar coordinate positions of the initial measuring points in a radar coordinate system.

[0038] The radar here refers to a laser radar (LiDAR), and the point cloud data in the current target area can be obtained through radar scanning. The target area refers to the maximum scanning area contained in a frame of radar image. The radar here can be installed on the wall, and there is a certain angle between the center line of the radar and the horizontal plane. The target object here refers to the goods or other objects that need to be measured. The point cloud data of several initial measurement points obtained by radar scanning here are the three-dimensional coordinates calculated by the radar after the laser signal feedback. The three-dimensional coordinates here are calculated in the radar coordinate system, where the origin of the radar coordinate system is a coordinate point on the plane where the radar is located.

[0039] Step S102: converting the radar coordinate positions of the multiple initial measurement points in the radar coordinate system into point cloud coordinate positions in the space point cloud coordinate system.

[0040] The spatial point cloud coordinate system here refers to a coordinate system with any coordinate point on the plane where the goods are located as the origin.

[0041] Specifically, the radar coordinate position includes the radar coordinate value in the X-axis direction, the radar coordinate value in the Y-axis direction, and the radar coordinate value in the Z-axis direction. Figure 2 As shown, Figure 2 A method for coordinate transformation is provided in an embodiment of the present application, wherein for each initial measurement point, coordinate transformation is performed in the following manner:

[0042] S1021. Raise the radar coordinate value of the initial measuring point in the Z-axis direction by the target scanning height value, so that the initial measuring point is translated to the scanning plane, and obtain the first converted coordinate position of the initial measuring point under the scanning plane. The scanning plane is the horizontal plane where the radar is located, and the target scanning height value is the distance value between the installation position of the radar and the horizontal plane where the target object is located.

[0043] The target scanning height value here refers to the distance between the plane where the radar is located and the horizontal plane where the target object is located when the radar scans the target area, that is, the relative height value between the radar and the target object. The coordinate position of the initial measurement point is converted using the following formula:

[0044]

[0045] Wherein, z is the radar coordinate position of the initial measurement point on the Z axis, x is the radar coordinate position of the initial measurement point on the X axis, y is the radar coordinate position of the initial measurement point on the Y axis, h is the target scanning height value, z′ is the radar coordinate position of the first conversion coordinate on the Z axis, x′ is the radar coordinate position of the first conversion coordinate on the X axis, and y′ is the radar coordinate position of the first conversion coordinate on the Y axis.

[0046] S1022: Rotate the first transformed coordinate position of the initial measurement point around the Y axis by a first target angle value to obtain a second transformed coordinate position of the initial measurement point, where the first target angle value refers to a first angle value formed by a scanning ray emitted by the radar and a vertical direction.

[0047] The first target angle value here refers to the angle value formed by the plane where the radar itself is located and the vertical direction. The purpose of converting the first conversion coordinate position to the second conversion coordinate position is to convert the projection of the target object on the radar plane into the projection of the target object on the ground plane.

[0048] Specifically, the first transformed coordinate position is transformed into the second transformed coordinate position by the following formula:

[0049]

[0050] Wherein, θ is the first target angle value, z″ is the radar coordinate position of the second conversion coordinate Z axis, x″ is the radar coordinate position of the second conversion coordinate X axis, and y″ is the radar coordinate position of the second conversion coordinate Y axis.

[0051] S1023: Rotate the second transformed coordinate position of the initial measurement point around the X-axis by a second target angle value to obtain a third transformed coordinate position of the initial measurement point, where the second target angle value refers to a second angle value formed by the radar itself and the horizontal direction.

[0052] The second target angle value here refers to the angle value formed by the plane where the radar itself is located and the horizontal direction.

[0053] Specifically, the second transformed coordinates are transformed into the third transformed coordinates by the following formula:

[0054]

[0055] Wherein, β is the second target angle value, z″′ is the radar coordinate position of the third conversion coordinate Z axis, x″′ is the radar coordinate position of the third conversion coordinate X axis, and y″′ is the radar coordinate position of the third conversion coordinate Y axis.

[0056] S1024. Raise the radar coordinate value in the Z-axis direction in the third transformed coordinate position of the initial measuring point by the target scanning height value to obtain a fourth transformed coordinate position of the initial measuring point, and determine the obtained fourth transformed coordinate position as the point cloud coordinate position of the initial measuring point in the spatial point cloud coordinate system.

[0057] The second transformed coordinate is transformed into the third transformed coordinate and then into the fourth transformed coordinate position, in order to keep the vertical height of the target object uniform.

[0058] The third transformed coordinates are converted to the fourth transformed coordinates by the following formula:

[0059]

[0060] The fourth transformed coordinate position finally obtained here is the point cloud coordinate position of the initial measuring point in the spatial point cloud coordinate system.

[0061] Step S103, dividing the scanned image obtained by radar scanning to obtain a plurality of area blocks;

[0062] Step S104: Filter out a plurality of selected measuring points from a plurality of initial measuring points according to the point cloud density value of each area block.

[0063] Before steps S103 and S104, the point cloud data in the converted spatial point cloud coordinate system needs to be filtered and denoised to obtain point cloud data corresponding to the contour of the target object. The filtering method here can be filtering by a straight-through filter or the like.

[0064] Specifically, the current frame scanned image acquired by the radar scanning is divided into a number of small squares at the minimum granularity, and the point cloud density value in each small square is calculated to screen out multiple selected measuring points, the purpose of which is to remove the point cloud data corresponding to the shadow of the target object in the point cloud data corresponding to the target object contour. The selected measuring points here correspond to the points corresponding to the target object contour that are finally determined, which may be the point cloud data corresponding to the contour of one or more target objects.

[0065] The size of the scanned image may be 320×240 or 640×680.

[0066] Step S105 : determining a minimum bounding box for representing the target object according to the point cloud coordinate positions of the plurality of selected measuring points in the spatial point cloud coordinate system.

[0067] The minimum bounding box here refers to the smallest cube that can enclose the target object determined by the outline of the target object. It can be understood that each target object outline corresponds to a minimum bounding box, that is, after determining the point cloud data corresponding to multiple target object outlines, the point cloud data of a target object outline can be marked as one category.

[0068] Specifically, according to the point cloud coordinate positions in all spatial point cloud coordinate systems corresponding to the contour of a single target object, the maximum and minimum values ​​in the three directions of X, Y, and Z axes are determined, and a cube is established with the maximum and minimum values ​​in the three directions of X, Y, and Z axes as the vertices of the minimum bounding box.

[0069] Step S106: Determine the estimated volume of the target object according to the volume of the minimum bounding box.

[0070] Specifically, the estimated volume of the target object is approximately calculated based on the volume of the minimum bounding box, and the result is output.

[0071] In an embodiment of the present application, point cloud data of an initial measuring point of a scene where a target object is located is obtained by scanning a target area with a radar, the coordinates of the initial measuring point in a radar coordinate system are converted into coordinates in a spatial point cloud coordinate system, and regions are divided according to the radar scanning image. A plurality of selected measuring points corresponding to the contour of the target object are screened out according to the point cloud density of each region, a minimum bounding box representing the target object is determined based on the plurality of selected measuring points, and the estimated volume of the target object is determined according to the volume of the minimum bounding box, thereby improving the accuracy of volume estimation of irregular objects based on point cloud data.

[0072] See also Figure 3 , is a method for calculating a point cloud density value provided by another embodiment of the present application, the method comprising:

[0073] S201: Determine the total number of point clouds contained in the area block.

[0074] Specifically, the maximum total number of point clouds in each area block is calculated. For example, when the size of the grid for dividing the area is 5×5, the maximum total number of point clouds in the area block is 25.

[0075] S202: Count the number of initial measurement points falling within the area block.

[0076] In this step, the total number of initial measurement points corresponding to the target object contour in each area block is calculated.

[0077] S203: Calculate the ratio of the number of measured points counted to the total number of point clouds determined, and determine the ratio as the point cloud density value of the area block.

[0078] Specifically, the point cloud density value of the area block is calculated according to the ratio of the number of measurement points of the initial measurement points in the area block to the total number of point clouds in the area block.

[0079] See also Figure 4 , is a method for determining and selecting measuring points provided by another embodiment of the present application, the method is, for each area block, performing the following processing:

[0080] S301, comparing the point cloud density value of the area block with the density threshold, if the point cloud density value of the area block is less than the density threshold, deleting the initial measurement points falling into the area block, if the point cloud density value of the area block is not less than the density threshold, retaining the initial measurement points falling into the area block;

[0081] S302: Determine the initial measurement points reserved in all area blocks as a plurality of selected measurement points.

[0082] Specifically, the point cloud density value of each area block is compared with a preset density threshold. When the point cloud density value of the area block is less than the preset density threshold, the initial measurement point in the area block is considered to be a point cloud on the shadow of the target object, and the initial measurement point with a point cloud density value greater than the density threshold is confirmed as a selected measurement point, that is, a point cloud on the contour of the target object.

[0083] See also Figure 5 , is a method for determining a minimum bounding box provided by another embodiment of the present application, wherein the point cloud coordinate position includes a first point cloud coordinate value in the X-axis direction, a second point cloud coordinate value in the Y-axis direction, and a third point cloud coordinate value in the Z-axis direction, wherein the step of determining a minimum bounding box for characterizing a target object according to the point cloud coordinate positions of a plurality of selected measuring points in a spatial point cloud coordinate system includes:

[0084] S401, according to the point cloud coordinate positions of the plurality of selected measuring points, determining the maximum first point cloud coordinate value and the minimum first point cloud coordinate value in the X-axis direction, the maximum second point cloud coordinate value and the minimum second point cloud coordinate value in the Y-axis direction, and the maximum third point cloud coordinate value and the minimum third point cloud coordinate value in the Z-axis direction;

[0085] S402, determining the minimum enclosing point cloud solid formed by the maximum first point cloud coordinate value, the minimum first point cloud coordinate value, the maximum second point cloud coordinate value, the minimum second point cloud coordinate value, the maximum third point cloud coordinate value and the minimum third point cloud coordinate value as a minimum enclosing box.

[0086] Specifically, based on the point cloud coordinates of the selected measuring point under the label of a target object, the maximum first point cloud coordinate value on the X-axis, that is, the x on the X-axis, is determined. max And the minimum first point cloud coordinate value x on the X axis min , through x max With x min The difference between the minimum bounding box and the side length L in the X-axis direction is obtained x The same method is used to obtain the side length L of the minimum bounding box in the Y-axis direction. y and the length L of the minimum bounding box in the Z-axis direction z Finally, the minimum bounding point cloud solid, i.e. the minimum bounding box, is determined.

[0087] See also Figure 6 , is a method for determining a minimum bounding box volume provided by another embodiment of the present application, the method comprising:

[0088] S501. Determine a target surface of a minimum bounding box, where the target surface is a plane formed by any two axes among an X axis, a Y axis, and a Z axis.

[0089] Specifically, the surface into which the area blocks have been divided according to the minimum bounding box may be determined as the target surface, that is, it may be one of the planes formed by the X-axis and the Z-axis.

[0090] S502: Slice the minimum bounding box along a coordinate axis perpendicular to the target surface to obtain a plurality of point cloud slices, wherein each point cloud slice has a target thickness value.

[0091] S503: Calculate the slice volume of each point cloud slice.

[0092] Specifically, based on the region block, the point cloud slices can be sliced ​​at preset intervals along the Y-axis direction. Each point cloud slice can be approximately regarded as a small cube, and the volume of each small cube is 5×5×2, 50 cubic millimeters.

[0093] S504: Determine the sum of all slice volumes as the estimated volume of the target object.

[0094] Count the number of all point cloud slices n, that is, the sum of the number of point cloud slices in all area blocks. Here, the target thickness value can be 2mm. The number of point cloud slices in each area block is the ratio of the target side length value to the target thickness value, which is an integer. The target side length value is the difference between the maximum point cloud coordinate value and the minimum point cloud coordinate value corresponding to the coordinate axis perpendicular to the target surface. The estimated volume of the target object is calculated to be 50n cubic millimeters.

[0095] Furthermore, the real volume of the target object can be determined, and the volume estimation accuracy can be determined based on the real volume and the estimated volume of the target object. The scanning frame rate of the radar can be adjusted based on the volume estimation accuracy. Here, the initial scanning frame rate of the radar scanning is 5s / frame. When the scanning frame rate is increased, the calculated real volume of the target object becomes more accurate.

[0096] Another embodiment of the present application further provides a method for calculating a target object based on point cloud data, comprising:

[0097] Step 1: Obtain point cloud data (x, y, z) by scanning the goods, and perform point cloud sparseness after filtering (through and neighborhood).

[0098] Step 2: Extract image data features, generate a coordinate matrix set based on the point cloud data in step 1, and determine the pitch angle of the scanning camera to perform matrix transformation. The transformation matrix method is as follows: (1)

[0100] z′=z+h

[0101] x′=x

[0102] y′=y

[0103] Among them, h is the camera height, x, y, z are the original 3D point cloud data, and x′, y′, z′ are the transformed 3D point cloud data.

[0104] (2) Rotate θ around the y-axis to keep the object projection formed by the camera plane and the ground plane on the same plane.

[0105]

[0106] (3) Rotate β around the x-axis to maintain the vertical direction to form a unified height information.

[0107]

[0108] Among them, θ is the elevation angle, and β is the depression angle. Through the above steps, the coordinate point cloud of the mechanical radar is transferred to the spatial point cloud coordinate system, and a new cargo plane coordinate point cloud is formed.

[0109] Step 3: Form a point cloud density map based on the corresponding point cloud changes.

[0110] Point cloud density is defined as the number of point clouds in a 5*5 square grid. In a 320*240 point cloud array, the corresponding point cloud data in the scanned image is divided according to the minimum granularity, and the point cloud density is calculated according to the following formula:

[0111]

[0112] Among them, ρ is the point cloud density of each square, ∑c is the number of point clouds corresponding to the contour of the target object in each square, and c 5×5 The maximum number of point clouds per square.

[0113] Calculate the point cloud density of each small square separately. Here, we have determined statistically based on multiple tests that when the point cloud density in a small square is less than 8, the point cloud is considered sparse, that is, the area corresponding to the point cloud on the shadow of the target object. Calculate the point cloud density of all area blocks, find the connected area of ​​the goods and the shadow, and then remove the shadow.

[0114] Step 4: Calculate the cargo volume directly.

[0115] Specifically, the point cloud data of the goods to be measured is segmented from the acquired point cloud data through image semantic segmentation, and saved as one-dimensional data to obtain the maximum and minimum values ​​in the X, Y, and Z directions: max 、x min ,y max ,y min 、z max 、z min .

[0116] Determine the minimum cubic bounding box of the point cloud with side lengths L in the X, Y, and Z directions respectively. x , L y , L z ,in

[0117]

[0118] Secondly, the point cloud of the goods is sliced ​​into 5*5 squares at a certain interval, and the area of ​​the target area of ​​each slice is calculated. Each slice is approximately regarded as a cuboid, and the volume of the goods is calculated by adding up the volumes of the cuboids.

[0119] The volume estimation method of the embodiment of the present application realizes the automatic calculation of the projection area and volume of the shadow of the measured goods and the outline of the goods, improves the work efficiency and the degree of automation, and improves the calculation accuracy of the real volume of the object.

[0120] Based on the same inventive concept, an embodiment of the present application also provides a volume estimation device for an object corresponding to the volume estimation method for an object. Since the principle of solving the problem by the volume estimation device for an object in the embodiment of the present application is similar to the volume estimation method for an object in the embodiment of the present application, the implementation of the volume estimation device for an object can refer to the implementation of the method, and the repeated parts will not be repeated.

[0121] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a device for estimating the volume of an object provided in an embodiment of the present application. Figure 7 As shown in FIG. , the volume estimation device 600 includes:

[0122] An initial point cloud acquisition module 610 scans a target area through a radar to obtain point cloud data of a plurality of initial measurement points, wherein a target object is placed in the target area, and the point cloud data includes radar coordinate positions of the initial measurement points in a radar coordinate system;

[0123] A coordinate conversion module 620 converts the radar coordinate positions of the multiple initial measurement points in the radar coordinate system into point cloud coordinate positions in the space point cloud coordinate system;

[0124] A region division module 630 divides the scanned image obtained by radar scanning to obtain a plurality of region blocks;

[0125] A measuring point screening module 640 screens out a plurality of selected measuring points from a plurality of initial measuring points according to the point cloud density value of each area block;

[0126] The bounding box determination module 650 determines a minimum bounding box for representing the target object according to the point cloud coordinate positions of the multiple selected measuring points in the spatial point cloud coordinate system;

[0127] The volume estimation module 660 determines the estimated volume of the target object according to the volume of the minimum bounding box.

[0128] In a preferred embodiment, the radar coordinate position includes the radar coordinate value in the X-axis direction, the radar coordinate value in the Y-axis direction, and the radar coordinate value in the Z-axis direction, wherein for each initial measurement point, the coordinate conversion is performed in the following manner:

[0129] The radar coordinate value in the Z-axis direction of the initial measuring point is increased by the target scanning height value, so that the initial measuring point is translated to the scanning plane, and a first conversion coordinate position of the initial measuring point under the scanning plane is obtained, the scanning plane is the horizontal plane where the radar is located, and the target scanning height value is the distance value between the installation position of the radar and the horizontal plane where the target object is located; the first conversion coordinate position of the initial measuring point is rotated around the Y-axis by the first target angle value to obtain a second conversion coordinate position of the initial measuring point, the first target angle value refers to a first angle value formed by the radar itself and the vertical direction; the second conversion coordinate position of the initial measuring point is rotated around the X-axis by the second target angle value to obtain a third conversion coordinate position of the initial measuring point, the second target angle value refers to a second angle value formed by the radar itself and the horizontal direction; the radar coordinate value in the Z-axis direction of the third conversion coordinate position of the initial measuring point is increased by the target scanning height value to obtain a fourth conversion coordinate position of the initial measuring point, and the obtained fourth conversion coordinate position is determined as the point cloud coordinate position of the initial measuring point in the spatial point cloud coordinate system.

[0130] In a preferred embodiment, the point cloud density value of each area block is determined in the following manner: determining the total number of point clouds contained in the area block; counting the number of measurement points of the initial measurement points falling into the area block; calculating the ratio of the counted number of measurement points to the determined total number of point clouds, and determining the ratio as the point cloud density value of the area block.

[0131] In a preferred embodiment, the step of selecting a plurality of selected measuring points from a plurality of initial measuring points according to the point cloud density value of each area block comprises:

[0132] For each area block, the following processing is performed: the point cloud density value of the area block is compared with the density threshold. If the point cloud density value of the area block is less than the density threshold, the initial measurement points falling into the area block are deleted; if the point cloud density value of the area block is not less than the density threshold, the initial measurement points falling into the area block are retained; the retained initial measurement points in all area blocks are determined as multiple selected measurement points.

[0133] In a preferred embodiment, the point cloud coordinate position includes a first point cloud coordinate value in the X-axis direction, a second point cloud coordinate value in the Y-axis direction, and a third point cloud coordinate value in the Z-axis direction, wherein the step of determining a minimum bounding box for characterizing the target object according to the point cloud coordinate positions of multiple selected measuring points in the spatial point cloud coordinate system includes: determining the maximum first point cloud coordinate value and the minimum first point cloud coordinate value in the X-axis direction, the maximum second point cloud coordinate value and the minimum second point cloud coordinate value in the Y-axis direction, and the maximum third point cloud coordinate value and the minimum third point cloud coordinate value in the Z-axis direction according to the point cloud coordinate positions of multiple selected measuring points; and determining the minimum enclosing point cloud solid formed by the maximum first point cloud coordinate value, the minimum first point cloud coordinate value, the maximum second point cloud coordinate value, the minimum second point cloud coordinate value, the maximum third point cloud coordinate value and the minimum third point cloud coordinate value as the minimum bounding box.

[0134] In a preferred embodiment, the step of determining the estimated volume of the target object according to the volume of the minimum bounding box includes:

[0135] Determine the target surface of the minimum bounding box, where the target surface is a plane formed by any two axes among the X-axis, the Y-axis, and the Z-axis; slice the minimum bounding box along the coordinate axis perpendicular to the target surface to obtain multiple point cloud slices; calculate the slice volume of each point cloud slice; and determine the sum of all slice volumes as the estimated volume of the target object.

[0136] In a preferred embodiment, each point cloud slice has a target thickness value, and the number of multiple point cloud slices is the ratio of the target side length value to the target thickness value, and the target side length value is the difference between the maximum point cloud coordinate value and the minimum point cloud coordinate value corresponding to the coordinate axis perpendicular to the target surface.

[0137] In a preferred embodiment, the volume estimation method further comprises:

[0138] Determine the real volume of the target object; determine the volume estimation accuracy based on the real volume and the estimated volume of the target object; and adjust the scanning frame rate of the radar based on the volume estimation accuracy.

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

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

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

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

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

[0144] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable memory that can be executed by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

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

Claims

1. A method for estimating the volume of an object, characterized in that: include: Scanning a target area by radar to obtain point cloud data of a plurality of initial measurement points, wherein a target object is placed in the target area, and the point cloud data includes radar coordinate positions of the initial measurement points in a radar coordinate system; Converting the radar coordinate positions of the multiple initial measurement points in the radar coordinate system into point cloud coordinate positions in a spatial point cloud coordinate system, where the spatial point cloud coordinate system is a coordinate system with any coordinate point on the plane where the target object is located as the origin; Dividing the scanned image obtained by radar scanning to obtain multiple area blocks; According to the point cloud density value of each area block, a plurality of selected measuring points are selected from the plurality of initial measuring points; Determining a minimum bounding box for representing the target object according to the point cloud coordinate positions of the plurality of selected measuring points in the spatial point cloud coordinate system; Determining the estimated volume of the target object according to the volume of the minimum bounding box; For each initial measurement point, coordinate transformation is performed in the following way: (1) ; in, is the radar coordinate position of the initial measurement point on the Z axis, is the radar coordinate position of the initial measurement point on the X axis, is the radar coordinate position of the initial measurement point on the Y axis, is the distance between the installation position of the radar and the horizontal plane where the target object is located, is the radar coordinate position of the first transformed coordinate Z axis, is the radar coordinate position of the first transformed coordinate X axis, is the radar coordinate position of the first transformed coordinate Y axis; (2) ; in, is the first angle formed by the radar itself and the vertical direction, is the radar coordinate position of the second transformed coordinate Z axis, is the radar coordinate position of the second transformed coordinate X axis, is the radar coordinate position of the second transformed coordinate Y axis; (3) ; in, is the second angle formed by the radar itself and the horizontal direction, is the radar coordinate position of the third transformed coordinate Z axis, is the radar coordinate position of the third transformed coordinate X axis, is the radar coordinate position of the third transformed coordinate Y axis; (4) ; is the radar coordinate position of the fourth transformed coordinate Z axis, is the radar coordinate position of the fourth transformed coordinate X axis, is the radar coordinate position of the fourth transformed coordinate Y axis, and the fourth transformed coordinate position is the point cloud coordinate position of the initial measuring point in the spatial point cloud coordinate system.

2. The method according to claim 1, characterized in that The point cloud density value of each area block is determined by: Determine the total number of point clouds contained in the area block; Count the number of initial measurement points that fall within the area block; The ratio of the number of measured points counted to the total number of point clouds determined is calculated, and the ratio is determined as the point cloud density value of the area block.

3. The method according to claim 1, characterized in that The step of selecting a plurality of selected measuring points from the plurality of initial measuring points according to the point cloud density value of each area block comprises: For each area block, the following processing is performed: the point cloud density value of the area block is compared with the density threshold. If the point cloud density value of the area block is less than the density threshold, the initial measurement points falling into the area block are deleted; if the point cloud density value of the area block is not less than the density threshold, the initial measurement points falling into the area block are retained; The initial measurement points retained in all the area blocks are determined as the multiple selected measurement points.

4. The method according to claim 1, characterized in that: The point cloud coordinate position includes a first point cloud coordinate value in the X-axis direction, a second point cloud coordinate value in the Y-axis direction, and a third point cloud coordinate value in the Z-axis direction. The step of determining a minimum bounding box for characterizing the target object according to the point cloud coordinate positions of the plurality of selected measuring points in the spatial point cloud coordinate system comprises: According to the point cloud coordinate positions of the plurality of selected measuring points, determine a maximum first point cloud coordinate value and a minimum first point cloud coordinate value in the X-axis direction, a maximum second point cloud coordinate value and a minimum second point cloud coordinate value in the Y-axis direction, and a maximum third point cloud coordinate value and a minimum third point cloud coordinate value in the Z-axis direction; The minimum enclosing point cloud solid formed by the maximum first point cloud coordinate value, the minimum first point cloud coordinate value, the maximum second point cloud coordinate value, the minimum second point cloud coordinate value, the maximum third point cloud coordinate value and the minimum third point cloud coordinate value is determined as the minimum enclosing box.

5. The method according to claim 1, characterized in that The step of determining the estimated volume of the target object according to the volume of the minimum bounding box comprises: Determine a target surface of the minimum bounding box, where the target surface is a plane formed by any two axes of the X axis, the Y axis, and the Z axis; Slicing the minimum bounding box along a coordinate axis perpendicular to the target surface to obtain a plurality of point cloud slices; Calculate the slice volume of each point cloud slice; The sum of all slice volumes is determined as the estimated volume of the target object.

6. The method according to claim 5, characterized in that Each point cloud slice has a target thickness value, and the number of the multiple point cloud slices is the ratio of the target side length value to the target thickness value, and the target side length value is the difference between the maximum point cloud coordinate value and the minimum point cloud coordinate value corresponding to the coordinate axis perpendicular to the target surface.

7. The method according to claim 1, characterized in that Also includes: determining the actual volume of the target object; Determining a volume estimation accuracy rate according to the actual volume of the target object and the estimated volume; The scanning frame rate of the radar is adjusted according to the volume estimation accuracy.

8. A device for estimating the volume of an object, characterized in that: A method for estimating the volume of an object according to any one of claims 1 to 7, comprising: An initial point cloud acquisition module scans a target area through a radar to obtain point cloud data of a plurality of initial measurement points, wherein a target object is placed in the target area, and the point cloud data includes radar coordinate positions of the initial measurement points in a radar coordinate system; A coordinate conversion module converts the radar coordinate positions of the multiple initial measurement points in the radar coordinate system into point cloud coordinate positions in the space point cloud coordinate system; A region division module divides the scanned image obtained by radar scanning to obtain multiple region blocks; A measuring point screening module, screening a plurality of selected measuring points from the plurality of initial measuring points according to the point cloud density value of each area block; A bounding box determination module determines a minimum bounding box for representing the target object according to the point cloud coordinate positions of the plurality of selected measuring points in the spatial point cloud coordinate system; The volume estimation module determines the estimated volume of the target object according to the volume of the minimum bounding box.

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