CN116228841A - Volume measurement method and apparatus, and computer-readable storage medium - Google Patents

Volume measurement method and apparatus, and computer-readable storage medium Download PDF

Info

Publication number
CN116228841A
CN116228841A CN202111470266.9A CN202111470266A CN116228841A CN 116228841 A CN116228841 A CN 116228841A CN 202111470266 A CN202111470266 A CN 202111470266A CN 116228841 A CN116228841 A CN 116228841A
Authority
CN
China
Prior art keywords
target
point cloud
reference plane
detected
plane
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
CN202111470266.9A
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202111470266.9A priority Critical patent/CN116228841A/en
Priority to PCT/CN2022/078895 priority patent/WO2023097913A1/en
Publication of CN116228841A publication Critical patent/CN116228841A/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/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Abstract

The invention provides a volume measurement method, a volume measurement device, an electronic apparatus, and a computer-readable storage medium. According to the embodiment of the invention, the original point cloud of the target to be detected is obtained, the original point cloud is segmented to obtain a first target point cloud comprising the target to be detected and a first reference plane point cloud, the first reference plane point cloud is fitted to obtain a first target reference plane, the relative height of each point in the first target point cloud relative to the background plane of the target to be detected is obtained according to the first target reference plane, the voxel number of the target to be detected is further obtained, and the volume of the target to be detected is obtained according to the voxel equivalent calibrated in advance and the voxel number of the target to be detected. According to the embodiment of the invention, the object volume can be accurately measured under the condition of stereo irregularity through the pre-calibrated voxel equivalent and the voxel number of the object to be measured.

Description

Volume measurement method and apparatus, and computer-readable storage medium
Technical Field
The present invention relates to the field of computer vision, and in particular, to a method and apparatus for volumetric measurement, and a computer readable storage medium.
Background
With the continuous development of modern industrial technology, logistics industry and the like, in order to reduce the manual burden and improve the detection efficiency and precision, the requirements for automatic visual detection are increasing in various industrial fields, wherein the requirements for object volume detection include logistics package, PCB soldering tin or heat conducting glue and the like.
Because of the diversity of objects and environments, object volume detection is difficult, and in most volume measurement methods, there is a limited requirement for detection targets, such as conventional logistic parcel detection, which generally requires that the parcel be a cuboid of standard length, width and height, and such volume measurement methods are not applicable to non-standard objects. In practical engineering application, irregular objects are more common, and the volume detection difficulty is higher.
Disclosure of Invention
Embodiments of the present invention provide a volume measurement method, a volume measurement device, an electronic apparatus, and a computer-readable storage medium capable of measuring the volume of an irregular object.
In a first aspect, an embodiment of the present invention provides a method for measuring a volume, the method including:
acquiring a first original point cloud of a target to be detected;
dividing the first original point cloud to obtain a first target point cloud and a first reference plane point cloud;
fitting the first reference plane point cloud to obtain a first target reference plane;
determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the first target reference plane;
determining the voxel number of the target to be detected according to the relative heights of all points;
and obtaining the volume of the target to be measured according to the pre-calibrated voxel equivalent and the voxel number of the target to be measured.
In a second aspect, embodiments of the present invention provide a volume measurement device, the device comprising:
the measuring module is used for acquiring a first original point cloud of the target to be measured;
the segmentation module is used for segmenting the first original point cloud to obtain a first target point cloud and a first reference plane point cloud;
the fitting module is used for fitting the first reference plane point cloud to obtain a first target reference plane;
the first processing module is used for determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the first target reference plane;
the second processing module is used for determining the voxel number of the target to be detected according to the relative heights of all points;
and the third processing module is used for obtaining the volume of the target to be measured according to the pre-calibrated voxel equivalent and the voxel number of the target to be measured.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which processor, when executing the computer program, implements the method of volumetric measurement as provided in the first aspect above.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the method of volumetric measurement as provided in the first aspect above.
According to the embodiment of the invention, the original point cloud of the target to be detected is obtained, the original point cloud is segmented to obtain a first target point cloud and a first reference plane point cloud which comprise the target to be detected, the first reference plane point cloud is fitted to obtain a first target reference plane, the relative height of each point in the first target point cloud relative to the background plane of the target to be detected is determined according to the first target reference plane, the voxel number of the target to be detected is further obtained, and the volume of the target to be detected is obtained according to the voxel equivalent calibrated in advance and the voxel number of the target to be detected. According to the embodiment of the invention, the object volume can be accurately measured under the condition of stereo irregularity through the pre-calibrated voxel equivalent and the voxel number of the object to be measured.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate and do not limit the invention.
FIG. 1 is a flow chart of a method for volumetric measurement according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for volumetric measurement according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method for volumetric measurement according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a spatial coordinate system according to an embodiment of the present invention;
fig. 5 is a schematic diagram of XOZ plane projection of a first target point cloud (omitting an internal point cloud) provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of XOZ plane projection of a first target point cloud (omitting an internal point cloud) provided by an embodiment of the present invention;
FIG. 7 is a schematic diagram of a volume measurement device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It should be appreciated that in the description of embodiments of the present invention, the descriptions of "first," "second," etc. are for the purpose of distinguishing between technical features only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated. "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any of these items, including any group of single or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b and c may be single or multiple.
In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The embodiment of the invention provides a volume measurement method, a volume measurement device, electronic equipment and a computer readable storage medium, which can accurately measure the volume of a three-dimensional irregular object.
Fig. 1 is a flow chart of a method for measuring volume according to an embodiment of the present invention. Referring to fig. 1, the volume measurement method provided by the embodiment of the invention includes the following steps:
step S110, a first original point cloud of a target to be detected is obtained.
It is understood that the object to be measured may be a regular solid or an irregular solid, and the first original point cloud of the object to be measured may be captured by the 3D camera.
Referring to FIG. 4, in some embodiments, the information format of the point cloud data is (x, y, z, B, G, R), where (x, y, z) represents three-dimensional spatial coordinate information; (B, G, R) represents BGR color model information, B is a blue channel value (Blue), G is a Green channel value (Green), and R is a Red channel value (Red). It should be noted that, in the above embodiment, according to actual requirements, BGR color model information (b, g, r) in the information format may be converted into channel values corresponding to other color models.
Illustratively, BGR color model information (B, G, R) is converted into YUV color model information (Y, U, V), where Y represents brightness (luminence or Luma), i.e., gray scale values, and U and V represent chromaticity (chromance or Chroma).
Illustratively, BGR color model information (B, G, R) is converted into HSV color model information (H, S, V), where H represents Hue (Hue), S represents saturation (saturation), and V represents brightness (Va l ue).
It should be appreciated that the conversion manners of the BGR color model and the YUV, HSV color model are known to those skilled in the art, and will not be described herein.
Step S120, dividing the first original point cloud to obtain a first target point cloud and a first reference plane point cloud.
In some embodiments, the first target point cloud is a second target point cloud, the first target reference Ping Miandian cloud is a second target reference Ping Miandian cloud, the first original point cloud is segmented to obtain a first target point cloud and a first reference plane point cloud, including:
dividing the first original point cloud according to the space coordinate information to obtain an area point cloud comprising the target to be detected and the peripheral area of the target to be detected;
and dividing the regional point cloud according to a color space model to obtain a second target point cloud and a second reference Ping Miandian cloud, wherein the second target point cloud is point cloud data of the target to be detected, and the second reference Ping Miandian cloud is point cloud data of a background plane of the target to be detected.
And dividing the first original point cloud by using the space coordinate information to obtain an area point cloud comprising the area around the target to be detected and the target to be detected, and accurately dividing the area point cloud according to the difference of parameters in the color space model to obtain point cloud data of the target to be detected and point cloud data of a background plane of the target to be detected, namely extracting a second target point cloud and a second reference Ping Miandian cloud.
It can be appreciated that before the segmentation based on the color model, the regional point cloud including the target to be detected and the peripheral region of the target to be detected may be initially segmented according to the spatial coordinate information, and then the regional point cloud is segmented according to the color model to obtain the second target point cloud and the second reference Ping Miandian cloud, so as to reduce the calculation amount when the point cloud data is segmented according to the color model.
It is understood that the color space model includes BGR color model, YUV color model, HSV color model, and the like.
Illustratively, based on the BGR color model, the point cloud data of the first original point cloud is expressed as (x, y, z, B, G, R), and the threshold values of the blue channel, the green channel, and the red channel are set to distinguish the point cloud data of the object to be measured and the background plane.
Illustratively, based on the YUV color model, the point cloud data of the first original point cloud is expressed as (x, Y, z, Y, U, V), and the point cloud data of the object to be measured and the background plane are distinguished by setting threshold values of brightness and chromaticity.
Illustratively, based on the HSV color model, the point cloud data of the first original point cloud is expressed as (x, y, z, H, S, V), and the point cloud data of the object to be measured and the background plane are distinguished by setting threshold values of hue, saturation and brightness.
It can be understood that the above-mentioned segmentation of the first original point cloud according to the difference of the parameters in the three color models cannot be understood as a limitation on the color model applied in the embodiment of the present invention, and the applied color model only needs to be able to distinguish the point cloud data of the object to be measured and the background plane. The threshold value may be set according to the actual application, and is not limited herein.
In some embodiments, the first target point cloud is a third target point cloud, the first target reference Ping Miandian cloud is a third target reference Ping Miandian cloud, the first original point cloud is segmented to obtain a first target point cloud and a first reference plane point cloud, including:
and dividing the first original point cloud according to the space coordinate information to obtain a third target point cloud and a third reference plane point cloud, wherein the third target point cloud is point cloud data of the target to be detected and a peripheral area of the target to be detected, and a plane of the third reference plane point cloud is parallel to a background plane of the target to be detected.
And dividing the first original point cloud according to the difference of parameters in the space coordinate information, and extracting a third target point cloud and a third reference plane point cloud. The third target point cloud is the point cloud data of the target to be detected and the surrounding area of the target to be detected; the plane of the third reference plane point cloud is parallel to the background plane of the target to be detected.
Step S130, fitting the first reference plane point cloud to obtain a first target reference plane.
It will be appreciated that for a spatial plane, the plane equation can be expressed as ax+by+cz+d=0, and for a point cloud spatial plane of 3D structured light collection, c+.0, the plane equation can be expressed as: z=ax+by+c.
Referring to fig. 5, fig. 5 is a schematic diagram of XOZ plane projection of a first target point cloud (omitting an internal point cloud) provided by the embodiment of the present invention, where the first reference plane point cloud is point cloud data of a background plane of the target to be measured, and the first reference plane is fitted to obtain the background plane of the target to be measured, that is, obtain the first target reference plane, where a plane equation may be expressed as z=ax+by+c.
For example, referring to fig. 6, fig. 6 is a schematic diagram of XOZ plane projection of a first target point cloud (omitting an internal point cloud) provided by the embodiment of the present invention, where a plane where the first reference plane point cloud is located is parallel to a background plane of a target to be measured, and by fitting the first reference plane, a first target reference plane parallel to the background plane of the target to be measured is obtained.
It should be appreciated that the method of fitting a plane from discrete points is known to those skilled in the art and will not be described in detail herein.
Step S140, determining a relative height of each point in the first target point cloud relative to a background plane of the target to be measured according to the first target reference plane.
And for each point in the first target point cloud, referring to a first target reference plane, and calculating the height of each point relative to the background plane of the target to be measured.
In some embodiments, step S140 in a volume measurement method provided in the embodiments of the present invention includes:
determining a Z-direction projection point of each point in the first target point cloud on the first target reference plane;
and determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the Z-direction projection points.
Referring to fig. 5, fig. 5 is a schematic diagram of XOZ plane projection of a first target point cloud (omitting an internal point cloud) according to an embodiment of the present invention, and as shown in fig. 5, a first target reference plane is parallel to an XOY plane of a spatial coordinate system, where the first target reference plane is a background plane of a target to be measured, and a plane equation of the first target reference plane is z=ax+by+c.
Illustratively, a point A (x i ,y i ,z i ) Z-projection point A' (x) to first target reference plane α i ,y i ,ax i +by i +c), determining the relative height H of the point a, i.e. the height H of the point a relative to the background plane of the object to be measured, based on the coordinate information of the projection point a', h=ax i +by i +c-z i
In some embodiments, step S140 in a volume measurement method provided in the embodiments of the present invention includes:
acquiring a parallel interval between the first target reference plane and a background plane of the target to be detected;
determining a Z-direction projection point of each point in the first target point cloud on the first target reference plane;
and determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the Z-direction projection points and the parallel distance.
Referring to fig. 6, fig. 6 is a schematic diagram of XOZ plane projection of a first target point cloud (omitting an internal point cloud) according to an embodiment of the present invention, as shown in fig. 6, a first target reference plane is parallel to a background plane of a target to be measured, and an included angle between a plane normal n of the first target reference plane and a Z axis is θ, where a plane equation of the first target reference plane is z=ax+by+c.
Illustratively, the parallel spacing Δh between the first target reference plane and the background plane of the object to be measured is determined from the plane equation of the first target reference plane, and the point B (x i ,y i ,z i ) Z-projection point B' (x) to a first target reference plane i ,y i ,ax i +by i +c), determining the distance from the point B to the projected point B 'based on the coordinate information of the point B and the projected point B': ax (ax) i +by i +c-z i Thus, the relative height H of the point B, i.e. the height H of the point H relative to the background plane of the object to be measured, is determined from the parallel distance Δh between the first object reference plane and the background plane of the object to be measured, h=Δh/cos θ - (ax) i +by i +c-z i )。
And step S150, determining the voxel number of the object to be detected according to the relative heights of all points.
It should be appreciated that a voxel, i.e., a volumetric pixel, is the smallest unit of digital data in three-dimensional space division, and is a pixel of 3D space.
And accumulating the relative heights of all points in the first target point cloud to obtain the voxel number of the target to be detected.
And step S160, obtaining the volume of the target to be measured according to the pre-calibrated voxel equivalent and the voxel number of the target to be measured.
It should be appreciated that, referring to FIG. 4, voxel equivalent V e The actual volume size represented by 1 unit voxel in the actual space is expressed in cubic centimeters or cubic millimeters, etc.
It will be appreciated that the voxel volume (i.e. voxel equivalent) is V by way of a voxel integration method e If the number of the divided microelements (i.e. the voxel sum) is N, the volume V=V of the object to be measured e ×N。
In some embodiments, referring to fig. 2, the voxel equivalent according to embodiments of the present invention is obtained by:
step 210: a second original point cloud of calibration blocks of known volume is acquired.
Step 220: and dividing the second original point cloud to obtain a fourth target point cloud and a fourth reference plane point cloud.
Step 230: and fitting the fourth reference plane point cloud to obtain a fourth target reference plane.
Step 240: and calculating the relative height of each point in the fourth target point cloud relative to the background plane of the calibration block according to the fourth target reference plane.
Step 250: the number of voxels of the calibration block is determined based on the relative heights of all points.
It should be appreciated that the specific implementation of steps S210 to S250 can be referred to the previous descriptions of steps S110 to S150, and will not be repeated here.
Step 260: and obtaining the voxel equivalent according to the voxel number and the volume of the calibration block.
The number of voxels is calculated using a calibration block of known volume and the volume divided by the number of voxels is calculated to obtain the voxel equivalent under the same operating conditions. It should be understood that the same working condition refers to the same working condition as when the first original point cloud of the target to be measured is obtained, where the working condition includes an electronic device capturing the point cloud and a relative position of the electronic device and the target to be measured.
In some embodiments, referring to fig. 3, the voxel equivalent according to embodiments of the present invention may also be obtained by:
step S310: a two-dimensional image of a calibrated scale of known length is acquired.
A two-dimensional image of a length L of the scale is acquired.
Step S320: obtaining pixel equivalent according to the two-dimensional image and the length of the calibration ruler;
it can be understood that the pixel value N of the calibration ruler is obtained by acquiring the initial pixel point and the final pixel point of the calibration ruler in the two-dimensional image, and the pixel equivalent L is calculated e =L/N。
Step S330: and obtaining the voxel equivalent according to the Z-axis equivalent and the pixel equivalent which are calibrated in advance.
It can be appreciated that the factory parameters of the electronic device capturing the third original point cloud are obtained, including the Z-axis equivalent K thereof. From the Z-axis equivalent K and the pixel equivalent L e Obtaining voxel equivalent V under the same working condition e =K×L e . It should be understood that the same working condition refers to the same working condition as when the first original point cloud of the target to be measured is obtained, where the working condition includes an electronic device capturing the point cloud and a relative position of the electronic device and the target to be measured.
The volume measurement method provided by the embodiment of the invention is described below through specific embodiments.
In a specific embodiment, the volume measurement method provided by the invention is used for measuring the volume of the target to be measured, and the specific process is as follows:
acquiring a two-dimensional image of a calibration ruler with the length L, acquiring a pixel value N of the calibration ruler from the two-dimensional image, and acquiring a pixel equivalent L according to the pixel value N and the length L of the calibration ruler e ,L e =l/N. Obtaining voxel equivalent V according to factory parameters of shooting equipment, including Z-axis equivalent K thereof e =K×L e
And acquiring an original point cloud of the target to be detected, and extracting and dividing the original point cloud into a target point cloud and a background point cloud according to BGR color model information. And fitting the background point cloud to obtain a target background plane, wherein the space plane equation is z=ax+by+c. The coordinates of the point in the target point cloud are (x i ,y i ,z i ) The projection in the object background plane is (x i ,y i ,ax i +by i +c), determining the height H, h=ax of each point in the target point cloud relative to the target background plane i +by i +c-z i The relative height H of each point is accumulated to obtain the number N of pixels, and the volume V=V of the object to be measured is calculated e ×N。
In another embodiment, the volume measurement method provided by the invention is used for measuring the volume of the target to be measured, and the specific process is as follows:
the method comprises the steps of obtaining an original point cloud PointCloud00 of a calibration block with a volume V, dividing the original point cloud PointCloud00 according to space coordinate information to obtain an area point cloud PointCloud01 containing the calibration block and an area around the calibration block, dividing the area point cloud into a target point cloud PointCloud03 and a background point cloud PointCloud04 through a color model, fitting the background point cloud PointCloud04 to obtain a target background plane, wherein a space plane equation is z=ax+by+c. The coordinates of the midpoint of the target point cloud PointCloud03 are (x i ,y i ,z i ) The projection in the object background plane is (x i ,y i ,ax i +by i +c), determining the height H, h=ax of each point in the target point cloud PointCloud03 relative to the target background plane i +by i +c-z i The relative height H of each point is accumulated to obtain the number N of voxels, and the equivalent V of the voxels is calculated e =V/N。
Acquiring an original point cloud PointCloud10 of a target to be detected, dividing the original point cloud PointCloud10 according to space coordinate information and space coordinate information to obtain a reference Ping Miandian cloud PointCloud11 parallel to a background plane of the target to be detected, fitting the reference Ping Miandian cloud PointCloud11 to obtain a target reference plane, wherein a space plane equation of the target reference plane is z=a 1 x+b 1 y+c 1 The included angle between the normal line of the plane and the Z axis is theta. Dividing the original point cloud PointCloud10 according to the space coordinate information to obtain an area point cloud PointCloud12 of the object to be measured and the peripheral area of the object to be measured, wherein the coordinates of the midpoint of the area point cloud PointCloud12 are (x) i ,y i ,z i ) The projection in the object background plane is (x i ,y i ,a 1 x i +b 1 y i +c 1 ) Determining the height H of each point in the regional point cloud PointCloud12 relative to the target background plane, h=Δh/cos θ - (a) 1 x i +b 1 y i +c 1 -z i ) The relative height H of each point is accumulated to obtain the number N of pixels, and the volume V=V of the object to be measured is calculated e ×N。
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the details or descriptions of some embodiments may be referred to in the description of other embodiments.
According to the embodiment of the invention, the original point cloud of the target to be detected is obtained, the original point cloud is segmented to obtain a first target point cloud and a first reference plane point cloud which comprise the target to be detected, the first reference plane point cloud is fitted to obtain a first target reference plane, the relative height of each point in the first target point cloud relative to the background plane of the target to be detected is determined according to the first target reference plane, the voxel number of the target to be detected is further obtained, and the volume of the target to be detected is obtained according to the voxel equivalent calibrated in advance and the voxel number of the target to be detected. According to the embodiment of the invention, the object volume can be accurately measured under the condition of stereo irregularity through the pre-calibrated voxel equivalent and the voxel number of the object to be measured.
Referring to fig. 7, fig. 7 is a schematic diagram of a volumetric measuring device 100 according to an embodiment of the present invention. As shown in fig. 7, the volume measuring device 100 includes:
a measurement module 110, configured to obtain a first origin cloud of a target to be measured;
the segmentation module 120 is configured to segment the first original point cloud to obtain a first target point cloud and a first reference plane point cloud;
a fitting module 130, configured to fit the first reference plane point cloud to obtain a first target reference plane;
a first processing module 140, configured to determine, according to the first target reference plane, a relative height of each point in the first target point cloud with respect to a background plane of the target to be measured;
a second processing module 150, configured to determine the number of voxels of the object to be measured according to the relative heights of all points;
and the third processing module 160 is configured to obtain the volume of the target to be measured according to the pre-calibrated voxel equivalent and the number of voxels of the target to be measured.
It should be noted that, because the content of information interaction and execution process between the modules is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and details are not repeated herein.
Fig. 8 shows an electronic device 200 according to an embodiment of the invention. As shown in fig. 8, the electronic device 200 includes, but is not limited to:
a memory 210 for storing a program;
the processor 220 is configured to execute the program stored in the memory 210, and when the processor 220 executes the program stored in the memory 210, the processor 220 is configured to perform the above-described volume measurement method.
The processor 220 and the memory 210 may be connected by a bus or other means.
The memory 210 acts as a non-transitory computer readable storage medium storing a non-transitory software program and a non-transitory computer executable program, such as the volumetric measurement methods described in any of the embodiments of the invention. The processor 220 implements the volume measurement method described above by running non-transitory software programs and instructions stored in the memory 210.
Memory 210 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data for performing the volume measurement method described above. In addition, memory 210 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 210 may optionally include memory located remotely from processor 220, which may be connected to processor 220 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement the above-described volumetric measurement method are stored in the memory 210 and when executed by the one or more processors 220, perform the volumetric measurement method provided by any embodiment of the invention.
The embodiment of the invention also provides a storage medium which stores computer executable instructions for executing the volume measurement method.
In one embodiment, the storage medium stores computer-executable instructions that are executed by one or more control processors, e.g., by one or more processors in the electronic device, to cause the one or more processors to perform the method of volumetric measurement provided by any of the embodiments of the invention.
The embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and may include any information delivery media.
The preferred embodiments of the present invention have been described in detail, but the present invention is not limited to the above embodiments, and those skilled in the art will appreciate that the present invention may be practiced without departing from the spirit of the present invention. Various equivalent modifications and substitutions may be made in the shared context, and are intended to be included within the scope of the present invention as defined in the following claims.

Claims (10)

1. A method of volumetric measurement, the method comprising:
acquiring a first original point cloud of a target to be detected;
dividing the first original point cloud to obtain a first target point cloud and a first reference plane point cloud;
fitting the first reference plane point cloud to obtain a first target reference plane;
determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the first target reference plane;
determining the voxel number of the target to be detected according to the relative heights of all points;
and obtaining the volume of the target to be measured according to the pre-calibrated voxel equivalent and the voxel number of the target to be measured.
2. The method of claim 1, wherein the first target point cloud is a second target point cloud, the first target reference Ping Miandian cloud is a second target reference Ping Miandian cloud, and the dividing the first initial point cloud to obtain a first target point cloud and a first reference plane point cloud comprises:
dividing the first original point cloud according to the space coordinate information to obtain an area point cloud comprising the target to be detected and the peripheral area of the target to be detected;
and dividing the regional point cloud according to a color space model to obtain a second target point cloud and a second reference Ping Miandian cloud, wherein the second target point cloud is point cloud data of the target to be detected, and the second reference Ping Miandian cloud is point cloud data of a background plane of the target to be detected.
3. The method according to claim 2, wherein determining the relative height of each point in the first target point cloud with respect to the background plane of the target to be measured according to the first target reference plane comprises:
determining a Z-direction projection point of each point in the first target point cloud on the first target reference plane;
and determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the Z-direction projection points.
4. The method of claim 1, wherein the first target point cloud is a third target point cloud, the first target reference Ping Miandian cloud is a third target reference Ping Miandian cloud, the dividing the first initial point cloud to obtain a first target point cloud and a first reference plane point cloud, comprising:
and dividing the first original point cloud according to the space coordinate information to obtain a third target point cloud and a third reference plane point cloud, wherein the third target point cloud is point cloud data of the target to be detected and a peripheral area of the target to be detected, and a plane of the third reference plane point cloud is parallel to a background plane of the target to be detected.
5. The method of claim 4, wherein determining the relative height of each point in the first target point cloud with respect to the background plane of the target under test from the first target reference plane comprises:
acquiring a parallel interval between the first target reference plane and a background plane of the target to be detected;
determining a Z-direction projection point of each point in the first target point cloud on the first target reference plane;
and determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the Z-direction projection points and the parallel distance.
6. The method of claim 1, wherein the voxel equivalent is obtained by:
acquiring a second original point cloud of the calibration block of known volume;
dividing the second original point cloud to obtain a fourth target point cloud and a fourth reference plane point cloud;
fitting the fourth reference plane point cloud to obtain a fourth target reference plane;
calculating the relative height of each point in the fourth target point cloud relative to the background plane of the calibration block according to the fourth target reference plane;
determining the voxel number of the calibration block according to the relative heights of all points;
and obtaining the voxel equivalent according to the voxel number and the volume of the calibration block.
7. The method of claim 1, wherein the voxel equivalent is obtained by:
acquiring a two-dimensional image of a calibration ruler with a known length;
obtaining pixel equivalent according to the two-dimensional image and the length of the calibration ruler;
and obtaining the voxel equivalent according to the Z-axis equivalent and the pixel equivalent which are calibrated in advance.
8. A volumetric measurement device, comprising:
the measuring module is used for acquiring a first original point cloud of the target to be measured;
the segmentation module is used for segmenting the first original point cloud to obtain a first target point cloud and a first reference plane point cloud;
the fitting module is used for fitting the first reference plane point cloud to obtain a first target reference plane;
the first processing module is used for determining the relative height of each point in the first target point cloud relative to the background plane of the target to be detected according to the first target reference plane;
the second processing module is used for determining the voxel number of the target to be detected according to the relative heights of all points;
and the third processing module is used for obtaining the volume of the target to be measured according to the pre-calibrated voxel equivalent and the voxel number of the target to be measured.
9. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which processor, when executing the computer program, implements the volume measurement method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored, which, when being executed by a processor, implements the volume measurement method according to any one of claims 1 to 7.
CN202111470266.9A 2021-12-03 2021-12-03 Volume measurement method and apparatus, and computer-readable storage medium Pending CN116228841A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111470266.9A CN116228841A (en) 2021-12-03 2021-12-03 Volume measurement method and apparatus, and computer-readable storage medium
PCT/CN2022/078895 WO2023097913A1 (en) 2021-12-03 2022-03-02 Volume measurement method and apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111470266.9A CN116228841A (en) 2021-12-03 2021-12-03 Volume measurement method and apparatus, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN116228841A true CN116228841A (en) 2023-06-06

Family

ID=86581093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111470266.9A Pending CN116228841A (en) 2021-12-03 2021-12-03 Volume measurement method and apparatus, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN116228841A (en)
WO (1) WO2023097913A1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110095062B (en) * 2019-04-17 2021-01-05 北京华捷艾米科技有限公司 Object volume parameter measuring method, device and equipment
CN112270702A (en) * 2020-11-12 2021-01-26 Oppo广东移动通信有限公司 Volume measurement method and device, computer readable medium and electronic equipment
CN112419505B (en) * 2020-12-07 2023-11-10 苏州工业园区测绘地理信息有限公司 Automatic extraction method for vehicle-mounted point cloud road shaft by combining semantic rules and model matching

Also Published As

Publication number Publication date
WO2023097913A1 (en) 2023-06-08

Similar Documents

Publication Publication Date Title
CN111246204B (en) Relative brightness deviation-based dirt detection method and device
US9007602B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and computer-readable medium storing control program
JP6363863B2 (en) Information processing apparatus and information processing method
EP2194725B1 (en) Method and apparatus for correcting a depth image
CN108683906B (en) Naked eye 3D display parameter testing method, device, equipment and medium
US20200134784A1 (en) Method, Electronic Device, and Storage Medium for Obtaining Depth Image
CN105069453A (en) Image correction method and apparatus
US11132802B2 (en) Method of detecting moving objects from a temporal sequence of images
CN110956603A (en) Method and device for detecting edge flying spot of depth image and electronic equipment
CN112378333B (en) Method and device for measuring warehoused goods
CN111724444B (en) Method, device and system for determining grabbing point of target object
CN114520894A (en) Projection area determining method and device, projection equipment and readable storage medium
CN116245937A (en) Method and device for predicting stacking height of goods stack, equipment and storage medium
CN113838003B (en) Image speckle detection method, apparatus, medium and computer program product
CN111382591A (en) Binocular camera ranging correction method and vehicle-mounted equipment
CN116228841A (en) Volume measurement method and apparatus, and computer-readable storage medium
CN116125489A (en) Indoor object three-dimensional detection method, computer equipment and storage medium
CN111322963A (en) Dynamic arrangement method for parts based on binocular image processing
CN109040724A (en) A kind of the hot spot Distortion Detect method, apparatus and readable storage medium storing program for executing of structured light projection device
CN116363192A (en) Volume measurement method and device for warehouse goods, computer equipment and storage medium
CN112037273A (en) Depth information acquisition method and device, readable storage medium and computer equipment
CN112734721A (en) Optical axis deflection angle detection method, device, equipment and medium
CN112040208A (en) Image processing method, image processing device, readable storage medium and computer equipment
CN111028264A (en) Rotation robust three-dimensional object detection optimization method and device
KR101617535B1 (en) Method for estimating foggy image based on transmission rate

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication