Volume measurement method of target object, electronic device and readable storage medium

By obtaining the projection depth map in the measurement of logistics packages and performing principal component analysis and edge trimming, the problem of large measurement error in the volume of irregularly shaped parts was solved, achieving more accurate volume calculation and reducing operating costs.

CN121353386BActive Publication Date: 2026-02-24ZHEJIANG HUARAY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511906903.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-02-24
Estimated Expiration
2045-12-17

AI Technical Summary

Technical Problem

Existing laser triangulation methods have significant errors when measuring irregularly shaped items, leading to inaccurate volume measurements of logistics packages and impacting operating costs.

Method used

By acquiring the projection depth maps of the target object in different directions, principal component analysis is performed to determine the shape type, and the irregular shape is trimmed to obtain accurate volume data.

Benefits of technology

It improves the accuracy of volume measurement, reduces errors in volume-based billing in the logistics industry, and enhances practicality and market compliance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121353386B_ABST
    Figure CN121353386B_ABST
Patent Text Reader

Abstract

The application discloses a volume measurement method of a target object, an electronic device and a readable storage medium. The application obtains a projection depth map of the target object in different directions, the projection depth map comprising a pixel point representing the target object; performs principal component analysis on each projection depth map to obtain a first target bounding box in each direction; determines a shape type of the target object according to the projection depth map in each direction and the first target bounding box in each direction; and in response to the shape type of the target object being a special-shaped body type, performs edge cutting processing according to the projection depth map in each direction to obtain volume data of the target object. Thus, the accuracy of the volume data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of logistics automation technology, and in particular to a method for measuring the volume of a target object, an electronic device, and a readable storage medium. Background Technology

[0002] With the increasing convenience of the internet, consumers can purchase goods without leaving home. These online purchases require logistics transportation, leading to the rapid growth of the logistics industry. The logistics industry typically charges shipping fees based on the volume of the parcel. Inaccurate volume measurement results in lost operating costs. Therefore, accurately measuring the volume of shipping parcels is of great importance in the logistics field.

[0003] Current methods for dynamically measuring package volume typically rely on laser triangulation to acquire package data and extract the volume of the smallest outer cube. However, for irregularly shaped items, this laser-based method calculates volume by using the most protruding point of the irregularity as the edge of the package, leading to significant errors. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a method for measuring the volume of a target object, an electronic device, and a readable storage medium, which can improve the accuracy of volume measurement.

[0005] To address the aforementioned technical problems, this application provides a method for measuring the volume of a target object, an electronic device, and a readable storage medium. The method includes: acquiring projection depth maps of the target object in different directions, the projection depth maps including pixels representing the target object; performing principal component analysis on each projection depth map to obtain a first target bounding box in each direction; determining the shape type of the target object based on the projection depth maps and the first target bounding boxes in each direction; and, in response to the target object's shape type being an irregular shape, performing edge trimming based on the projection depth maps in each direction to obtain the volume data of the target object.

[0006] In one embodiment, the step of determining the shape type of the target object based on the projection depth map in each direction and the first target bounding box in each direction includes: determining the area ratio corresponding to each direction based on the imaging area of ​​the projection depth map in each direction and the area of ​​the first target bounding box in the corresponding direction; and determining the shape type of the target object based on the area ratio corresponding to each direction and multiple preset thresholds.

[0007] In one embodiment, the step of performing principal component analysis on each projection depth map to obtain a first target bounding box in each direction includes: filling holes in the projection depth map to obtain a filled projection depth map; performing feature extraction on the imaging pixels in the filled projection depth map to obtain multiple feature vectors; performing projection processing on each imaging pixel based on the multiple feature vectors to obtain multiple target projection values; and constructing the first target bounding box based on the multiple target projection values.

[0008] In one embodiment, the projection depth maps in each direction include a projection depth map in a first direction and a projection depth map in a second direction, wherein the first direction is perpendicular to the second direction. The step of performing edge trimming processing based on the projection depth maps in each direction to obtain the volume data of the target object includes: performing bounding box construction processing based on the projection depth map in the first direction to obtain a second target bounding box; performing bounding box construction processing based on the projection depth map in the second direction to obtain a third target bounding box; and determining the volume data of the target object based on the size information of the second target bounding box and the size information of the third target bounding box.

[0009] In one embodiment, the step of constructing a bounding box based on the projection depth map in the first direction to obtain a second target bounding box includes: binarizing the projection depth map in the first direction to obtain an initial binary image; performing morphological processing on the initial binary image to obtain a target binary image; determining a target contour line based on the target binary image and the initial binary image; and performing pixel-point iterative search processing based on the bounding rectangle of the target contour line to obtain a second target bounding box that satisfies the iteration stopping condition.

[0010] In one embodiment, after the step of performing edge trimming processing based on the projection depth maps in each direction to obtain the volume data of the target object, the method further includes: adjusting the acquired initial scale based on the volume data of the target object to obtain a target scale; and performing drawing processing on the volume data of the target object based on the target scale to obtain a multi-dimensional image of the target object.

[0011] In one embodiment, the step of obtaining the projection depth map of the target object in different directions includes: collecting point cloud data of the target object from multiple shooting directions to obtain multiple initial point cloud data of the target object; performing spatiotemporal synchronous stitching processing on the multiple initial point cloud data to obtain target point cloud data of the target object; and performing projection processing on the target point cloud data from multiple projection directions to obtain the projection depth map of the target object in different directions.

[0012] In one embodiment, the step of performing spatiotemporal synchronous stitching processing on the plurality of initial point cloud data to obtain target point cloud data of the target object includes: performing coordinate system one processing on the plurality of initial point cloud data to obtain each initial point cloud data under a preset coordinate system; performing evolutionary merging processing on each initial point cloud data under the preset coordinate system to obtain merged initial point cloud data; and performing preprocessing on the merged initial point cloud data to obtain the target point cloud data.

[0013] To address the aforementioned technical problems, this application provides an electronic device, including a memory and a processor. The memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the aforementioned method for measuring the volume of a target object.

[0014] To address the aforementioned technical problems, this application provides a computer-readable storage medium, comprising: storing program data, which, when executed by a processor, is used to implement the aforementioned method for measuring the volume of a target object.

[0015] The above scheme obtains the first target bounding box in each direction by performing principal component analysis on the projected depth maps of the target object in different directions; it then determines the shape type of the target object based on the projected depth maps and the first target bounding boxes in each direction; in response to the target object's shape type being an irregular shape, it performs edge trimming based on the projected depth maps in each direction to obtain the target object's volume data. Therefore, when the target object's shape type is an irregular shape, edge trimming based on the projected depth maps in each direction can remove invalid corner interference, improving the accuracy of the volume data. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:

[0017] Figure 1 This is a schematic flowchart of an exemplary embodiment of the method for measuring the volume of a target object shown in this application;

[0018] Figure 2 This is a schematic diagram of an exemplary embodiment of the camera layout position shown in this application;

[0019] Figure 3 This is a schematic diagram of an exemplary embodiment of the dual-view illustration shown in this application;

[0020] Figure 4This is a schematic diagram of an exemplary embodiment of the traceable form shown in this application;

[0021] Figure 5 This is a block diagram illustrating a volume measuring device for a target object, as shown in an exemplary embodiment of this application.

[0022] Figure 6 This is a block diagram illustrating a volume measuring device for a target object, as shown in yet another exemplary embodiment of this application.

[0023] Figure 7 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application;

[0024] Figure 8 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] First, it's important to note that with the increasing convenience of the internet, consumers can purchase goods without leaving home. These online purchases require logistics transportation, leading to the booming logistics industry. The logistics industry typically charges shipping fees based on the volume of the package. Inaccurate volume measurement results in lost operating costs. Therefore, accurate volume measurement of logistics packages is crucial in the logistics field. Current volume measurement methods usually employ laser technology to extract the volume of the smallest outer cube of the package. However, for irregularly shaped items, this laser technology method calculates the volume by using the most protruding point of the irregularity as the edge of the package, leading to significant errors.

[0027] Based on this, this application provides a method for measuring the volume of a target object, an electronic device, and a computer-readable storage medium. For details, please refer to [reference needed]. Figure 1 , Figure 1 This is a schematic flowchart of an exemplary embodiment of a method for measuring the volume of a target object as shown in this application.

[0028] The execution entity of a method for measuring the volume of a target object can be a terminal device, a server, or other processing device. The terminal device can be a computer, mobile device, terminal, computing device, vehicle-mounted device, etc. The execution entity of the method for measuring the volume of a target object can also be a volume measuring device for the target object. In some possible implementations, the method for measuring the volume of the target object can be implemented by a processor calling computer-readable instructions stored in memory. The execution entity of the method for measuring the volume of the target object can also be a big data cluster. A big data cluster is a computer system architecture formed by multiple computers connected through a network. The big data cluster can be deployed on a private cloud built using K8S (Kubernetes, a container orchestration engine).

[0029] Specifically, a method for measuring the volume of a target object according to this embodiment includes the following steps:

[0030] Step S110: Obtain the projection depth map of the target object in different directions. The projection depth map includes pixels representing the target object.

[0031] The target object refers to the object whose volume is to be measured. The target object can be a package, such as a broom, clothes, or shoes.

[0032] A projection depth map is a 2.5-dimensional image that records the distance information of each pixel.

[0033] The volume measurement device for the target object acquires projected depth maps of the target object in different directions. Specifically, the volume measurement device uses a depth camera to photograph the target object from different directions to obtain projected depth maps of the target object in different directions.

[0034] Step S120: Perform principal component analysis on each projection depth map to obtain the first target bounding box in each direction.

[0035] The first target bounding box is a ball or box that substitutes for the target object.

[0036] The target object volume measuring device performs principal component analysis on each projected depth map to obtain the first target bounding box in each direction. Specifically, the target object volume measuring device performs principal component analysis on the pixels in each projected depth map to obtain multiple principal components; selects the target principal components whose proportion is greater than a preset ratio from the multiple principal components; projects the pixels in each projected depth map onto the coordinate system formed by the target principal components, and calculates the maximum and minimum values ​​of each axis in the coordinate system; connects the maximum and minimum values ​​of each axis to obtain the side lengths of the first target bounding box, and connects the side lengths to form the first target bounding box.

[0037] Step S130: Determine the shape type of the target object based on the projection depth map in each direction and the first target bounding box in each direction.

[0038] Shape type refers to the classification of an object's shape. Shape types can include irregular shapes and standard shapes. Irregular shapes refer to objects with irregular shapes and complex, unique outlines, such as bananas, shoes, and vases. Standard shapes refer to objects with regular shapes, such as cubes, spheres, and cuboids.

[0039] The target object volume measuring device determines the shape type of the target object based on the projection depth maps in each direction and the first target bounding boxes in each direction. Specifically, the target object volume measuring device counts the first number of effective pixels in each projection depth map and the second number of pixels in each first target bounding box; it obtains the difference between the second number in each direction and the first number in the corresponding direction; if any difference is greater than a preset pixel threshold, the shape type of the target object is determined to be an irregular shape, otherwise it is a standard shape.

[0040] Step S140: In response to the target object's shape type being an irregular shape, edge trimming is performed based on the projection depth maps in each direction to obtain the target object's volume data.

[0041] Volume data refers to data that characterizes the space occupied by a target object. Volume data can include length, width, and height, and can also include volume values.

[0042] The volume measurement device for the target object performs edge trimming processing based on the projected depth maps in each direction to obtain the volume data of the target object. Specifically, the volume measurement device for the target object constructs bounding boxes based on the projected depth maps in each direction to obtain the first target bounding boxes corresponding to each direction. The first target bounding boxes corresponding to each direction include the first target bounding boxes in the top view direction and the left view direction. Taking the center of each first target bounding box as the search starting point, the pixel points within each bounding box are clustered to obtain the cluster boundaries. The length and width of the cluster boundaries of the first target bounding boxes corresponding to the top view direction are used as the length and width of the target object. The width of the cluster boundaries of the first target bounding boxes in the left view direction is used as the height of the target object.

[0043] As can be seen, by performing principal component analysis on the projected depth maps of the target object in different directions, the first target bounding box in each direction is obtained. Based on the projected depth maps and the first target bounding boxes in each direction, the shape type of the target object is determined. In response to the target object's shape type being an irregular shape, edge trimming is performed based on the projected depth maps in each direction to obtain the target object's volume data. Therefore, when the target object's shape type is an irregular shape, edge trimming based on the projected depth maps in each direction can remove invalid corner interference, improve the accuracy of volume data, and increase the actual proportion of volume-based billing for target objects in the logistics industry, thus better meeting the real demands of the market and improving practicality.

[0044] The steps of acquiring projection depth maps of the target object in different directions using a volume measurement device for the target object include: collecting point cloud data of the target object from multiple shooting directions to obtain multiple initial point cloud data of the target object; performing spatiotemporal synchronous stitching processing on the multiple initial point cloud data to obtain target point cloud data of the target object; and performing projection processing on the target point cloud data from multiple projection directions to obtain projection depth maps of the target object in different directions.

[0045] Initial point cloud data refers to the point cloud data of a portion of the target object.

[0046] A volume measurement device for a target object acquires point cloud data from multiple shooting directions, obtaining multiple initial point cloud data sets of the target object. As one example, the volume measurement device uses multiple 3D (Three-Dimensional) cameras to capture images of the target object from multiple shooting directions, obtaining multiple initial point cloud data sets. As another example, the volume measurement device simultaneously triggers multiple 3D cameras to capture images of the target object from multiple shooting directions, obtaining multiple initial point cloud data sets. The point clouds in the same frame of the multiple initial point cloud data sets are captured at the same time. Simultaneous triggering can be achieved by setting the same trigger time or by external simultaneous hard triggering. Therefore, simultaneous triggering can achieve frame synchronization of the initial point cloud data, which is beneficial for improving accuracy when stitching point cloud data. Compared to capturing the target object from a top-down angle with only one camera, this application uses at least two cameras to capture the target object from all directions, obtaining the complete length, width, and height of the target object, which is beneficial for improving the accuracy of volume data.

[0047] Combination Figure 2As shown, the target object is placed on the belt plane, and two dual-line laser 3D cameras are symmetrically arranged on the left and right sides of the target object at an angle above it to ensure that the field of view of the two dual-line laser 3D cameras can completely cover the target object; the target object is synchronously acquired by the two dual-line laser 3D cameras to obtain multiple initial point cloud data of the target object.

[0048] In one embodiment, the target object volume measuring device takes pictures of the package on the belt using cameras on the left and right sides to obtain first initial point cloud data in the left direction and second initial point cloud data in the right direction; the origin of the coordinate system where each initial point cloud data is located is located on the belt measuring plane, the Y-axis is parallel to the direction of movement, the X-axis is perpendicular to the direction of movement, and the Z-axis is perpendicular to the belt surface.

[0049] Target point cloud data refers to the point cloud data of the complete area of ​​the target object.

[0050] The target object volume measurement device performs spatiotemporal synchronous stitching processing on multiple initial point cloud data to obtain target point cloud data of the target object. As an example, the multiple initial point cloud data include first initial point cloud data from a first shooting direction and second initial point cloud data from a second shooting direction. The target object volume measurement device uses the first initial point cloud data as a reference; the product term between a first preset mapping relationship matrix and the second initial point cloud data is determined as the second initial point cloud data after coordinate system transformation; the first initial point cloud data and the second initial point cloud data after coordinate system transformation at the same time are merged to obtain merged initial point cloud data; duplicate and redundant point cloud data are removed from the merged initial point cloud data to obtain the target point cloud data. The first preset mapping relationship matrix is ​​a coordinate mapping matrix between the coordinate system of the first initial point cloud data and the coordinate system of the second initial point cloud data.

[0051] In one embodiment, the volume measuring device for the target object uses a standard box of known size as a calibration object. Cameras on both the left and right sides capture images of the standard box on the conveyor belt, obtaining point cloud data of the standard box in two directions. The origin of the coordinate system containing each point cloud data is located on the conveyor belt measurement plane, with the Y-axis parallel to the direction of movement, the X-axis perpendicular to the direction of movement, and the Z-axis perpendicular to the conveyor belt surface, but the coordinate systems do not completely coincide. The volume measuring device uses the standard box of known size as a calibration object and calculates the relative transformation relationship between the two coordinate systems based on the point cloud data of the standard box, obtaining a candidate preset mapping relationship matrix. The device then maps the point cloud data of the standard box according to the candidate preset mapping relationship matrix, obtaining point cloud data in the same coordinate system. Based on the point cloud data in the same coordinate system, the device calculates the size of the standard box, obtaining the calculated size. The candidate preset mapping relationship matrix is ​​optimized with the minimum error between the calculated size and the standard size as the first constraint condition and the parallelism of all planes of the standard box as the second constraint condition, resulting in a first preset mapping relationship matrix.

[0052] As another example, the steps of spatiotemporally synchronizing and stitching multiple initial point cloud data to obtain target point cloud data of the target object include: performing coordinate system unification processing on multiple initial point cloud data to obtain each initial point cloud data in a preset coordinate system; performing evolutionary merging processing on each initial point cloud data in the preset coordinate system to obtain merged initial point cloud data; and performing preprocessing on the merged initial point cloud data to obtain target point cloud data.

[0053] The target object volume measuring device performs coordinate system processing on multiple initial point cloud data to obtain each initial point cloud data in a preset coordinate system. Specifically, the target object volume measuring device determines each initial point cloud data in the preset coordinate system as the product term between each initial point cloud data and the corresponding second preset mapping relationship matrix; the second preset mapping relationship matrix is ​​the coordinate mapping matrix between the coordinate system where each initial point cloud data is located and the preset coordinate system.

[0054] The target object volume measurement device evolves and merges the initial point cloud data under a preset coordinate system to obtain merged initial point cloud data. Specifically, the target object volume measurement device collects the initial point cloud data under the preset coordinate system at the same time, removes duplicate point clouds, and obtains merged initial point cloud data.

[0055] The target object volume measurement device also includes: stitching together initial point cloud data in a preset coordinate system at the same time, using the dimensions and planar parallelism of a standard box as stitching constraints, to obtain merged initial point cloud data. Thus, by stitching together initial point cloud data in a preset coordinate system, full surface coverage of the target object is achieved. Optimizing the stitching by applying constraints improves stitching accuracy, reducing the overlap error to less than 1mm.

[0056] The target object volume measurement device preprocesses the merged initial point cloud data to obtain the target point cloud data. Specifically, the target object volume measurement device performs noise filtering and geometric boundary smoothing on the merged initial point cloud data to obtain the target point cloud data.

[0057] The volume measurement device for the target object projects the target point cloud data from multiple projection directions to obtain projected depth maps of the target object in different directions. The volume measurement device for the target object is set up with an orthogonal projection coordinate system; the target point cloud data is projected onto a two-dimensional plane along each axis of the orthogonal projection coordinate system, and depth values ​​are determined based on the two-dimensional plane to obtain projected depth maps of the target object in different directions.

[0058] In one embodiment, the volume measuring device for the target object establishes an orthogonal projection coordinate system based on the horizontal plane corresponding to the minimum Z-coordinate value of the point cloud data in the target point cloud data; the target point cloud data... Orthogonally project the image onto a two-dimensional plane along the negative Z-axis; construct a regular grid matrix in the two-dimensional plane, calculate the depth value of each grid cell in the regular grid matrix, and obtain the projected depth map in the top-view direction.

[0059] Specifically, a resolution-adaptive regular mesh matrix G is constructed, where the mesh cell size satisfies the following formula:

[0060] In the above formula, Characterizing the size of the grid cells in a regular grid matrix, Characterizes the preset scaling factor. Characterizes the average density of point clouds.

[0061] The depth value satisfies the following formula:

[0062] In the above formula, Characterization Grid cells The depth value, z min The z-coordinate represents the global minimum value, Cell(i,j) represents the set of points within the grid cell, and z k The Z-coordinate of the k-th point cloud, x k The x-coordinate and y-coordinate of the k-th point cloud are represented by...k The Y-coordinate represents the k-th point cloud.

[0063] In another embodiment, the volume measuring device for the target object establishes an orthogonal projection coordinate system based on the horizontal plane corresponding to the minimum Y-coordinate value and / or the minimum X-coordinate value of the point cloud data in the target point cloud data; orthogonally projects the target point cloud data along the negative Y-axis direction onto a two-dimensional plane in the coordinate system established based on the minimum Y-coordinate value; and / or orthogonally projects the target point cloud data along the negative X-axis direction onto a two-dimensional plane in the coordinate system established based on the minimum Y-coordinate value; constructs a regular grid matrix in the two-dimensional plane, calculates the depth value of each grid cell in the regular grid matrix, and obtains a projection depth map along the side view direction along the Y-axis and / or a projection depth map along the side view direction along the X-axis.

[0064] It can be seen that by merging the initial point cloud data under the preset coordinate system, the point cloud data of the complete surface of the target object is obtained, achieving full surface coverage. By performing noise filtering and geometric boundary smoothing on the merged initial point cloud data, invalid point clouds are eliminated, thus improving the quality of the point cloud data.

[0065] The steps of the target object volume measurement device performing principal component analysis on each projection depth map to obtain the first target bounding box in each direction include: filling the holes in the projection depth map to obtain a filled projection depth map; performing feature extraction on the imaging pixels in the filled projection depth map to obtain multiple feature vectors; performing projection processing on each imaging pixel based on the multiple feature vectors to obtain multiple target projection values; and constructing the first target bounding box based on the multiple target projection values.

[0066] The volume measurement device for the target object fills the holes in the projection depth map to obtain a filled projection depth map. Specifically, the volume measurement device for the target object identifies non-imaging pixels in the projection depth map, groups these non-imaging pixels into holes, performs a morphological closing operation on the holes, and obtains each filled projection depth map. The non-imaging pixels can be invalid pixels, i.e., pixels with a NaN value.

[0067] In one embodiment, the volume measuring device of the target object traverses each projection depth map, identifies pixels with a nan value in the projection depth map, and obtains multiple invalid pixels; each invalid pixel constitutes a hole region H, and a morphological closing operation is performed on the hole region H to obtain each filled projection depth map. The morphological closing operation is an operation used to fill small holes inside an object, connect adjacent objects, and smooth their boundaries, while essentially maintaining the original object area unchanged; it will not be elaborated further here.

[0068] The target object volume measurement device performs feature extraction processing on the imaging pixels in the filled projection depth map to obtain multiple feature vectors. Specifically, the target object volume measurement device constructs a covariance matrix based on the imaging pixels in the filled projection depth map; it then performs eigenvalue decomposition on the covariance matrix to obtain multiple eigenvalues ​​and their corresponding feature vectors.

[0069] Imaging pixels refer to effective pixels. Specifically, the target object volume measuring device determines the pixels in the filled projection depth map that are greater than a preset pixel threshold as imaging pixels, or determines the pixels whose pixel values ​​contain a preset flag bit as imaging pixels.

[0070] In one embodiment, each imaging pixel constitutes a two-dimensional point set. The covariance matrix C is obtained by calculating the covariance of a two-dimensional point set using a preset covariance calculation formula; then, eigenvalue decomposition is performed on the covariance matrix C to obtain the eigenvalues. and and its corresponding eigenvectors and .in, .

[0071] The target object volume measurement device projects each imaging pixel based on multiple feature vectors to obtain multiple target projection values. Specifically, a feature plane is constructed based on the directions of the multiple feature vectors; each imaging pixel is projected onto the feature plane to obtain multiple projection points; the maximum and minimum values ​​on each axis are selected from the coordinate values ​​of the multiple projection points to obtain multiple target projection values.

[0072] The multiple target projection values ​​include the maximum and minimum values ​​on the first projection axis, and the maximum and minimum values ​​on the second projection axis.

[0073] In one embodiment, the volume measuring device of the target object will use feature vectors and The direction of the feature plane is used as the first and second projection axes to obtain the feature plane; the two-dimensional point set S is projected onto the feature plane to obtain the coordinates of multiple projection points.

[0074] The first and second projection axes are the U-axis and V-axis, respectively, and the coordinates of the projection points are ( , The following formula is satisfied:

[0075] The target projection value satisfies the following formula:

[0076] In the above formula, Represents the minimum value on the U-axis. Represents the maximum value on the U-axis. Represents the maximum value on the V-axis. It represents the minimum value on the V-axis.

[0077] The target object volume measuring device constructs a first target bounding box based on multiple target projection values. Specifically, the target object volume measuring device uses the difference between the maximum and minimum values ​​on the projection axis as the side length of the first target bounding box, and connects the side lengths to obtain a two-dimensional image of the first target bounding box on the feature plane.

[0078] The pixel area of ​​the first target bounding box satisfies the following formula:

[0079] In the above formula, S1 represents the pixel area of ​​the first target bounding box.

[0080] It can be seen that by filling the holes in the projection depth map, some internal voids caused by missing point clouds can be filled, improving the integrity of the image. Simultaneously, multiple target projection values ​​are obtained by projecting each imaging pixel using multiple feature vectors; then, a first target bounding box is constructed based on these multiple target projection values, thus obtaining the minimum bounding box.

[0081] The step of determining the shape type of the target object based on the projection depth map in each direction and the first target bounding box in each direction includes: determining the area ratio corresponding to each direction based on the imaging area of ​​the projection depth map in each direction and the area of ​​the first target bounding box in the corresponding direction; and determining the shape type of the target object based on the area ratio corresponding to each direction and multiple preset thresholds.

[0082] The imaging area refers to the area formed by the imaging pixels in the projection depth map. Specifically, the target object volume measuring device traverses each projection depth map, counts the total number of imaging pixels in the projection depth map, and obtains the imaging area of ​​the projection depth map.

[0083] The area of ​​the first target bounding box refers to the pixel area or surface area of ​​the first target bounding box. As an example, the target object volume measuring device traverses each first target bounding box and calculates the pixel area based on the side length of each first target bounding box to obtain the area of ​​the first target bounding box. As another example, the target object volume measuring device traverses each first target bounding box and counts the number of pixels in each first target bounding box on the feature plane to obtain the area of ​​the first target bounding box.

[0084] The target object volume measuring device determines the area ratio for each direction based on the area of ​​the imaging region of the projection depth map in each direction and the area of ​​the first target bounding box in the corresponding direction. Specifically, the target object volume measuring device obtains the ratio between the area of ​​the imaging region in the top-view direction and the area of ​​the first target bounding box in the top-view direction to obtain the area ratio in the top-view direction; it also obtains the ratio between the area of ​​the imaging region in the side-view direction and the area of ​​the first target bounding box in the side-view direction to obtain the area ratio in the side-view direction.

[0085] Multiple preset thresholds include a first area threshold and a second area threshold. The first area threshold can be 0.92, and the second area threshold can be 0.85.

[0086] The volume measuring device for the target object determines the shape type of the target object based on the area ratios corresponding to each direction and multiple preset thresholds. Specifically, if the area ratio in the top view direction is greater than a first area threshold and the area ratio in the side view direction is greater than a second area threshold, the volume measuring device determines the shape type of the target object to be a standard body type; if the area ratio in the top view direction is less than or equal to the first area threshold, the target object is determined to be an irregular body type; and if the area ratio in the side view direction is less than or equal to the second area threshold, the target object is determined to be an irregular body type.

[0087] The projection depth maps in each direction include projection depth maps in a first direction and projection depth maps in a second direction, with the first direction perpendicular to the second direction. The step of the target object volume measuring device performing edge trimming processing based on the projection depth maps in each direction to obtain the target object's volume data includes: constructing a bounding box based on the projection depth map in the first direction to obtain a second target bounding box; constructing a bounding box based on the projection depth map in the second direction to obtain a third target bounding box; and determining the target object's volume data based on the size information of the second and third target bounding boxes.

[0088] The first direction is the top-view direction, i.e., the direction of projection along the Z-axis. The second direction is the side-view direction, which can be the direction of projection along the X-axis, or it can be the positive or negative projection along the X-axis.

[0089] The step of the target object volume measuring device performing bounding box construction processing based on the projection depth map in the first direction to obtain the second target bounding box includes: performing binarization processing on the projection depth map in the first direction to obtain an initial binary image; performing morphological processing on the initial binary image to obtain a target binary image; determining the target contour line based on the target binary image and the initial binary image; and performing pixel iterative search processing based on the bounding rectangle of the target contour line to obtain the second target bounding box that satisfies the iteration stopping condition.

[0090] The volume measuring device for the target object performs binarization processing on the projected depth map in the first direction to obtain an initial binary image. Specifically, the volume measuring device for the target object uses pixels with depth values ​​greater than a preset depth threshold in the projected depth map as first pixels and pixels with depth values ​​less than or equal to the preset depth threshold as second pixels to obtain an initial binary image. The first pixel can be a pixel with a pixel value of 225, and the second pixel can be a pixel with a pixel value of 0.

[0091] The target object volume measurement device performs morphological processing on the initial binary image to obtain the target binary image. Specifically, the target object volume measurement device determines the type of structural element based on the ratio between the length and width of the imaging region in the initial binary image; determines the size of the structural element based on the geometric dimensions of the imaging region in the initial binary image; and performs morphological operations based on the sliding of the structural element in the initial binary image to obtain the target binary image.

[0092] Morphological processing can be performed using either morphological opening operations or a combination of closing and opening operations. Opening operations involve erosion followed by dilation. For example, the erosion process aligns the anchor points of the structuring element with every pixel in the initial binary image; if all positions in the structuring element that are 1 correspond to white pixels (i.e., 255) in the initial binary image, then the output pixel at the anchor point remains white; otherwise, the output pixel at the anchor point is set to black. The dilation process aligns the anchor points of the structuring element with every pixel in the initial binary image; if at least one position in the structuring element is 1, and its corresponding pixel in the initial binary image is white, then the output pixel at the anchor point is white; otherwise, the output pixel remains black.

[0093] In one embodiment, when the ratio r between the length and width of the imaging region in the initial binary image is greater than r_th, a linear structuring element is used, where r_th represents the structuring element threshold. For example, if r_th = 3.0: in the horizontal direction, when W > H, a horizontal linear structuring element S_h is used; in the vertical direction, when H > W, a vertical linear structuring element S_v is used; and when r ≤ r_th, a circular structuring element S_c is used. Here, W represents the width, and H represents the height.

[0094] The target object volume measuring device determines the size of the structural element based on the geometric dimensions of the imaging region in the initial binary image. Specifically, the geometric dimensions of the imaging region in the initial binary image are reduced by a first preset factor to obtain the size of the structural element.

[0095] The volume measuring device for the target object determines the target contour line based on the target binary image and the initial binary image. Specifically, the volume measuring device for the target object uses the difference between the target binary image and the initial binary image as the outer contour line point sequence; connects the outer contour line point sequence to form the initial contour line; and smooths the positions in the initial contour line where the curvature is greater than a preset curvature threshold to obtain the target contour line.

[0096] In one embodiment, the volume measuring device for the target object uses a preset curvature calculation formula to calculate the curvature of each point in the initial contour line to obtain the curvature at each position; points with curvature greater than a preset curvature threshold are smoothed to obtain the target contour line. The smoothing method can be a moving average method, a Gaussian filtering method, or a spline smoothing method, etc.

[0097] The volume measuring device for the target object performs pixel-level iterative search processing based on the bounding rectangle of the target contour line to obtain a second target bounding box that meets the iteration stopping condition. Specifically, the volume measuring device for the target object uses the smallest bounding rectangle of the target contour line as the first initial bounding box, obtains the cross-axis of symmetry in the first initial bounding box, and iteratively searches the boundary along the cross-axis of symmetry to obtain the iterative bounding box formed by the iterative boundary; if the ratio between the area of ​​the iterative bounding box and the area of ​​the first initial bounding box is greater than a first preset bounding box area threshold, then the iterative bounding box is determined as the second target bounding box.

[0098] The volume measuring device of the target object obtains the cross-shaped axis of symmetry in the first initial bounding box. Specifically, the volume measuring device of the target object determines the geometric center based on the minimum and maximum X-axis values, minimum and maximum Y-axis values ​​in the first initial bounding box, takes the axis passing through the geometric center and parallel to the long side of the first initial bounding box as the principal axis of the cross-shaped axis of symmetry, and takes the axis passing through the geometric center and parallel to the short side of the first initial bounding box as the secondary axis of the cross-shaped axis of symmetry.

[0099] In one embodiment, the geometric center of the first initial bounding box Satisfy the following formula:

[0100] In the above formula, This represents the minimum value of the first initial bounding box on the X-axis. This represents the maximum value of the first initial bounding box on the X-axis. This represents the minimum value of the first initial bounding box on the Y-axis. It represents the maximum value of the first initial bounding box on the Y-axis.

[0101] The volume measuring device of the target object iteratively searches the boundary along the cross-symmetry axis to obtain the iterative bounding box formed by the iterative boundary. Specifically, the volume measuring device of the target object determines the search step size and search range of each axis according to the size of the first initial bounding box, and searches from each axis direction within the corresponding search range according to the search step size of each axis to obtain the iterative boundary.

[0102] In one embodiment, the search range and search step size in the principal axis direction satisfy the following formula:

[0103]

[0104]

[0105] In the above formula, The search range characterizing the principal axis. Characterizing the first proportionality coefficient, Characterizing the second proportionality coefficient, Characterizes the width of the first initial bounding box. Characterizing the height of the first initial bounding box, The search step size characterizes the main axis.

[0106] The search range and search step size in the secondary axis direction satisfy the following formula:

[0107]

[0108]

[0109] In the above formula, Characterizes the search range of the secondary axis. The search step size characterizes the secondary axis.

[0110] The objective function is the optimal area ratio between the area of ​​the iterative bounding box and the area of ​​the first initial bounding box. Satisfy the following formula:

[0111] In the above formula, Characterizes the area of ​​the iterative bounding box , Characterizes the area of ​​the initial iteration bounding box. The first preset bounding box area threshold is used to characterize the area of ​​the bounding box, which can be 0.98. The area of ​​each bounding box can be the image area enclosed by the effective contour within the bounding box, or it can be the number of effective pixels.

[0112] It can be seen that morphological processing of the initial binary image can remove large protrusions and interference, such as strips, bulges, and adhesive tape, thus improving image quality. Simultaneously, smoothing the initial contour lines can eliminate burrs or corners, improving the noise interference of the contour lines.

[0113] The target object volume measuring device performs bounding box construction processing based on the projected depth map in the second direction to obtain a third target bounding box. Specifically, the target object volume measuring device binarizes the projected depth map in the second direction to obtain an initial binary image in the second direction; performs morphological processing on the initial binary image in the second direction to obtain a target binary image in the second direction; determines the target contour line in the second direction based on the target binary image in the second direction and the initial binary image in the second direction; and performs pixel-point iterative search processing based on the bounding rectangle of the target contour line in the second direction to obtain a third target bounding box that satisfies the iteration stopping condition.

[0114] The target object volume measuring device performs binarization processing on the projected depth map in the second direction to obtain an initial binary image in the second direction. Specifically, the target object volume measuring device uses pixels with depth values ​​greater than a preset depth threshold in the projected depth map in the second direction as third pixels and pixels with depth values ​​less than or equal to the preset depth threshold as fourth pixels to obtain an initial binary image in the second direction.

[0115] The target object volume measuring device performs morphological processing on the initial binary image in the second direction to obtain a target binary image in the second direction. Specifically, the target object volume measuring device determines the type of structural element based on the ratio between the length and width of the imaging region in the initial binary image in the second direction; determines the size of the structural element based on the geometric dimensions of the imaging region in the initial binary image in the second direction; and performs morphological operations based on the sliding of the structural element in the initial binary image in the second direction to obtain the target binary image in the second direction.

[0116] The target object volume measuring device determines the target contour line in the second direction based on the target binary image in the second direction and the initial binary image in the second direction. Specifically, the target object volume measuring device uses the difference between the target binary image in the second direction and the initial binary image in the second direction as the external contour line point sequence in the second direction; connects the external contour line point sequence in the second direction to form the initial contour line in the second direction; and smooths the positions in the initial contour line in the second direction where the curvature is greater than a preset curvature threshold to obtain the target contour line in the second direction.

[0117] The target object volume measuring device performs pixel-point iterative search processing based on the bounding rectangle of the target contour line in the second direction to obtain a third target bounding box that meets the iteration stopping condition. Specifically, the target object volume measuring device uses the smallest bounding rectangle of the target contour line in the second direction as the second initial bounding box, obtains the straight line with the highest point of the target contour line in the second direction on the X-axis as the initial height line, and iteratively adjusts the initial height line along the Y-axis to obtain the iterated height line; if the ratio between the area of ​​the bounding box formed by the iterated height line and the area of ​​the second initial bounding box is greater than a second preset bounding box area threshold, then the bounding box formed by the iterated height line and the width before iteration is determined as the third target bounding box. The second preset bounding box area threshold can be 0.98.

[0118] The target object volume measuring device determines the search range and search step size during the iterative adjustment of the initial height line based on the height of the second initial bounding box. Specifically, the target object volume measuring device determines the iterative search range as the product term between the height of the second initial bounding box and the third scaling factor, and determines the search step size as the maximum value between the product term between the height of the second initial bounding box and the fourth scaling factor, and the preset search step size. The preset search step size can be 1.

[0119] The dimensional information includes width and height. The target object volume measuring device determines the target object's volume data based on the dimensional information of the second and third target bounding boxes. As an example, the volume data includes length, width, and height. The target object volume measuring device enlarges the width of the second target bounding box according to a preset scale to obtain the target object's length, enlarges the height of the second target bounding box according to a preset scale to obtain the target object's width, and enlarges the height of the second target bounding box according to a preset scale to obtain the target object's height. As another example, the volume data is simply volume. The target object volume measuring device enlarges the width of the second target bounding box according to a preset scale to obtain the target object's length, enlarges the height of the second target bounding box according to a preset scale to obtain the target object's width, and enlarges the height of the second target bounding box according to a preset scale to obtain the target object's height; the volume of the target object is then calculated using a volume calculation formula based on the target object's length, width, and height.

[0120] After the step of obtaining the volume data of the target object by performing edge trimming processing based on the projection depth map in each direction, the method further includes: adjusting the acquired initial scale based on the volume data of the target object to obtain a target scale; and drawing the volume data of the target object based on the target scale to obtain a multi-dimensional image of the target object.

[0121] The initial scale refers to the ratio between the actual size of an object and the image size. The volume measurement device for the target object determines the initial scale based on the projection spacing of the projection depth map. For example, an initial scale of 1 pixel:5 mm means that 1 pixel represents a real physical size of 5 mm.

[0122] The target object volume measuring device adjusts the acquired initial scale based on the target object's volume data to obtain a target scale. Specifically, in response to the target object's volume being greater than a first preset volume threshold, the device reduces the initial scale by a second preset factor to obtain the target scale; in response to the target object's volume being less than or equal to the first preset volume threshold but greater than the second preset volume threshold, the initial scale is determined as the target scale; in response to the target object's volume being less than or equal to the second preset volume threshold, the initial scale is increased by a third preset factor to obtain the target scale. Thus, by adjusting the scale, target objects of different sizes are laid out consistently in the view, improving the user experience and interpretation efficiency.

[0123] For example, if the initial scale is 1 pixel: 5 mm, and the target object's volume is larger than a first preset volume threshold, then the target object is a large item. The initial scale is then reduced by a second preset factor, resulting in a target scale of 1 pixel: 1 mm. If the target object's volume is less than or equal to the first preset volume threshold but greater than the second preset volume threshold, then the target object is a medium-sized item. The initial scale is then set as the target scale, resulting in a target scale of 1 pixel: 5 mm. If the target object's volume is less than or equal to the second preset volume threshold, then the target object is a small item. The initial scale is then increased by a third preset factor, resulting in a target scale of 1 pixel: 10 mm.

[0124] The volume measuring device of the target object processes the volume data of the target object according to the target scale to obtain a multi-dimensional image of the target object. Specifically, a top view of the target object is drawn based on its length and width, and a side view of the target object is drawn based on its length and height; the top view is compared with the projection depth map of the target object in the top view direction, and the side view is compared with the projection depth map of the target object in the side view direction; the maps are adjusted according to the target scale to obtain a multi-dimensional image of the target object.

[0125] In one embodiment, the target object volume measuring device determines the width and height of the top view based on a second target bounding box, and the height of the side view based on a third target bounding box. Using the projection spacing of the depth map as pixel precision, an initial scale is set, adjusted to obtain a target scale, and the top and side views of the target object are drawn based on the target scale. Combined with... Figure 3As shown, in the top view area of ​​the dual-view display page, the projected depth map in the top direction is compared and displayed with the top view of the target object, showing the actual dimensions of the target object as width: 49.1cm, length: 45.6cm, and a scale of 100:12.5000. In the side view area of ​​the dual-view display page, the projected depth map in the side direction is compared and displayed with the side view of the target object, showing the actual dimensions of the target object as height: 25.8cm, and a scale of 100:12.5000.

[0126] After determining the shape type of the target object based on the projection depth maps in each direction and the first target bounding box in each direction, the target object volume measuring device further includes: in response to the target object's shape type being a standard part type; determining the target object's volume data based on the width and height in the projection depth maps in each direction. Specifically, the product of the width and a fifth scaling factor in the top-view projection depth map is determined as the length of the target object, the product of the height and the fifth scaling factor is determined as the width of the target object, and the product of the height and the fifth scaling factor in the side-view projection depth map is determined as the height of the target object. The fifth scaling factor is the ratio between one pixel and the actual physical size.

[0127] The target object volume measurement device also includes: recording the target object's identification information, volume data, image data, and weight data; filling the target object's identification information, volume data, image data, and weight data into a preset information recording table template to obtain the target object's information recording table, and storing the target object's information recording table in the object database.

[0128] The identification information can include waybill numbers and barcodes. Volumetric data includes the object's length, width, and height, and may also include the object's volume. Important data includes the object's weight.

[0129] Image data can include panoramic images and dual views. Panoramic images can be forensic images or barcode images. Forensic images show the complete outline of the object, while barcode images include the object's identification information. Dual views include a comparison of the top-view projection depth map and the side-view projection depth map. Image data also includes the measurement time and location.

[0130] In one embodiment, the target object volume measuring device acquires the package's waybill number, barcode, length, width, height, volume, weight, panoramic image, measurement time, and measurement location, etc., generates an information record table for the package using the above information, and binds the panoramic image of the package with the dual views to obtain a traceable form. For example... Figure 4As shown, the traceability form includes a barcode image area, a side view area, an evidence collection image area, and a top view area. The traceability form is stored in the object database to achieve traceable storage of complete package information.

[0131] As can be seen, by generating an information record table and binding the panoramic image with the dual view, the measurement accuracy of the irregular part can be accurately viewed through the scale, and the cutting edge of the irregular part can also be viewed. At the same time, it supports real-time traceability of offline objects.

[0132] The target object volume measuring device also includes: acquiring the weight of the target object and determining the transportation cost based on the weight and / or volume of the target object. Specifically, the target object volume measuring device is connected to a PLC (Programmable Logic Controller) controller, which sends the volume data and weight of the target object to the PLC controller, triggering the PLC controller to calculate the weight and / or volume of the target object according to a pre-designed cost algorithm to obtain the transportation cost of the target object.

[0133] Figure 5 This is a block diagram illustrating a volume measuring device for a target object, as shown in an exemplary embodiment of this application. Figure 5 As shown, the exemplary target object volume measuring device 500 includes: an acquisition module 510, an analysis and processing module 520, a shape type determination module 530, and a cutting edge processing module 540. Specifically:

[0134] The acquisition module 510 is used to acquire the projection depth map of the target object in different directions, and the projection depth map includes the pixel points representing the target object.

[0135] The analysis and processing module 520 is used to perform principal component analysis on each projection depth map to obtain the first target bounding box in each direction.

[0136] The shape type determination module 530 is used to determine the shape type of the target object based on the projection depth map in each direction and the first target bounding box in each direction.

[0137] The edge-cutting module 540 is used to perform edge-cutting processing based on the projection depth map in each direction in response to the target object's shape type being an irregular body type, thereby obtaining the volume data of the target object.

[0138] In this exemplary target object volume measurement device, principal component analysis is performed on the projected depth maps of the target object in different directions to obtain first target bounding boxes in each direction. The shape type of the target object is determined based on the projected depth maps and the first target bounding boxes in each direction. In response to the target object being an irregular shape, edge trimming is performed based on the projected depth maps in each direction to obtain the target object's volume data. Therefore, when the target object is an irregular shape, edge trimming based on the projected depth maps in each direction can remove invalid corner interference, improving the accuracy of the volume data.

[0139] Figure 6 This is a block diagram illustrating a volume measuring device for a target object, as shown in another exemplary embodiment of this application. Figure 5 As shown, the exemplary target object volume measurement device 600 includes: an acquisition module 610, an analysis and processing module 620, a shape type determination module 630, a cutting edge processing module 640, and a visual form traceability model generation module 650. Specifically:

[0140] The acquisition module 610 is used to acquire the projection depth map of the target object in different directions, and the projection depth map includes the pixel points representing the target object.

[0141] The analysis and processing module 620 is used to perform principal component analysis on each projected depth map to obtain the first target bounding box in each direction.

[0142] The shape type determination module 630 is used to determine the shape type of the target object based on the projection depth map in each direction and the first target bounding box in each direction.

[0143] The edge-cutting module 640 is used to perform edge-cutting processing based on the projection depth map in each direction in response to the target object's shape type being an irregular shape, thereby obtaining the target object's volume data.

[0144] The visual form traceability model 650 is used to record the identification information, volume data, image data, and weight data of the target object; the identification information, volume data, image data, and weight data of the target object are filled into a preset information record table template to obtain the information record table of the target object; and a visual form is generated based on the information record table.

[0145] The functions of each module can be found in the embodiment of the target object volume measurement method, and will not be repeated here.

[0146] To achieve the volume measurement method for the target object in the above embodiments, this application proposes another electronic device, please refer to [link / reference needed]. Figure 7 , Figure 7This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application.

[0147] Electronic device 700 includes memory 701 and processor 702, wherein memory 701 and processor 702 are coupled together.

[0148] The memory 701 is used to store program data, and the processor 702 is used to execute the program data to implement the volume measurement method of the target object in the above embodiment.

[0149] In this embodiment, processor 702 can also be referred to as CPU (Central Processing Unit). Processor 702 may be an integrated circuit chip with signal processing capabilities. Processor 702 can also be a general-purpose processor, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor can be a microprocessor, or processor 702 can be any conventional processor.

[0150] This application also provides a computer-readable storage medium, such as Figure 8 As shown, the computer-readable storage medium 800 is used to store program data 801, which, when executed by a processor, is used to implement the volume measurement method of the target object as described in the method embodiments of this application.

[0151] The methods involved in the volume measurement method embodiments of the target object of this application, when implemented as software functional units and sold or used as independent products, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for measuring the volume of a target object, characterized in that, The method includes: Obtain projection depth maps of the target object in different directions, wherein the projection depth maps include pixels representing the target object; Principal component analysis is performed on each projection depth map to obtain the first target bounding box in each direction; The shape type of the target object is determined based on the projection depth map in each direction and the first target bounding box in each direction; In response to the target object being of an irregular shape, edge trimming is performed based on the projection depth map in each direction to obtain the volume data of the target object.

2. The method according to claim 1, characterized in that, The step of determining the shape type of the target object based on the projection depth map in each direction and the first target bounding box in each direction includes: The area ratio for each direction is determined by comparing the area of ​​the imaging region of the projection depth map in each direction with the area of ​​the first target bounding box in the corresponding direction. The shape type of the target object is determined based on the area ratios corresponding to each direction and multiple preset thresholds.

3. The method according to claim 1, characterized in that, The step of performing principal component analysis on each projected depth map to obtain the first target bounding box in each direction includes: The holes in the projection depth map are filled to obtain a filled projection depth map. The imaging pixels in the filled projection depth map are subjected to feature extraction processing to obtain multiple feature vectors; Based on the multiple feature vectors, projection processing is performed on each imaging pixel to obtain multiple target projection values; The first target bounding box is constructed based on the multiple target projection values.

4. The method according to claim 1, characterized in that, The projection depth maps in each direction include projection depth maps in a first direction and projection depth maps in a second direction, wherein the first direction is perpendicular to the second direction. The step of performing edge trimming based on the projection depth maps in each direction to obtain the volume data of the target object includes: The second target bounding box is obtained by constructing a bounding box based on the projection depth map in the first direction. The third target bounding box is obtained by constructing a bounding box based on the projection depth map in the second direction. The volume data of the target object is determined based on the size information of the second target bounding box and the size information of the third target bounding box.

5. The method according to claim 4, characterized in that, The step of constructing a bounding box based on the projection depth map in the first direction to obtain the second target bounding box includes: The projection depth map in the first direction is binarized to obtain an initial binary image; The initial binary image is subjected to morphological processing to obtain the target binary image; The target contour line is determined based on the target binary image and the initial binary image; Pixel-point iterative search is performed based on the bounding rectangle of the target contour to obtain a second target bounding box that meets the iteration stopping condition.

6. The method according to claim 1, characterized in that, After the step of performing edge trimming based on the projection depth maps in each direction to obtain the volume data of the target object, the method further includes: The initial scale is adjusted based on the volume data of the target object to obtain the target scale. The volume data of the target object is plotted according to the target scale to obtain a multi-dimensional image of the target object.

7. The method according to claim 1, characterized in that, The step of obtaining the projected depth map of the target object in different directions includes: Point cloud data of the target object is collected from multiple shooting directions to obtain multiple initial point cloud data of the target object; The multiple initial point cloud data are spatiotemporally synchronized and stitched together to obtain the target point cloud data of the target object. The target point cloud data is projected from multiple projection directions to obtain projection depth maps of the target object in different directions.

8. The method according to claim 7, characterized in that, The step of performing spatiotemporal synchronization stitching on the multiple initial point cloud data to obtain the target point cloud data of the target object includes: The coordinate system is processed on the multiple initial point cloud data to obtain each initial point cloud data in a preset coordinate system. The initial point cloud data under the preset coordinate system are evolved and merged to obtain the merged initial point cloud data. The initial point cloud data after merging is preprocessed to obtain the target point cloud data.

9. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to perform the method as claimed in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, include: The system stores program data, which, when executed by a processor, is used to implement the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Three-dimensional space building window detection and reconstruction method based on unmanned aerial vehicle (UAV) images

    CN107093205A

  • Method and device for obtaining volumes of target objects, terminal equipment and storage medium

    CN108416804A