A method for measuring the volume of an object in a given space

By converting point cloud maps into images and calculating depth values, the problems of accuracy and complexity in object volume measurement are solved, achieving efficient and accurate volume calculation.

CN116030081BActive Publication Date: 2025-10-31NINGBO ABAX SENSING ELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111246603.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2025-10-31
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

Existing methods for measuring object volume using object depth images suffer from insufficient accuracy and high complexity.

Method used

By acquiring a point cloud image of the object's front view within a specific space, selecting a step size to convert the point cloud image into an image, selecting a region in the image to back-calculate the object's depth value from the point cloud, and then calculating the object's volume based on its area and depth value.

Benefits of technology

It reduces the complexity of calculating object volume and improves measurement accuracy, with an error of less than 0.1%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0003318983210000011
    Figure HDA0003318983210000011
  • Figure HDA0003318983210000021
    Figure HDA0003318983210000021
  • Figure HDA0003318983210000022
    Figure HDA0003318983210000022
Patent Text Reader

Abstract

A method for measuring the volume of an object in a given space, characterized in that the method includes: acquiring a frontal point cloud image of the object in the specific space; selecting a step size and converting the point cloud image into an image; selecting a region of the image and calculating the depth value of the object from the point cloud; and obtaining the volume of the object based on the area and depth value of the object. This measurement method can reduce the computational complexity of obtaining the volume of an object in a given space and improve accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of detection technology, and in particular to a method for measuring the volume of an object in a given space. Background Technology

[0002] Compared to traditional cameras, depth cameras (also known as depth cameras or 3D cameras) can detect the distance of each point in an image from the camera, thus determining the depth of field in the shooting space. This makes it easier to recreate realistic scenes and enable applications such as scene modeling. Typically, depth cameras can employ three methods: structured light, binocular vision, or time-of-flight (TOF) optical methods.

[0003] In recent years, with the rapid development of technologies such as machine vision, autonomous driving, and facial recognition, the application scenarios of depth cameras have become increasingly widespread, especially with a strong demand for mobile applications. For example, in the logistics field, personal digital assistants (PDAs) equipped with depth cameras can photograph logistics items and measure their volume based on the obtained depth images, thereby facilitating the digital management of items.

[0004] PointNet is a deep learning framework for point cloud classification / segmentation proposed by Stanford University in 2016. As is well known, point clouds exhibit irregular spatial relationships during classification or segmentation, making it impossible to directly apply existing image classification and segmentation frameworks to point clouds. This has led to the development of many deep learning frameworks based on voxelization (gridization) of point clouds, achieving excellent results. However, voxelization inevitably alters the original features of the point cloud data, causing unnecessary data loss and increasing workload. PointNet, on the other hand, uses the original point cloud input method, preserving the spatial features of the point cloud to the maximum extent, and achieved excellent results in the final tests.

[0005] PointNet is a 3D network designed for point cloud data. Point cloud data consists of sampling points on an object's surface captured by a camera, obtaining their 3D coordinates. It's easy to understand that many real-world stereo cameras cannot capture all 3D points; they can only obtain information from some sampling points. Apple's iPhone X also uses a depth camera, emitting infrared rays to extract point cloud information about the face. Therefore, point cloud data has a wide range of applications.

[0006] Point cloud data has some notable characteristics, such as the disorder of data points and the variability of the number of data points. The disorder means that the network must be able to output the same result when the order of data points is changed, and the variability of the number means that the network must be able to process 3D models with different sampling points.

[0007] It can be observed that existing related technologies for measuring the volume of an object using depth images still suffer from insufficient accuracy and high complexity. Summary of the Invention

[0008] The purpose of this application is to address the shortcomings of the prior art by providing a method for measuring the volume of an object in a given space, thereby solving the problems of insufficient accuracy and high complexity in existing methods for measuring the volume of an object using depth images.

[0009] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0010] In a first aspect, embodiments of this application provide a method for measuring the volume of an object in a given space, comprising: acquiring a frontal point cloud image of the object in the specific space; selecting a step size and converting the point cloud image into an image; selecting a region of the image and calculating the depth value of the object back into the point cloud; and obtaining the volume of the object based on the area and depth value of the object.

[0011] Optionally, the point cloud map is obtained with the actual installation location of the TOF detector as the physical coordinate value;

[0012] Optionally, a point cloud map larger than the given spatial size can be selected;

[0013] Optionally, the point cloud image is converted to the frontal view of the TOF detector and the coordinate position is offset.

[0014] Optionally, the point cloud map is iterated in one direction with a selected step size to convert it into n images;

[0015] Optionally, the image converted from the point cloud can be processed to select the position of the object in the given space;

[0016] Optionally, based on the relationship between the image and the point cloud map, the image is inversely calculated into the point cloud map, and the point cloud map of the contour region is selected.

[0017] Optionally, the depth value of the object can be obtained based on the selected point cloud map;

[0018] Optionally, the volume of the object can be obtained based on the frontal area of ​​the object, the background depth value, and the depth value.

[0019] The beneficial effects of this application are:

[0020] A method for measuring the volume of an object in a given space, characterized in that the method includes: acquiring a frontal point cloud image of the object within the specific space; selecting a step size and converting the point cloud image into an image; selecting a region of the image and calculating the depth value of the object back into the point cloud; and obtaining the volume of the object based on the area and depth value of the object. This measurement method can reduce the computational complexity of obtaining the volume of an object in a given space and improve accuracy. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating a method for measuring the volume of an object within a given space, provided as an embodiment of this application;

[0023] Figure 2 For this application Figure 1 A flowchart corresponding to step S101 in the embodiment;

[0024] Figure 3 For this application Figure 1 A flowchart corresponding to step S102 in the embodiment;

[0025] Figure 4 For this application Figure 1 A flowchart corresponding to step S103 in the embodiment;

[0026] Figure 5 This application provides a scenario diagram for measuring the volume of an object in a given space, as provided in an embodiment of the present application.

[0027] Figure 6 Provided for the embodiments of this application Figure 5 Point cloud diagram of the scene shown;

[0028] Figure 7 The embodiments provided in this application provide for the Figure 5 The scene shown is a schematic diagram of the object volume obtained using the measurement method of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0030] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0031] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0032] Figure 1 This is a flowchart illustrating a method for measuring the volume of an object in a given space, as provided in an embodiment of this application. In existing 3D point cloud algorithms, the cargo box can be accurately identified based on the acquired point cloud map and a trained 3D point cloud neural network. The point cloud contains actual distance coordinate information of xyz, which can accurately calculate the volume of the loaded cargo. However, since the neural network based on point cloud requires a large amount of computation, a relatively good computing platform is needed to support it, resulting in high costs.

[0033] Figure 1 A flowchart illustrating a method for measuring the volume of an object within a given space, as provided in this application embodiment, is shown below. Figure 1 The volume measurement method for an object provided in this application embodiment, as shown, may specifically include the following steps:

[0034] S101: Obtain the front point cloud image of an object within a specific space;

[0035] S102: Select the step size and convert the point cloud map into an image;

[0036] S103: Select a region of the image and calculate the depth value of the object in the point cloud;

[0037] S104: Obtain the volume of an object based on its area and depth.

[0038] Figure 2 For this application Figure 1 A flowchart corresponding to step S101 of the embodiment; in Figure 2As can be seen from the technical solution proposed in the illustrated embodiment, firstly, in step S201, a TOF detector is installed in a given space, such as the cargo compartment of a truck. The TOF detector obtains frontal point cloud data of the given space through the lens, such as the frontal point cloud data of the cargo compartment. The point cloud data contains XYZ coordinate values ​​in the detector coordinate system with the actual installation position of the TOF detector as the physical coordinate. In step S202, based on the actual installation position of the TOF detector in the given space (e.g., the cargo compartment of a truck), and taking the actual size of the given space as the application range, a point cloud XYZ range area larger than the given space is given to select the point cloud area range to avoid some scattered points outside the range. In step S203, since the two-dimensional image takes the upper left corner of the image as the coordinate origin, the XY coordinates of the obtained point cloud are offset according to the installation position of the TOF detector in the given space, so that the image includes the cross-sectional area of ​​the given space, specifically x' = x - point_x_offset and y' = y - point_y_offset.

[0039] Figure 3 For this application Figure 1 A flowchart corresponding to step S102 of the embodiment; as shown Figure 3 As shown, in Figure 3 In step S301, a step size Z_step is selected according to the needs of the scene. The point cloud of the region is selected in the frontal direction (i.e., the Z direction) of the TOF detector, i.e. Z1≤Z≤Z2 Z2-Z1=Z_step. The XY values ​​corresponding to this region are selected according to the range of Z values.

[0040] Create an image where the pixels at corresponding positions are different grids. Using the offset x'y' values ​​as pixel positions, iterate through each x'y' value in the Z_step region. `grid_x_length = int((carriage_width) / (one_pixel_length))` and `grid_y_length = int((carriage_height) / (one_pixel_length))`, where `carriage_width` and `carriage_height` are the width and height of the cross-section of a given space (e.g., a truck bed), and `one_pixel_length` specifies the length of each pixel square in the image. According to the above formulas, the XY values ​​at corresponding positions fall into the corresponding pixel grids. If a value falls into a pixel grid, the corresponding pixel is recorded as 255; otherwise, it is recorded as 0.

[0041] Each Z_step will generate an image, and the entire point cloud will generate n images.

[0042] In step S302, step S301 converts a point cloud of a Z_step region into an image. Then, erosion and dilation opening operations are applied to this image converted from the point cloud to process the image.

[0043] Some scattered points on the image can be removed. At the same time, since the TOF detector is usually installed at the tail of the given space, it is a point cloud map in front of the view. Therefore, the ideal effect of the point cloud in the given space is to appear as a very narrow line on the image. After this processing, if there is an object in this Z_step region, it can be easily selected.

[0044] In the above process, most of the areas selected by Z_step iterating forward are empty of objects, so after processing, they are equivalent to blank images;

[0045] Figure 4 For this application Figure 1 A flowchart of step S103 in the corresponding embodiment is shown below; in step S401, the point cloud of the stepping region is converted into an image. After processing, the contour processing method is applied to obtain the contour and contour area in the image. According to the needs of the scene, an appropriate threshold is selected to select the contour and area that meet the requirements, and each contour region that meets the requirements is selected.

[0046] Step S402: Based on the range of the contour region, the relationship between the image and the point cloud (x and y), and the range of the Z_step corresponding to the image, the contour region point cloud is selected.

[0047] After selecting the point cloud of each suitable contour in step S403, the average value of the z-value of this part of the point cloud is calculated as the depth z of this part of the contour, which is the depth value of this part of the object surface.

[0048] The depth of this part of the box is obtained by subtracting the depth of the given space from the depth of the corresponding part of the object surface.

[0049] Calculate the area of ​​the corresponding region's outline;

[0050] Multiplying the area of ​​the corresponding region by its depth will give you the volume of that part of the object.

[0051] The volume of objects in other corresponding regions can be obtained using the same method described above.

[0052] By adding up the volumes of all the objects in the corresponding regions that meet the requirements, you can obtain the total volume of all objects in the given space.

[0053] The total volume of a given space is known. Subtracting the volume of the object from the total volume of the given space gives the remaining volume of the given space.

[0054] This method of obtaining a given spatial volume can be used in the automatic control of logistics, but it is not limited to logistics application scenarios.

[0055] Figure 5 This application provides a scene diagram for measuring the volume of an object in a given space, as shown in the embodiments of this application. Figure 5 The volume of the object in the given space is 0.6m * 0.5m * 0.4m * 2 = 0.24m³.

[0056] Figure 6 Provided for the embodiments of this application Figure 5 Point cloud diagram of the scene shown.

[0057] Figure 7 The embodiments provided in this application provide for the Figure 5 The scene shown is a schematic diagram of the object volume obtained using the measurement method of this application. Figure 7 The volume of the object obtained by the measurement method of this application is shown. Figure 5 The error in the actual object volume shown is 0.068%. It can be seen that using the measurement method described in this application can reduce the computational complexity of obtaining the volume of an object in a given space and improve accuracy.

[0058] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0059] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need further definition and explanation in subsequent figures. The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for measuring the volume of an object in a given space, characterized in that, The method includes: acquiring a frontal point cloud image of an object within a specific space; selecting a step size and converting the point cloud image into an image; selecting a region of the image and calculating the depth value of the object back into the point cloud; and obtaining the volume of the object based on its area and depth value. The step of obtaining the frontal point cloud image of the object in the specific space includes: obtaining the point cloud image with the actual installation position of the TOF detector as the physical coordinate value; The step size selection includes: selecting a step size in the frontal viewing direction of the TOF detector; The step of converting the point cloud image into an image includes: iterating the point cloud image along the frontal view direction with the step size to convert it into n images; The step of back-calculating the depth value of the object from the selected area of ​​the image to the point cloud includes: processing the selected image using a contour processing method to obtain the contour and contour area of ​​the image; selecting contours and areas that meet the requirements; selecting contour areas that meet the requirements; back-calculating the point cloud of the selected contour area to obtain the point cloud of the contour area; selecting the point cloud of the contour area; and averaging the values ​​of the selected contour point cloud in the frontal view direction to obtain the corresponding depth value of the object. The method of obtaining the volume of an object based on its area and depth includes multiplying the area and depth of the corresponding region to obtain the volume of that part of the object.

2. The method for measuring the volume of an object as described in claim 1, characterized in that, Select a point cloud image that is larger than the given spatial size.

3. The method for measuring the volume of an object as described in claim 1, characterized in that, The point cloud map is converted to the frontal view of the TOF detector and the coordinate position is offset.

4. The method for measuring the volume of an object as described in claim 1, characterized in that, The image converted from the point cloud is processed to select the position of the object in the given space.

5. The method for measuring the volume of an object as described in claim 1, characterized in that, The volume of an object is obtained by taking its frontal area, background depth value, and the depth value.

Citation Information

Patent Citations

  • Object volume measurement method and device, computer equipment and storage medium

    CN112991427A

  • Cargo volume measurement method and equipment based on depth image

    CN113362385A