CN116266363A - Method and device for calculating volume of article, electronic equipment and readable storage medium - Google Patents

Method and device for calculating volume of article, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116266363A
CN116266363A CN202111545395.XA CN202111545395A CN116266363A CN 116266363 A CN116266363 A CN 116266363A CN 202111545395 A CN202111545395 A CN 202111545395A CN 116266363 A CN116266363 A CN 116266363A
Authority
CN
China
Prior art keywords
point cloud
volume
target object
calculating
article
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111545395.XA
Other languages
Chinese (zh)
Inventor
冷鹏宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202111545395.XA priority Critical patent/CN116266363A/en
Publication of CN116266363A publication Critical patent/CN116266363A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses an article volume calculating method, an apparatus, an electronic device and a readable storage medium, wherein the method comprises the following steps: acquiring point cloud information of a target object; according to the point cloud position in the point cloud information, voxelization is carried out on the target object to obtain a voxel corresponding to the target object; and calculating the object volume of the target object according to the voxel quantity of the voxels. According to the method for calculating the volume of the object, complex operations such as integration and approximation are not needed when the volume of the object is calculated, the volume of the object can be obtained by carrying out simple four operations according to the number of voxels, the calculation speed is high, the number of voxels can accurately represent the details on the appearance of the object, the details on the surface of the object cannot be missed, and therefore the deviation between the calculated volume of the object and the actual volume is small, the calculation speed is ensured, the calculation accuracy is ensured, and the purpose of calculating the volume of the object in real time and accurately is achieved.

Description

Method and device for calculating volume of article, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of article volume calculation technologies, and in particular, to a method and an apparatus for calculating an article volume, an electronic device, and a readable storage medium.
Background
With the vigorous development of intelligent logistics, logistics distribution is the most important ring of logistics systems, and influences logistics operation and logistics enterprise development. Maximizing delivery volume is one of the important research aspects in the field of logistics delivery, and therefore it is particularly important to monitor truck volume by using an efficient method.
In order to obtain accurate freight car volume conditions, in the calculation process of the volume, accurate freight volume is required to be obtained so as to reasonably arrange freight to be loaded or unloaded, and the algorithm has high requirements on real-time performance and accuracy. Therefore, the logistics enterprises urgently need an intelligent volume measurement method to accurately detect the cargo volume in the freight car, and a calculation method capable of accurately acquiring the cargo volume in real time is realized.
Disclosure of Invention
The application provides an article volume calculating method, an article volume calculating device, an electronic device and a readable storage medium, and aims to solve the problem that a calculating method capable of accurately acquiring the volume of an article in real time is needed.
In a first aspect, the present application provides a method for calculating a volume of an article, comprising:
acquiring point cloud information of a target object;
according to the point cloud position in the point cloud information, voxelization is carried out on the target object to obtain a voxel corresponding to the target object;
and calculating the object volume of the target object according to the voxel quantity of the voxels.
In a possible implementation manner, the voxelization processing is performed on the target object according to the point cloud position in the point cloud information to obtain a voxel corresponding to the target object, including:
determining a filling direction according to the point cloud position and a preset origin position;
and voxelization is carried out on the target object according to the filling direction and the point cloud position, so as to obtain a voxel corresponding to the target object.
In one possible implementation manner, the voxelizing processing is performed on the target object according to the filling direction and the point cloud position to obtain a voxel corresponding to the target object, including:
obtaining a pre-divided voxel grid of an article storage space;
determining filling positions in the pre-divided voxel grid according to the filling directions and the point cloud positions;
Dividing the filling position to obtain voxels corresponding to the target object in the pre-divided voxel grid.
In a possible implementation manner, before the voxelization is performed on the target object according to the point cloud position in the point cloud information to obtain the voxel corresponding to the target object, the method further includes:
determining a point cloud position filtering range according to the size of the article storage space;
and filtering the initial position of the point cloud in the point cloud information of the target object according to the point cloud position filtering range to obtain the point cloud position.
In one possible implementation manner, after the calculating, according to the number of voxels of the voxels, the object volume of the target object, the method further includes:
acquiring the accommodating volume of the article storage space;
calculating to obtain the volume rate of the article storage space according to the accommodating volume and the article volume;
and drawing a volume rate change curve according to the volume rate, and displaying the volume rate change curve on a display terminal.
In one possible implementation manner, the acquiring the point cloud information of the target object includes:
acquiring a depth image of a target object;
Determining original point cloud information of the target object according to the depth image;
and performing discrete filtering processing on the original point cloud information to obtain the point cloud information.
In one possible implementation manner, the performing discrete filtering processing on the original point cloud information to obtain point cloud information includes:
determining the center removing neighborhood of each point cloud unit according to the position of the point cloud unit in the original point cloud information;
counting the number of the point cloud units contained in each heart-removed neighborhood to obtain the number of the neighborhood point cloud units;
and screening the point cloud units according to the number of the neighborhood point cloud units corresponding to each point cloud unit to obtain the point cloud information of the non-outlier point cloud units, wherein the non-outlier point cloud units are point cloud units with the number of the neighborhood point cloud units being larger than a preset number threshold.
In a second aspect, the present application provides an article volume calculation device comprising:
the acquisition unit is used for acquiring the point cloud information of the target object;
the voxelization unit is used for voxelization processing of the target object according to the point cloud position in the point cloud information to obtain a voxel corresponding to the target object;
and the calculating unit is used for calculating the object volume of the target object according to the voxel quantity of the voxels.
In one possible implementation, the voxelization unit is further configured to:
determining a filling direction according to the point cloud position and a preset origin position;
and voxelization is carried out on the target object according to the filling direction and the point cloud position, so as to obtain a voxel corresponding to the target object.
In one possible implementation, the voxelization unit is further configured to:
obtaining a pre-divided voxel grid of an article storage space;
determining filling positions in the pre-divided voxel grid according to the filling directions and the point cloud positions;
dividing the filling position to obtain voxels corresponding to the target object in the pre-divided voxel grid.
In one possible implementation, the article volume calculation device further comprises a filtering unit for:
determining a point cloud position filtering range according to the size of the article storage space;
and filtering the initial position of the point cloud in the point cloud information of the target object according to the point cloud position filtering range to obtain the point cloud position.
In one possible implementation, the article volume calculation device further includes a curve plotting unit for:
Acquiring the accommodating volume of the article storage space;
calculating to obtain the volume rate of the article storage space according to the accommodating volume and the article volume;
and drawing a volume rate change curve according to the volume rate, and displaying the volume rate change curve on a display terminal.
In a possible implementation, the obtaining unit is further configured to:
acquiring a depth image of a target object;
determining original point cloud information of the target object according to the depth image;
and performing discrete filtering processing on the original point cloud information to obtain the point cloud information.
In a possible implementation, the obtaining unit is further configured to:
determining the center removing neighborhood of each point cloud unit according to the position of the point cloud unit in the original point cloud information;
counting the number of the point cloud units contained in each heart-removed neighborhood to obtain the number of the neighborhood point cloud units;
and screening the point cloud units according to the number of the neighborhood point cloud units corresponding to each point cloud unit to obtain the point cloud information of the non-outlier point cloud units, wherein the non-outlier point cloud units are point cloud units with the number of the neighborhood point cloud units being larger than a preset number threshold.
In a third aspect, the present application also provides an electronic device comprising a processor, a memory and a computer program stored in the memory and executable on the processor, the processor executing the steps in any of the article volume calculation methods provided herein when the processor invokes the computer program in the memory.
In a fourth aspect, the present application also provides a readable storage medium having stored thereon a computer program which, when executed by a processor, performs steps in any of the article volume calculation methods provided herein.
In summary, the method for calculating the volume of the object provided by the application includes: acquiring point cloud information of a target object; according to the point cloud position in the point cloud information, voxelization is carried out on the target object to obtain a voxel corresponding to the target object; and calculating the object volume of the target object according to the voxel quantity of the voxels. Therefore, the method for calculating the volume of the object does not need to carry out complex operations such as integration, approximation and the like when calculating the volume of the object, the volume of the object can be obtained by carrying out simple four operations according to the number of voxels, the calculation speed is high, the number of voxels can accurately represent the details on the appearance of the object, the details on the surface of the object cannot be missed, and therefore, the deviation between the calculated volume of the object and the actual volume is small, the calculation speed is ensured, the calculation accuracy is ensured, and the purpose of calculating the volume of the object in real time and accurately is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario of an article volume calculation method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for calculating the volume of an item provided in an embodiment of the present application;
FIG. 3 is a flow chart of generating voxels provided in an embodiment of the application;
FIG. 4 is a schematic view of a volumetric calculation method according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of obtaining a point cloud location according to an embodiment of the present application;
FIG. 6 is a flow chart of a method for generating a volumetric rate change curve provided in an embodiment of the present application;
FIG. 7 is a schematic flow chart of another embodiment of obtaining point cloud information;
FIG. 8 is a schematic diagram of one embodiment of an article volume calculation device provided in an embodiment of the present application;
Fig. 9 is a schematic structural diagram of an embodiment of an electronic device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In the description of the embodiments of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or an implicit indication of the number of features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known processes have not been described in detail in order to avoid unnecessarily obscuring descriptions of the embodiments of the present application. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in the embodiments of the present application.
The embodiment of the application provides a method and device for calculating the volume of an article, electronic equipment and a readable storage medium. The article volume calculating device may be integrated in an electronic device, which may be a server or a terminal.
The execution body of the method for calculating the volume of the article according to the embodiment of the present application may be an article volume calculating device provided by the embodiment of the present application, or different types of electronic devices such as a server device, a physical host, or a User Equipment (UE) integrated with the article volume calculating device, where the article volume calculating device may be implemented in a hardware or software manner, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a notebook computer, a palm computer, a desktop computer, or a personal digital assistant (Personal Digital Assistant, PDA).
The electronic device may be operated in a single operation mode, or may also be operated in a device cluster mode.
First, the relevant background art of the present application is described:
the point cloud is a massive point set of the surface characteristics of the object, and can represent information of three-dimensional coordinates X, Y, Z, color and the like of the object in a three-dimensional coordinate system. The point cloud is composed of a plurality of point cloud units, each point cloud unit contains information of a point on the surface of the object, and when describing, a great number of point cloud units are generally called as point cloud, so it is understood that the information of the point cloud is information of the point cloud units forming the point cloud, for example, the position of the point cloud can be understood as the position of the point cloud units forming the point cloud.
In calculating the cargo volume, there are two common calculation methods, one is to estimate the cargo volume by image recognition, but this method only considers two-dimensional information of the cargo, so the calculated cargo volume is greatly different from the actual volume. Another method is to cloud the cargo, calculate the cargo volume through the point cloud, for example, the bottom surface area and the height of the cargo can be obtained after the point cloud is voxelized, and then calculate the cargo volume, however, this calculation method only considers the general shape of the cargo, but does not consider the structural details of the cargo surface, so the calculated cargo volume still has a larger difference from the actual volume.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of an item volume calculation system provided in an embodiment of the present application. The article volume computing system may include an electronic device 100, with an article volume computing device integrated into the electronic device 100.
In addition, as shown in FIG. 1, the item volume computing system may also include a memory 200 for storing data, such as text data.
It should be noted that, the schematic view of the scenario of the article volume computing system shown in fig. 1 is only an example, and the article volume computing system and scenario described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application, and those skilled in the art can know that, as the article volume computing system evolves and new business scenarios appear, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
Next, an article volume calculating method provided in the embodiment of the present application will be described, in which an electronic device is used as an execution body, and in the subsequent method embodiments, the execution body will be omitted for simplicity and convenience of description.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for calculating the volume of an article according to an embodiment of the present application. It should be noted that although a logical order is depicted in the flowchart, in some cases the steps depicted or described may be performed in a different order than presented herein. The method for calculating the volume of the article specifically comprises the following steps 201 to 203, wherein:
201. and acquiring point cloud information of the target object.
The target object is an object of the volume to be detected. The target item may be, for example, a cargo transported during logistic transportation. For example, when an express company transports express items, the express items placed in the carriage of a logistics transportation vehicle can be used as target objects, and the volume of the express items can be obtained through the object volume calculation method in the embodiment of the application, so that logistics cost can be calculated conveniently. Or, the target object may be a cargo placed in the warehouse, and through the object volume calculation method in the embodiment of the present application, the user may obtain the occupied space volume in the warehouse, so as to optimize the warehouse allocation. The types of the target objects are not limited, for example, the target objects can be furniture such as a refrigerator and an air conditioner, food such as grain noodles, and the like, and furniture and food can be simultaneously contained.
In some embodiments, the target item may be a particular item in the storage space. By way of example, the target item may be a particular type of item in the storage space. For example, when furniture and food are placed in the warehouse at the same time, the food can be used as a target object, and the furniture can also be used as a target object, in which case, the objects in the warehouse can be classified by means of image recognition, and then the target object is selected. Alternatively, the target item may be one or more items specified in the storage space. For example, when furniture a, furniture B, and furniture C are simultaneously placed in a warehouse, furniture a may be taken as a target article. Likewise, the target object may be obtained by means of image recognition, and the detailed description is omitted.
In other embodiments, the target object may refer to all objects in the storage space, taking an application scenario of logistics transportation as an example, if a user loads a compartment of a logistics transportation vehicle during logistics transportation, furniture and food are simultaneously placed in the compartment, and the object is the furniture and the food because the object of the volume to be detected contains the furniture and the food in the compartment at the same time. In the subsequent logistics transportation process, if the user removes part of the express items in the carriage, for example, removes food in the carriage, furniture is also placed in the carriage, so that the object to be detected in the subsequent logistics transportation process is furniture still existing in the carriage, and the target object is furniture in the carriage.
The point cloud information is information obtained by point clouding the target object. The point cloud information may be a point cloud map obtained by converting an image containing the target object, in which point cloud data is displayed in the form of an image, or may be just point cloud data obtained by converting the image, for example, may be a data table in which point cloud data is stored in the form of a list.
Article information such as position information and color information of the target article can be obtained from the point cloud information. For example, the coordinates of the target object may be determined according to the coordinates of the point cloud in the point cloud information under the preset coordinate system, so as to obtain the position information of the target object. Or the color information of the target object can be obtained according to the RGB color information of the point cloud in the point cloud information.
Specifically, the point cloud information of the target object can be obtained through a laser radar and a preset point cloud device. The principle of the laser radar is that a laser pulse is emitted through a laser built in the laser radar, the emitted time is recorded by a timer, and the returned laser pulse is received by a receiver, and the returned time is recorded by the timer. The "time of flight" of the laser pulse is obtained by subtracting the two times, and the speed of the laser pulse is a fixed speed of light, so that the distance can be easily calculated after the speed and the time of flight are known, and the relative position relationship between the target object and the laser radar can be obtained. The laser radar can be a radar containing a plurality of laser transmitters such as 4 lines, 16 lines, 32 lines and 64 lines, and can also be a single-line laser radar, and therefore, the method in the embodiment of the application can be realized on the logistics transportation vehicle through a simple single-line laser radar, and the logistics transportation vehicle is large in quantity, and the logistics industry of carrying out the route optimization by frequently calculating the volume of logistics express mail is required. The point clouding device may be any component including a processing function, for example, the point clouding device may be a mobile terminal on a logistics transportation vehicle, or may be a cloud server communicatively connected to the mobile terminal on the logistics transportation vehicle, which is not limited in this embodiment of the present application. If the single-line laser radar is adopted to acquire the point cloud information of the target object, the data dimension acquired by the single-line laser radar is less than that of the radar containing a plurality of laser transmitters, so that when the volume of the target object is calculated, the data to be processed is less, and therefore, the object volume calculation method can be used for a mobile terminal of a logistics transportation vehicle, and calculation delay is reduced.
When the point cloud information is acquired, a depth image of a target object in a transportation space can be obtained through the laser radar, the depth image comprises three-dimensional position information of each point on the target object, namely, the relative position relation between the target object and the laser radar, the obtained depth image is input into the point cloud device, the point cloud device can convert one point or a plurality of points into a point cloud unit according to the three-dimensional position information of each point on the target object, therefore, the target object in the depth image can be converted into a point cloud formed by a plurality of point cloud units, and then a point cloud map can be formed according to the point cloud, so that a user can directly access the point cloud map when looking up the point cloud map, or the point cloud map can not be formed, and the subsequent calculation step is only performed according to the obtained point cloud information of the point cloud, so that the calculation amount is reduced.
202. And voxelization processing is carried out on the target object according to the point cloud position in the point cloud information, so as to obtain a voxel corresponding to the target object.
The point cloud position refers to the position of the target object corresponding to the point cloud, and thus the point cloud position also refers to the position of the target object. Specifically, the point cloud position may be a point cloud coordinate obtained by coordinating a space where the target object is located. For example, when the target object is a express item and the space in which the target object is located is a carriage of a logistics express vehicle, an arbitrary point in the carriage can be used as a space coordinate origin, the length of the carriage is used as an X-axis positive direction, the width of the carriage is used as a Y-axis positive direction, a space coordinate system is established by using the height of the carriage as a Z-axis positive direction, and then the space coordinate of each point cloud unit corresponding to the target object is determined to obtain the point cloud position.
Voxelization may refer to the process of dividing each point cloud element in a point cloud into a corresponding preset three-dimensional voxel grid to obtain a target object composed of voxels. The three-dimensional voxel grid is a three-dimensional grid obtained by dividing a space where a target object is located according to a preset size, and is composed of a plurality of sub-three-dimensional bodies. The voxels refer to sub-three-dimensional bodies corresponding to the positions of the target objects in a preset three-dimensional voxel grid. For example, for a three-dimensional space of 3m, if it is divided equally into 27 parts, each 1m is obtained as a sub-three-dimensional body, if the target object is a cuboid of 3m 1, and the 3 m-3 m surface coincides with the bottom surface of the three-dimensional space, the position of the target object corresponds to the 9 sub-three-dimensional bodies at the bottommost layer of the three-dimensional space, and therefore the 9 sub-three-dimensional bodies are voxels corresponding to the target object. The three-dimensional meshing dimensions illustrated in the embodiments of the present application are for convenience of description only and should not be construed as limiting the embodiments of the present application.
In some embodiments, the voxelization process includes a filling process in addition to dividing the resulting point cloud units to supplement the information of the non-photographed portions of the target item. The reasons for this include: the process of obtaining the point cloud information through the laser radar is essentially to convert the depth image into three-dimensional point cloud information, so that the point cloud information only contains information of the target object shot in the depth image, but does not contain information of a part of the target object which is not shot, for example, the point cloud information only contains surface area information of one side of the target object facing the laser radar, but does not contain back area information of the target object relative to the laser radar, and if no further processing is carried out, the obtained voxels only represent the surface information of the target object in a certain direction.
Specifically, after the first voxel corresponding to the point cloud unit is obtained, other sub-three-dimensional bodies with the same height as the first voxel are set as the second voxel of the target object in the grid coordinates of the preset three-dimensional voxel grid, and the first voxel and the second voxel are all voxels corresponding to the target object.
Since the point cloud position can refer to the position of the target object, the position of the obtained voxel can also refer to the position of the target object, and since the voxel is a three-dimensional body with extremely small size, the shape detail of the surface of the target object can be obtained according to the information of the voxel.
203. And calculating the object volume of the target object according to the voxel quantity of the voxels.
Specifically, the calculation may be performed according to the number of voxels and the preset volume of voxels to obtain the volume of the object. Continuing with the example in step 202, for the 3m three-dimensional space, if the target object is still a cuboid of 3m 1m and the plane of 3m coincides with the bottom surface of the three-dimensional space, the voxels of the target object refer to the 9 sub-three-dimensional volumes at the bottom layer of the three-dimensional space, and the number of voxels is 9, and the volume of each voxel is 1m 3 To sum up, the volume of the object can be calculated to be 9 x 1m 3 I.e. 9m 3 . Since the voxel information contains the shape details of the surface of the target object, the object volume calculated according to the voxel number also considers the details, and the accuracy of the calculated object volume is higher.
It is understood that the volume of an item may refer to the volume of a target item at a time, and may include the volumes of target items at multiple times. For a transportation process of 1:00 to 1:30, the volume of the object may refer to the volume of the object at the beginning of the transportation, i.e. at the moment of 1:00, and the volume of the object may also refer to the volume of the object detected every one minute from 1:00 during the whole transportation process of 1:00 to 1:30, where the volume of the object includes 30 volume values. In addition, the volume of the object may also refer to the volume of the object calculated when the volume of the object changes during the whole transportation process, for example, if during the transportation process, 1:00 is loaded once and 1:15 is unloaded once, the volumes of the object at 1:00 and 1:15 are changed, so the volume of the object includes the volume values calculated at the moments 1:00 and 1:15.
In summary, the method for calculating the volume of the object provided in the embodiment of the application includes: acquiring point cloud information of a target object; according to the point cloud position in the point cloud information, voxelization is carried out on the target object to obtain a voxel corresponding to the target object; and calculating the object volume of the target object according to the voxel quantity of the voxels. Therefore, the method for calculating the volume of the object provided by the embodiment of the application does not need to carry out complex operations such as integration, approximation and the like when calculating the volume of the object, the volume of the object can be obtained by carrying out simple four-rule operations according to the number of voxels, the calculation speed is high, the number of voxels can accurately represent the details on the appearance of the object, the details on the surface of the object cannot be missed, and therefore the deviation between the calculated volume of the object and the actual volume is small, the calculation speed is ensured, the calculation accuracy is ensured, and the purpose of calculating the volume of the object in real time and accurately is realized.
In order to save space volume of the transport space or the storage space, a lidar for acquiring point cloud information is usually provided on a space ceiling of the transport space or the storage space. For example, when the target object is placed in a cabin of a logistics transportation vehicle, a laser radar is arranged on the top wall of the cabin, and the laser radar scans downwards to obtain point cloud information. In consideration of the installation position of the lidar, the embodiment of the present application provides a voxelization method to avoid misjudging, as a part of the target object, a space of the target object not occupied by the target object in the back surface direction of the lidar when voxelization is performed by the voxelization method described in step 202.
Referring to fig. 3, at this time, voxel processing is performed on the target object according to the point cloud position in the point cloud information, to obtain a voxel corresponding to the target object, including:
301. and determining a filling direction according to the point cloud position and a preset origin position.
The filling direction is a direction when the target article region not included in the point cloud information is voxelized. For example, a direction in which a preset origin position points to a point cloud position may be taken as a filling direction. For example, in a preset three-dimensional space coordinate system, the coordinates of the point cloud unit a in the point cloud position are (x 1, y1, z 1), the coordinates of the preset origin are (x 0, y0, z 0), and the filling direction is the direction of the vector (x 1-x0, y1-y0, z1-z 0). The position of the preset origin point can be the position of the laser radar, or the position near the laser radar, and the position only needs to be kept near the top wall of the transportation space or the storage space.
302. And voxelization is carried out on the target object according to the filling direction and the point cloud position, so as to obtain a voxel corresponding to the target object.
Specifically, a filling starting point in a three-dimensional voxel grid can be determined according to a point cloud position, a point to be divided is selected in the three-dimensional voxel grid according to a mapping direction of a filling direction in the three-dimensional voxel grid and the filling starting point until a preset farthest position in the mapping direction, the point to be divided is divided, and voxels containing the point to be divided are taken as voxels of a target object so as to fill a region of the target object which is not shot in a depth image. For example, the voxel corresponding to the target item may be obtained by:
(1) A pre-partitioned voxel grid of the item storage space is acquired.
The article storage space refers to a space in which the target article is located, and may be a transport space when the target article is transported, or may be a storage space when the target article is placed. For example, the article storage space may be a compartment of a logistics transportation vehicle or may be a warehouse of a sorting factory. In addition, the item storage space may also be a transport space or a partial area in the storage space. For example, the item storage space may be part of a cabin in a logistics transportation vehicle.
The pre-divided voxel network is a three-dimensional network obtained by dividing the object storage space according to a preset size, and the description of the three-dimensional voxel grid can be referred to above, and details are not repeated.
(2) And determining filling positions in the pre-divided voxel grid according to the filling directions and the point cloud positions.
The filling position refers to the points to be divided described above, and the filling position contains all the points to be divided corresponding to each point cloud unit. Specifically, a grid coordinate system identical to the three-dimensional space coordinate system in step 301 may be established in the pre-divided voxel grid, the grid coordinate system and the zero point, the X-axis positive direction, the Y-axis positive direction, and the Z-axis positive direction of the three-dimensional space coordinate system being identical, for example, when the zero point position in the three-dimensional space coordinate system is the position of the laser radar in the vehicle cabin, the zero point position in the grid coordinate system is also the position of the laser radar in the vehicle cabin. After the grid coordinate system is obtained, firstly, grid positions corresponding to the point cloud positions in the grid coordinate system and grid directions corresponding to the filling directions in the grid coordinate system are obtained, then, the grid positions can be used as filling starting points, one filling position is selected at intervals in the grid directions until the farthest position preset in the grid directions is reached, and all the filling positions are obtained sequentially.
The furthest position corresponding to different article storage spaces can be determined according to the type of the target article, so long as the furthest position is in the article storage space. For example, when the target article is a small-sized package, since the small-sized package is difficult to stack up without stacking up the lower layer, a larger farthest position may be set, for example, taking the boundary of the article storage space as the farthest position, that is, if the filling positions are sequentially acquired in one filling direction, the newly acquired filling position is removed outside the boundary of the article storage space, and the acquisition of the filling position in that filling direction is stopped. If the target article is a large-sized package, the package can be stably stacked on the lower package even if the lower package is not stacked, so that a smaller farthest position can be set, for example, the boundary of the article storage space can be reduced in an equal proportion, and the reduced boundary is then used as the farthest position.
(3) Dividing the filling position to obtain voxels corresponding to the target object in the pre-divided voxel grid.
The specific steps of (2) - (3) are illustrated below:
assuming that the grid positions of the point cloud units are (1 m,1 m) in a preset grid coordinate system, and the grid directions are the directions of vectors (1 m,2 m), a filling position can be selected every 0.03m in the grid directions until reaching a predefined boundary of the grid coordinate system, wherein the predefined boundary is the farthest position. The coordinates of each filling position thus obtained are respectively: (1.01 m,1.02 m), (1.02 m,1.04 m) … …, and then matching each filling position with the position contained in each sub-three-dimensional volume, and setting the sub-three-dimensional volume containing the filling position as the voxel of the target object.
In some embodiments, if the three-dimensional coordinates of the point cloud unit include multi-bit decimal places, for simplicity of operation and reduced duplication of divisions, the three-dimensional coordinates of the point cloud unit may be kept a certain number of bit decimal places as the starting point for filling, for example, when the size of the sub-three-dimensional volume is 0.1 x 0.1, and the unit is m, and the preset selection distance when selecting the point to be divided can be the same as the side length of the sub three-dimensional body, namely if the three-dimensional coordinates of the point cloud unit are (1.11 m ), taking (1.1 m ) as the filling start point, and selecting a filling position every 0.1m in the filling direction.
Further, after obtaining the voxels, the voxels may be de-duplicated to avoid the situation of repeated partitioning. For example, the sub-three-dimensional body numbers of all voxels in the pre-partitioned voxel grid may be extracted, and the repeated sub-three-dimensional body numbers are deduplicated to preserve all unique sub-three-dimensional body numbers.
Referring to fig. 4, fig. 4 is a schematic diagram of an embodiment of the present application, where the left diagram in fig. 4 is a left view of a vehicle cabin when looking from a front to a rear of the vehicle, a is a target object, B is a lidar, an area corresponding to a and a shaded area C is a filling area obtained according to an embodiment of the present application, and an area corresponding to a and a shaded area C and a shaded area D are filling areas obtained according to a method in step 202, and it is apparent that the filling area obtained by the method in the embodiment of the present application can exclude the shaded area D compared to the method in step 202, and accuracy of volume calculation is improved.
In some embodiments, noise point cloud units outside the object storage space and/or noise point cloud units generated after wall point clouding of the object storage space can be filtered, so that calculation amount is reduced, and meanwhile, misjudgment of a non-target object area as a target object area during voxelization can be avoided. Referring to fig. 5, at this time, according to the point cloud position in the point cloud information, the voxel processing is performed on the target object, and before the voxel corresponding to the target object is obtained, the method further includes:
401. and determining a point cloud position filtering range according to the size of the article storage space.
The point cloud position filtering range is a position range for filtering point cloud units according to the point cloud position, and the point cloud units outside the point cloud position filtering range are noise point cloud units needing to be filtered. For example, a spatial coordinate system may be established for the item storage space, and a point cloud location filtering range expressed in spatial coordinates may be determined according to the size of the item storage space. For example, when the object storage space is a car of a logistics express delivery vehicle, the position of a laser radar arranged at a corner of a ceiling in the car can be used as a coordinate origin, the length of the car is used as an X-axis positive direction, the width of the car is used as a Y-axis positive direction, a space coordinate system is established by using the height of the car as a Z-axis positive direction, and the coordinate range in the car is determined according to the size of the car. With continued reference to fig. 4, there are shown in fig. 4 a left view and a front view of the vehicle cabin when looking from the front of the vehicle toward the rear of the vehicle, the left view being the left view, the right view being the front view, and if the length, width, and height of the vehicle cabin are 5m,3m, and 3m, respectively, the point cloud position filtering ranges are (0, 0) to (5 m,3 m) in fig. 4. When the method is applied, the point cloud position filtering range can be adjusted to screen out the express items in different areas in the carriage, so that the volumes of the express items in different areas can be calculated.
Further, the coordinate range obtained above may be further compressed to remove the wall thickness of the article storage space. For example, the wall thickness may be calculated according to the size of the cabin and a preset compression ratio. If the preset compression ratio is 0.05, the length, width and height can be multiplied by the compression ratio respectively, if the object storage space is a carriage, and the length, width and height of the carriage are 5 mm, 3m and 3m respectively, the total thickness of two opposite walls in the long direction is 0.5m, the total thickness of two opposite walls in the wide direction is 0.3m, the total thickness of two opposite walls in the high direction, namely the total thickness of the top wall of the carriage and the bottom wall of the carriage is 0.3m, and the filtering range of the position of the point cloud is (0.25 m,0.15 m) to (4.75 m,2.85m and 2.85 m) after the thickness of the wall is removed.
Specifically, the point cloud position filtering range after the wall is removed can be obtained by the following formula (1) -formula (6):
x' min =x min +α*(x max -x min ) (1)
x' max =x max -α*(x max -x min ) (2)
y' min =y min +α*(y max -y min ) (3)
y' max =y max -α*(y max -y min ) (4)
z' min =z min +α*(z max -z min ) (5)
z' max =z max -α*(z max -z min ) (6)
Wherein x' min 、x' max 、y' min 、y' max 、z' min 、z' max All are range end point coordinates in a filtering range of the point cloud position after removing the wall, alpha is a preset compression ratio, and x min 、x max 、y min 、y max 、z min 、z max Are all non-removed wall point cloud location filtering ranges, so x min 、y min 、z min It can be understood that the origin coordinates, i.e. 0, x max 、y max 、z max It is understood that the length, width, and height of the vehicle cabin, i.e., 5m, 3m, and if α is set to 0.05, the above-mentioned (0.25 m,0.15 m) to (4.75 m,2.85m, and 2.85 m) can be obtained through the formula (1) -6.
402. And filtering the initial position of the point cloud in the point cloud information of the target object according to the point cloud position filtering range to obtain the point cloud position.
The initial position refers to a noise point cloud unit outside the unfiltered article storage space and/or a noise point cloud unit corresponding to a wall of the article storage space, and therefore the initial position includes the noise point cloud unit outside the article storage space and/or the noise point cloud unit corresponding to the wall of the article storage space. For example, the initial position may include a point cloud unit position corresponding to a wall of the object storage space, and may also include a point cloud unit position corresponding to a non-target object. If the noise point cloud units in the initial position are not filtered, voxels formed after the point cloud units are voxelized are obtained simultaneously when the subsequent calculation step is carried out, so that the error number of the voxels obtained through statistics is caused, and the accuracy rate of calculating the volume of the object is further affected.
During filtering, the position of each point cloud unit in the initial position can be matched with the point cloud position filtering range, the position of the point cloud unit with the position falling into the point cloud position filtering range is used as the point cloud position, and the point cloud unit with the position not falling into the point cloud position filtering range is used as the noise point cloud unit for filtering.
In some embodiments, the change in volume of the item over time may also be plotted as a curve for analysis by the user. Referring to fig. 6, after calculating the object volume of the target object according to the voxel number of the voxels, the method further includes:
501. a receiving volume of the item storage space is obtained.
The accommodation volume refers to the maximum volume of the article storage space that can accommodate an article. The receiving volume can be calculated from the size of the article storage space. If the article storage space is a carriage, the length, width and height of the carriage are 5 mm, 3m and 3m respectively, the accommodation volume is 45m 3 . Or, the standard parameters recorded by the article storage space when leaving the factory can be directly read, so that the more accurate accommodating volume can be obtained.
502. And calculating the volume rate of the article storage space according to the accommodating volume and the article volume.
The volumetric rate refers to the ratio of the space that the receiving volume has been occupied by the target article. In particular, the volume of the article may be divided by the containment volume to yield the volumetric rate. It should be noted that, since the purpose of drawing the curve is to determine the change of the volume of the article with time, the volume of the article includes the volume values of the target article at a plurality of moments, the calculated volume rate also includes the ratio of a plurality of moments, and the calculated volume rate carries the corresponding time information.
503. And drawing a volume rate change curve according to the volume rate, and displaying the volume rate change curve on a display terminal.
The volume rate change curve is a curve representing the correspondence between the volume rate and time. For example, the volume rate change curve may be a curve in which the volume rate is set as a Y value and the time is set as an X value in a preset X-Y coordinate system. From the volume rate change curve, the change condition of the volume rate in the transportation process can be obtained, and then a user can obtain a time period with low utilization rate of the storage space of the article in the transportation process by observing the volume rate change curve on the display terminal, and then compare the time period with a preset route, so that the rationality of the route can be judged, and the transportation route can be adjusted and re-planned.
Besides filtering noise point cloud units outside the article storage space and/or noise point cloud units corresponding to walls of the article storage space through the point cloud position filtering range, noise point cloud units in the article storage space can be filtered through discrete filtering, and all noise point cloud units can be effectively filtered through the combination of discrete filtering and the point cloud position filtering range. Referring to fig. 7, the acquiring the point cloud information of the target object at this time includes:
601. a depth image of the target item is acquired.
The method for acquiring the depth image is not limited, and the depth image can be acquired by a single-line laser radar by way of example, and detailed description is omitted.
602. And determining the original point cloud information of the target object according to the depth image.
The original point cloud information refers to information of each point cloud unit corresponding to the target object when noise point cloud units in the object storage space are not filtered. The original point cloud information may not be filtered by the point cloud position filtering range, or may have been filtered by the point cloud position filtering range, and if the original point cloud information is not filtered by the point cloud position filtering range, the filtering of the noise point cloud units outside the object storage space and/or the noise point cloud units corresponding to the walls of the object storage space may be continued after the filtering of the embodiment of the present application is completed.
603. And performing discrete filtering processing on the original point cloud information to obtain the point cloud information.
The discrete filtering process refers to a process of filtering out discrete point cloud units. The concept of point cloud has been described above, a large number of point cloud units are usually obtained only at the position where an object exists after point clouding, so that point cloud is obtained at the target object in an ideal state, however, discrete point cloud units may still be generated at the position where the target object does not exist due to the fact that the background environment contained in the depth image is too complex, and the like, and in order to ensure the calculation accuracy of the object volume, the discrete point cloud units need to be filtered out to obtain point cloud information.
In some embodiments, an average distance between each point cloud unit and the rest of the point cloud units may be calculated, then the average distance is compared with a preset distance threshold, if the average distance is smaller than the distance threshold, it is indicated that the point cloud unit corresponding to the average distance is too far from the rest of the point cloud units, and the point cloud unit may be determined as a discrete point cloud unit. Or after calculating the average distance, calculating to obtain a distance standard deviation according to the average distance and the distance between each point cloud unit and each other point cloud unit, and filtering out the first point cloud unit corresponding to each point cloud unit if the first point cloud unit with the distance larger than the distance standard deviation exists for each point cloud unit.
In other embodiments, the discrete filtering process may also be performed according to the number of remaining point cloud units in the vicinity of each point cloud unit. Specifically, the process can be performed by the following steps:
(a) And determining the center removing neighborhood of each point cloud unit according to the position of the point cloud unit in the original point cloud information.
The decored neighborhood is an area for determining the distance between point cloud units. For one point cloud element, if another point cloud element is within the decorrelation neighborhood of the point cloud element, then it may be determined that the distance between the two point cloud elements is close.
The region size and the region shape of the coring neighborhood can be set according to practical situations, for example, 1m can be set as the radius of the coring neighborhood to obtain a spherical coring neighborhood taking the datum point cloud unit as the center of sphere, and the coring neighborhood can be set as a cube region taking the datum point cloud unit as the center. It will be appreciated that there is a corresponding coring neighborhood for each point cloud element, and that the corresponding coring neighborhood for each point cloud element has the same region size and region shape.
(b) And counting the number of the point cloud units contained in each heart-removed neighborhood to obtain the number of the neighborhood point cloud units.
The number of neighborhood point cloud units refers to the number of point cloud units contained in the decored neighborhood. If a reference point cloud unit includes 3 point cloud units in its corresponding coring neighborhood, the number of neighborhood point cloud units corresponding to the reference point cloud unit is 3. It can be understood that, since each point cloud unit corresponds to a neighborhood of the heart, each point cloud unit also corresponds to a neighborhood point cloud unit number.
(c) And screening the point cloud units according to the number of the neighborhood point cloud units corresponding to each point cloud unit to obtain the point cloud information of the non-outlier point cloud units, wherein the non-outlier point cloud units are point cloud units with the number of the neighborhood point cloud units being larger than a preset number threshold.
The preset number threshold is a threshold for evaluating how many neighborhood point cloud units are. During screening, the number of the neighborhood point cloud units corresponding to each point cloud unit can be compared with a preset number threshold, if the number of the neighborhood point cloud units is smaller than or equal to the preset number threshold, the point cloud units corresponding to the number of the neighborhood point cloud units are the outlier point cloud units, if the number of the neighborhood point cloud units is larger than the preset number threshold, the point cloud units corresponding to the number of the neighborhood point cloud units are the non-outlier point cloud units, after the non-outlier point cloud units and the outlier point cloud units are obtained through dividing, the information of the non-outlier point cloud units is obtained, and then the point cloud information can be obtained.
The following provides a method for drawing a volume rate change curve in the express delivery process, wherein in the following steps, the volume of an object refers to the volume of a target object at a certain moment, and the method is specifically as follows:
(A) Acquiring a depth image in a carriage through a single-line laser radar;
(B) Converting the depth image into original point cloud information, and performing discrete filtering processing on the original point cloud information to obtain point cloud information;
(C) Determining a point cloud position filtering range according to the size of the carriage, and filtering an initial position in the point cloud information according to the point cloud position filtering range to obtain a point cloud position;
(D) Determining a filling direction according to the position of the point cloud and the position of the single-line laser radar, and determining the filling position of each point cloud unit according to the filling direction and the position of the point cloud;
(E) Dividing filling positions of each point cloud unit, and dividing each filling position into corresponding sub-three-dimensional bodies in the pre-divided voxel grid to obtain voxels of the target object;
(F) Counting the number of voxels, and calculating to obtain the object volume of the object according to the number of voxels and the volume of the object storage space;
(G) And (3) acquiring the volume of the historical object in the storage space, which is also calculated in the steps (A) - (F), drawing a volume rate change curve according to the volume of the historical object, the volume of the object and the time information carried by each object, and displaying the obtained volume rate change curve on a display screen of a mobile terminal in a cockpit of the transport vehicle.
In order to better implement the method for calculating the volume of the object in the embodiment of the present application, based on the method for calculating the volume of the object, the embodiment of the present application further provides an apparatus for calculating the volume of the object, as shown in fig. 8, which is a schematic structural diagram of an embodiment of the apparatus for calculating the volume of the object in the embodiment of the present application, the apparatus 700 for calculating the volume of the object includes:
an acquiring unit 701, configured to acquire point cloud information of a target object;
a voxelization unit 702, configured to voxeize the target object according to the point cloud position in the point cloud information, so as to obtain a voxel corresponding to the target object;
a calculating unit 703, configured to calculate an article volume of the target article according to the number of voxels of the voxels.
In one possible implementation, the voxelization unit 702 is further configured to:
determining a filling direction according to the point cloud position and a preset origin position;
and voxelization is carried out on the target object according to the filling direction and the point cloud position, so as to obtain a voxel corresponding to the target object.
In one possible implementation, the voxelization unit 702 is further configured to:
obtaining a pre-divided voxel grid of an article storage space;
Determining filling positions in the pre-divided voxel grid according to the filling directions and the point cloud positions;
dividing the filling position to obtain voxels corresponding to the target object in the pre-divided voxel grid.
In one possible implementation, the item volume calculation apparatus 700 further comprises a filtering unit 704, the filtering unit 704 being configured to:
determining a point cloud position filtering range according to the size of the article storage space;
and filtering the initial position of the point cloud in the point cloud information of the target object according to the point cloud position filtering range to obtain the point cloud position.
In one possible implementation, the article volume calculation device 700 further includes a curve plotting unit 705, the curve plotting unit 705 being configured to:
acquiring the accommodating volume of the article storage space;
calculating to obtain the volume rate of the article storage space according to the accommodating volume and the article volume;
and drawing a volume rate change curve according to the volume rate, and displaying the volume rate change curve on a display terminal.
In one possible implementation, the obtaining unit 701 is further configured to:
acquiring a depth image of a target object;
determining original point cloud information of the target object according to the depth image;
And performing discrete filtering processing on the original point cloud information to obtain the point cloud information.
In one possible implementation, the obtaining unit 701 is further configured to:
determining the center removing neighborhood of each point cloud unit according to the position of the point cloud unit in the original point cloud information;
counting the number of the point cloud units contained in each heart-removed neighborhood to obtain the number of the neighborhood point cloud units;
and screening the point cloud units according to the number of the neighborhood point cloud units corresponding to each point cloud unit to obtain the point cloud information of the non-outlier point cloud units, wherein the non-outlier point cloud units are point cloud units with the number of the neighborhood point cloud units being larger than a preset number threshold.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
Since the method for calculating the volume of the article according to any embodiment can be executed by the apparatus for calculating the volume of the article, the method for calculating the volume of the article according to any embodiment of the present application can achieve the beneficial effects, which are described in detail in the foregoing, and will not be described in detail herein.
In addition, in order to better implement the method for calculating the volume of the object in the embodiment of the present application, on the basis of the method for calculating the volume of the object, an electronic device is further provided in the embodiment of the present application, and referring to fig. 9, fig. 9 shows a schematic structural diagram of the electronic device in the embodiment of the present application, specifically, the electronic device provided in the embodiment of the present application includes a processor 801, where the processor 801 is configured to implement each step of the method for calculating the volume of the object in any embodiment when executing a computer program stored in a memory 802; alternatively, the processor 801 is configured to implement the functions of the units in the corresponding embodiment as shown in fig. 8 when executing the computer program stored in the memory 802.
By way of example, a computer program may be partitioned into one or more modules/units that are stored in memory 802 and executed by processor 801 to accomplish the embodiments of the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing particular functions to describe the execution of the computer program in a computer device.
Electronic devices may include, but are not limited to, processor 801, memory 802. It will be appreciated by those skilled in the art that the illustrations are merely examples of electronic devices and are not limiting of electronic devices, and may include more or fewer components than illustrated, or may combine certain components, or different components.
The processor 801 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center for an electronic device, with various interfaces and lines connecting various parts of the overall electronic device.
The memory 802 may be used to store computer programs and/or modules, and the processor 801 implements various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 802 and invoking data stored in the memory 802. The memory 802 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the electronic device, and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the article volume calculating device, the electronic device and the corresponding units described above may refer to the description of the article volume calculating method in any embodiment, and will not be repeated herein.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions or by controlling associated hardware, which may be stored on a readable storage medium and loaded and executed by a processor.
For this reason, the embodiment of the present application provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps in the method for calculating the volume of an article in any embodiment of the present application, and specific operations may refer to the description of the method for calculating the volume of an article in any embodiment, which is not repeated herein.
Wherein the readable storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the readable storage medium may perform the steps in the method for calculating the volume of the article in any embodiment of the present application, the beneficial effects that can be achieved by the method for calculating the volume of the article in any embodiment of the present application can be achieved, which is detailed in the foregoing description and will not be repeated herein.
The foregoing describes in detail a method, apparatus, storage medium and electronic device for calculating a volume of an article according to embodiments of the present application, and specific examples are applied to describe principles and implementations of the present application, where the descriptions of the foregoing embodiments are only used to help understand the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method of calculating the volume of an article, comprising:
acquiring point cloud information of a target object;
according to the point cloud position in the point cloud information, voxelization is carried out on the target object to obtain a voxel corresponding to the target object;
and calculating the object volume of the target object according to the voxel quantity of the voxels.
2. The method of calculating the volume of an object according to claim 1, wherein the voxel processing is performed on the target object according to the point cloud position in the point cloud information to obtain a voxel corresponding to the target object, including:
Determining a filling direction according to the point cloud position and a preset origin position;
and voxelization is carried out on the target object according to the filling direction and the point cloud position, so as to obtain a voxel corresponding to the target object.
3. The method according to claim 2, wherein the voxelizing the target object according to the filling direction and the point cloud position to obtain a voxel corresponding to the target object comprises:
obtaining a pre-divided voxel grid of an article storage space;
determining filling positions in the pre-divided voxel grid according to the filling directions and the point cloud positions;
dividing the filling position to obtain voxels corresponding to the target object in the pre-divided voxel grid.
4. The method according to claim 1, wherein before the voxelization of the target object according to the point cloud position in the point cloud information to obtain the voxel corresponding to the target object, the method further comprises:
determining a point cloud position filtering range according to the size of the article storage space;
and filtering the initial position of the point cloud in the point cloud information of the target object according to the point cloud position filtering range to obtain the point cloud position.
5. The method of claim 1, wherein after calculating the object volume of the target object from the number of voxels of the voxels, the method further comprises:
acquiring the accommodating volume of the article storage space;
calculating to obtain the volume rate of the article storage space according to the accommodating volume and the article volume;
and drawing a volume rate change curve according to the volume rate, and displaying the volume rate change curve on a display terminal.
6. The method of any one of claims 1-5, wherein the acquiring the point cloud information of the target object includes:
acquiring a depth image of a target object;
determining original point cloud information of the target object according to the depth image;
and performing discrete filtering processing on the original point cloud information to obtain the point cloud information.
7. The method of claim 6, wherein performing discrete filtering on the raw point cloud information to obtain point cloud information comprises:
determining the center removing neighborhood of each point cloud unit according to the position of the point cloud unit in the original point cloud information;
Counting the number of the point cloud units contained in each heart-removed neighborhood to obtain the number of the neighborhood point cloud units;
and screening the point cloud units according to the number of the neighborhood point cloud units corresponding to each point cloud unit to obtain the point cloud information of the non-outlier point cloud units, wherein the non-outlier point cloud units are point cloud units with the number of the neighborhood point cloud units being larger than a preset number threshold.
8. An article volume calculation device, comprising:
the acquisition unit is used for acquiring the point cloud information of the target object;
the voxelization unit is used for voxelization processing of the target object according to the point cloud position in the point cloud information to obtain a voxel corresponding to the target object;
and the calculating unit is used for calculating the object volume of the target object according to the voxel quantity of the voxels.
9. An electronic device comprising a processor, a memory and a computer program stored in the memory and executable on the processor, the processor implementing the steps in the method of calculating the volume of an item as claimed in any one of claims 1 to 7 when the computer program is executed by the processor.
10. A readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps in the calculation of the volume of an item according to any one of claims 1 to 7.
CN202111545395.XA 2021-12-16 2021-12-16 Method and device for calculating volume of article, electronic equipment and readable storage medium Pending CN116266363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111545395.XA CN116266363A (en) 2021-12-16 2021-12-16 Method and device for calculating volume of article, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111545395.XA CN116266363A (en) 2021-12-16 2021-12-16 Method and device for calculating volume of article, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116266363A true CN116266363A (en) 2023-06-20

Family

ID=86743294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111545395.XA Pending CN116266363A (en) 2021-12-16 2021-12-16 Method and device for calculating volume of article, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116266363A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117314903A (en) * 2023-11-28 2023-12-29 四川港投云港科技有限公司 3D point cloud data processing method for bulk commodity indoor warehouse laser radar
CN117670979A (en) * 2024-02-01 2024-03-08 四川港投云港科技有限公司 Bulk cargo volume measurement method based on fixed point position monocular camera

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117314903A (en) * 2023-11-28 2023-12-29 四川港投云港科技有限公司 3D point cloud data processing method for bulk commodity indoor warehouse laser radar
CN117314903B (en) * 2023-11-28 2024-03-15 四川港投云港科技有限公司 3D point cloud data processing method for bulk commodity indoor warehouse laser radar
CN117670979A (en) * 2024-02-01 2024-03-08 四川港投云港科技有限公司 Bulk cargo volume measurement method based on fixed point position monocular camera
CN117670979B (en) * 2024-02-01 2024-04-30 四川港投云港科技有限公司 Bulk cargo volume measurement method based on fixed point position monocular camera

Similar Documents

Publication Publication Date Title
CN107194646B (en) Inventory scheduling method and device
CN116266363A (en) Method and device for calculating volume of article, electronic equipment and readable storage medium
WO2021197345A1 (en) Method and apparatus for measuring remaining volume in closed space on basis of laser radar
WO2019125654A1 (en) Container loading/unloading time estimation
JP7417745B2 (en) Methods, devices, computing devices, logistics systems and storage media for detecting parcels
CN108981563B (en) Volume measurement method, device and system
CN111007485A (en) Image processing method and device and computer storage medium
WO2023236825A1 (en) Method and apparatus for monitoring capacity utilization rate, and computer-readable storage medium
CN115546300A (en) Method and device for identifying pose of tray placed tightly, computer equipment and medium
CN115271149A (en) Container space optimization method and device, electronic equipment and storage medium
CN112432596B (en) Space measuring method, space measuring device, electronic equipment and computer storage medium
CN114170596A (en) Posture recognition method and device, electronic equipment, engineering machinery and storage medium
CN117011362A (en) Method for calculating cargo volume and method for dynamically calculating volume rate
CN113988740A (en) Carriage loading and unloading rate calculation method and device
JP7352706B2 (en) Cargo counting method and device, computer device, and storage medium
CN109759339B (en) Sorting method, sorting device and sorting terminal for logistics packages
CN115496453B (en) Cargo loading method and device, electronic equipment and storage medium
CN111348357B (en) Logistics object management method, mechanical transmission equipment and logistics object container
CN116957459A (en) Intelligent matching method, system, equipment and storage medium based on freight scene
US11763439B2 (en) Systems and methods for assessing trailer utilization
CN115909204A (en) Method and device for determining vehicle motion strategy based on container spreader detection
CN115100283A (en) Goods placement control method and device, computer equipment and storage medium
JP7323170B2 (en) Loading volume ratio measuring device, system, method and program
CN115272465A (en) Object positioning method, device, autonomous mobile device and storage medium
CN116363192A (en) Volume measurement method and device for warehouse goods, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination