A method, apparatus and device for volumetric measurement of a logistics item
By configuring position markers in plane images, identifying the top surface position of logistics parts, and performing edge detection processing, the problem of high hardware costs of depth cameras is solved, and high-precision volume calculation of logistics parts is achieved, which is suitable for automated operations in the logistics field.
Patent Information
- Application Number
- CN202011037261.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2040-09-28
AI Technical Summary
In the existing technology, depth imaging is used to identify the volume of logistics items, which requires the configuration of a depth camera. This leads to high hardware costs and limits the promotion of automated operations in the logistics field.
By configuring position markers in the plane image, identifying the top surface position of the logistics part, performing edge detection processing, and determining the three-dimensional data of the logistics part, the volume data is calculated, avoiding dependence on depth cameras.
It improves the recognition accuracy of edge contour data, reduces hardware costs, ensures the recognition accuracy of volume data, and is suitable for automated operations in the logistics field.
Smart Images

Figure CN114332194B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a field, and specifically to a volume measurement method, device and equipment for logistics parts. Background Art
[0002] In recent years, with the rapid development of related technologies such as machine vision, autonomous driving, and facial recognition, the application scenarios of depth cameras have become increasingly extensive, especially in the mobile application field. For example, in the logistics field, a personal digital assistant (PDA) equipped with a depth camera can be used to photograph logistics items and measure the volume of the logistics items based on the depth image. This can automatically detect the volume of logistics items in automated logistics operations.
[0003] Compared to traditional cameras, depth cameras (also known as depth cameras or 3D cameras) can detect the distance between each point in the field of view and the camera. In other words, they can detect the depth of field of the shooting space. This makes it easier to restore the real scene and implement applications such as scene modeling. Depth cameras can use three methods: structured light, binocular vision, or time of flight (TOF).
[0004] During the research of existing related technologies, the inventors found that the use of depth images to realize volume detection of logistics parts means that it is necessary to configure depth cameras on shooting devices such as PDAs, which requires certain hardware costs. This leads to the volume detection solution of logistics parts based on depth images, which requires considerable hardware costs in the process of promotion and application. Summary of the Invention
[0005] The present application provides a method, device and equipment for measuring the volume of logistics parts, which are used to identify the volume data of logistics parts from planar images, thereby avoiding the hardware cost of depth cameras required for identifying the volume data of logistics parts through depth images in the prior art.
[0006] In a first aspect, the present application provides a method for measuring the volume of a logistics item, the method comprising:
[0007] Acquire an initial image of the logistics object, wherein the initial image is a planar image obtained by photographing the logistics object;
[0008] Identify the position mark of the initial image, wherein the position mark is used to identify the top surface position of the logistics object;
[0009] Based on the position mark, edge detection processing is performed in the initial image to determine the target edge contour data of the logistics part;
[0010] According to the target edge contour data, the three-dimensional data of the logistics part is determined, and the volume data of the logistics part is calculated based on the three-dimensional data.
[0011] In conjunction with the first aspect of the present application, in a first possible implementation of the first aspect of the present application, edge detection processing is performed in the initial image based on the position identifier to determine the target edge contour data of the logistics object, including:
[0012] Input the initial image into the edge detection model for edge detection processing to obtain the initial edge contour data of the logistics part, wherein the edge detection model is obtained by training the initial neural network model with different images marked with the logistics part contour;
[0013] Determining whether the upper top surface position indicated by the position marker corresponds to the upper region of the logistics part contour indicated by the initial edge contour data;
[0014] If so, the initial edge contour data is determined to be the target edge contour data.
[0015] In combination with the first possible implementation of the first aspect of the present application, in a second possible implementation of the first aspect of the present application, determining the initial edge contour data as the target edge contour data includes:
[0016] determining the number of initial vertices present in the initial edge profile data;
[0017] If the number of the initial vertices is not six, the initial vertices are corrected to correct the number of the initial vertices to six;
[0018] The corrected initial edge contour data is determined as target edge contour data.
[0019] In combination with the second possible implementation of the first aspect of the present application, in a third possible implementation of the first aspect of the present application, if the number of initial vertices is not six, correcting the initial vertices to correct the number of initial vertices to six includes:
[0020] If the number of the initial vertices is greater than six, redundant points in the initial vertices are identified and deleted based on the preset geometric feature data of the logistics part, so as to correct the number of the initial vertices to six;
[0021] Alternatively, if the number of initial vertices is less than six, skeletonization is performed on the initial edge contour data to obtain skeleton data;
[0022] Perform straight line fitting on the points in the skeleton data to obtain multiple straight lines. When the number of straight lines is less than six, continue fitting based on the distance between the edge points and the straight lines until the straight lines can form a polygon and the number reaches six, thereby correcting the number of initial vertices to six.
[0023] In conjunction with the first aspect of the present application, in a fourth possible implementation of the first aspect of the present application, determining whether the upper top surface position identified by the position identifier corresponds to the upper area of the logistics part contour indicated by the initial edge contour data includes:
[0024] Extracting the position of the position marker in the initial image as the upper top surface position identified by the position marker;
[0025] Determining whether the location is in the upper area of the logistics part contour indicated by the initial edge contour data;
[0026] If so, the upper top surface position identified by the position marker is determined to correspond to the upper area of the logistics part contour indicated by the initial edge contour data.
[0027] In conjunction with the first aspect of the present application, in a fifth possible implementation of the first aspect of the present application, determining the three-dimensional data of the logistics object according to the target edge contour data includes:
[0028] Get the actual size data corresponding to the position marker;
[0029] Determine the coordinate transformation relationship between the pixel coordinate system and the world coordinate system based on the real size data and the pixel coordinate data of the position marker in the initial image;
[0030] Based on the coordinate transformation relationship, the target edge contour data is converted into three-dimensional data.
[0031] In conjunction with the first aspect of the present application, in a sixth possible implementation of the first aspect of the present application, after obtaining the volume data of the logistics item by calculating the three-dimensional data, the method further includes:
[0032] Generate sorting strategies, transportation strategies or logistics quotations for logistics parts based on volume data.
[0033] In a second aspect, the present application provides a volume measurement device for a logistics item, the device comprising:
[0034] A transceiver unit, configured to obtain an initial image of the logistics object, wherein the initial image is a planar image obtained by photographing the logistics object;
[0035] A processing unit is used to identify the position identifier of the initial image, wherein the position identifier is used to identify the upper surface position of the logistics part; based on the position identifier, edge detection processing is performed in the initial image to determine the target edge contour data of the logistics part; based on the target edge contour data, the three-dimensional data of the logistics part is determined, and the volume data of the logistics part is calculated based on the three-dimensional data.
[0036] In conjunction with the second aspect of the present application, in a first possible implementation manner of the second aspect of the present application, the processing unit is specifically configured to:
[0037] Input the initial image into the edge detection model for edge detection processing to obtain the initial edge contour data of the logistics part, wherein the edge detection model is obtained by training the initial neural network model with different images marked with the logistics part contour;
[0038] Determining whether the upper top surface position indicated by the position marker corresponds to the upper region of the logistics part contour indicated by the initial edge contour data;
[0039] If so, the initial edge contour data is determined to be the target edge contour data.
[0040] In conjunction with the first possible implementation of the second aspect of the present application, in a second possible implementation of the second aspect of the present application, the processing unit is specifically configured to:
[0041] determining the number of initial vertices present in the initial edge profile data;
[0042] If the number of the initial vertices is not six, the initial vertices are corrected to correct the number of the initial vertices to six;
[0043] The corrected initial edge contour data is determined as target edge contour data.
[0044] In conjunction with the second possible implementation of the second aspect of the present application, in a third possible implementation of the second aspect of the present application, the processing unit is specifically configured to:
[0045] If the number of the initial vertices is greater than six, redundant points in the initial vertices are identified and deleted based on the preset geometric feature data of the logistics part, so as to correct the number of the initial vertices to six;
[0046] Alternatively, if the number of initial vertices is less than six, skeletonization is performed on the initial edge contour data to obtain skeleton data;
[0047] Perform straight line fitting on the points in the skeleton data to obtain multiple straight lines. When the number of straight lines is less than six, continue fitting based on the distance between the edge points and the straight lines until the straight lines can form a polygon and the number reaches six, thereby correcting the number of initial vertices to six.
[0048] In conjunction with the second aspect of the present application, in a fourth possible implementation of the second aspect of the present application, the judgment processing unit is specifically configured to:
[0049] Extracting the position of the position marker in the initial image as the upper top surface position identified by the position marker;
[0050] Determining whether the location is in the upper area of the logistics part contour indicated by the initial edge contour data;
[0051] If so, the upper top surface position identified by the position marker is determined to correspond to the upper area of the logistics part contour indicated by the initial edge contour data.
[0052] In conjunction with the second aspect of the present application, in a fifth possible implementation of the second aspect of the present application, the processing unit is specifically configured to:
[0053] Get the actual size data corresponding to the position marker;
[0054] Determine the coordinate transformation relationship between the pixel coordinate system and the world coordinate system based on the real size data and the pixel coordinate data of the position marker in the initial image;
[0055] Based on the coordinate transformation relationship, the target edge contour data is converted into three-dimensional data.
[0056] In conjunction with the second aspect of the present application, in a sixth possible implementation of the second aspect of the present application, the processing unit is further configured to:
[0057] Generate sorting strategies, transportation strategies or logistics quotations for logistics parts based on volume data.
[0058] In the third aspect, the present application also provides a volume measurement device for logistics parts, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, it executes the method in the first aspect of the present application or any implementation method of the first aspect.
[0059] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the method in the first aspect of the present application or any implementation of the first aspect.
[0060] From the above content, it can be concluded that this application has the following beneficial effects:
[0061] The scheme is configured with a position mark to identify the upper top surface position of the logistics piece, so as to assist in identifying and segmenting the edge contour data of the logistics piece in the planar image of the logistics piece by means of the position mark, determining the three-dimensional data of the logistics piece based on the edge contour data, and calculating the volume data of the logistics piece according to the three-dimensional data. In this process, the depth information is not involved, so the depth camera does not need to be configured for the shooting device. Moreover, the configuration of the position mark also greatly improves the accuracy of edge recognition of the edge contour data, and thus the accuracy of the volume data calculated based on the edge contour data is improved. Therefore, not only the hardware cost of the depth camera required for identifying the volume data of the logistics piece by means of the depth image in the prior art can be effectively avoided, but also the recognition accuracy of the volume data is guaranteed, which is helpful for practical application and popularization. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 It is a scene schematic diagram of the volume measurement method of the logistics piece of the present application.
[0063] Figure 2 It is a flow schematic diagram of the volume measurement method of the logistics piece of the present application.
[0064] Figure 3 It is a flow schematic diagram of the edge detection process of the present application.
[0065] Figure 4 It is a flow schematic diagram of the present application for determining whether the position mark corresponds to the upper region.
[0066] Figure 5 It is a flow schematic diagram of the present application for determining the edge contour data.
[0067] Figure 6 It is a flow schematic diagram of the present application for the correction process.
[0068] Figure 7 It is a scene schematic diagram of the normal edge contour of the present application.
[0069] Figure 8 It is a flow schematic diagram of the present application for determining the three-dimensional data.
[0070] Figure 9 It is a scene schematic diagram of the present application for obtaining the coordinate conversion relationship.
[0071] Figure 10 It is a structural schematic diagram of the volume measurement device of the logistics piece of the present application.
[0072] Figure 11 It is a structural schematic diagram of the volume measurement device of the logistics piece of the present application. DETAILED DESCRIPTION
[0073] First of all, before introducing this application, let me first introduce the relevant content of this application regarding the application background.
[0074] The volume measurement method, device and computer-readable storage medium for logistics parts provided in this application can be applied to volume measurement equipment for logistics parts to identify the volume data of logistics parts from plane images, thereby avoiding the hardware cost of the depth camera required for identifying the volume data of logistics parts through depth images in the existing technology.
[0075] The volume measurement method of logistics parts mentioned in this application can be executed by a volume measurement device for logistics parts, or different types of volume measurement devices for logistics parts such as a server device, a physical host or a user equipment (UE) that integrates the device. Among them, the volume measurement device for logistics parts can be implemented in hardware or software, and the UE can specifically be a terminal device such as a smart phone, tablet computer, laptop computer, PDA, desktop computer or personal digital assistant (PDA).
[0076] like Figure 1 A schematic diagram of a scenario of the method for measuring the volume of a logistics piece of the present application from the perspective of the user interface. When measuring the volume of a logistics piece on-site through a PDA, the application (Application, APP) corresponding to the method for measuring the volume of the logistics piece of the present application can be started. In the APP, as shown in FIG. Figure 1 As shown in the preview interface, the user can view the current field of view of the PDA camera, adjust the shooting angle and press the shooting button to obtain the image of the logistics object captured by the current camera (corresponding to Figure 1 1-a user interface in the figure), the APP can trigger the volume measurement method of the logistics piece provided by this application to identify the position mark and determine the edge contour of the logistics piece based on the position mark (corresponding to Figure 1 1-b user interface in the figure), and then calculate and output the volume of the logistics part based on the edge contour (corresponding to Figure 1 1-c user interface in the ).
[0077] Of course, the volume measurement equipment for logistics parts can also be divided into multiple devices to jointly execute the volume measurement method for logistics parts provided in this application.
[0078] For example, the volume measurement equipment of the logistics parts may include a camera device for on-site collection, and the camera device may specifically be a UE device such as a PDA. After the camera device collects the image of the logistics parts, it is uploaded to the cloud server through the network. The cloud server identifies the location identifier according to the volume measurement method of the logistics parts provided in this application, and determines the edge contour of the logistics parts based on the location identifier, and then calculates the volume of the logistics parts based on the edge contour. The calculated volume can be sent to the on-site camera device to display the calculated volume to the user.
[0079] Among them, logistics pieces can specifically refer to express pieces, and the images of logistics pieces can be captured during logistics operations such as receipt, sorting, transportation, and delivery.
[0080] The above exemplifies the relevant application scenarios of the volume measurement method of the logistics items of the present application. Next, the processing flow of the volume measurement method of the logistics items of the present application will be introduced.
[0081] First, see Figure 2 , Figure 2 A flow chart of a method for measuring the volume of a logistic item in the present application is shown. In the present application, the method for measuring the volume of a logistic item may specifically include the following steps:
[0082] Step S201, obtaining an initial image of the logistics object, wherein the initial image is a planar image obtained by photographing the logistics object;
[0083] Step S202, identifying a position marker of the initial image, wherein the position marker is used to identify the top surface position of the logistics object;
[0084] Step S203: performing edge detection processing in the initial image based on the position identifier to determine target edge contour data of the logistics object;
[0085] Step S204 , determining the three-dimensional data of the logistics part according to the target edge contour data, and calculating the volume data of the logistics part according to the three-dimensional data.
[0086] from Figure 2It can be seen from the embodiments that, in the process of identifying the volume of the logistics piece through the picture, the position mark is configured for the logistics piece to identify the upper top surface position of the logistics piece, so as to assist in accurately identifying and segmenting the edge contour data of the logistics piece in the planar image of the logistics piece by means of the position mark, determining the three-dimensional data of the logistics piece based on the edge contour data, and calculating the volume data of the logistics piece according to the three-dimensional data. In this process, the depth information is not involved, so the depth camera does not need to be configured for the shooting device. Moreover, the configuration of the position mark greatly improves the accuracy of edge identification of the edge contour data, and thus the accuracy of the volume data calculated based on the edge contour data is improved. Therefore, not only the hardware cost of the depth camera required for identifying the volume data of the logistics piece through the depth image in the prior art can be effectively avoided, but also the identification accuracy of the volume data is guaranteed, which is helpful for practical application and popularization.
[0087] The following continues to be described Figure 2 The various steps of the embodiments and the specific implementation manners that can be used in practical application are described in detail.
[0088] In the present application, obtaining the initial image of the logistics piece can be understood as a shooting action of shooting the logistics piece in real time, for example, when the volume measurement method of the logistics piece is applied to the PDA in the hands of the on-site logistics staff, the logistics piece can be shot in real time and the corresponding volume can be obtained through the subsequent data processing process of the volume measurement method of the logistics piece. It can also be understood as a retrieval action of the image obtained after shooting the logistics piece, for example, the cloud server can receive or retrieve the image obtained by the on-site camera shooting device, and then obtain the corresponding volume through the subsequent data processing process of the volume measurement method of the logistics piece. After that, the calculated volume can be issued to the on-site.
[0089] The image obtained by shooting can be used as an initial image for volume identification through the volume measurement method of the logistics piece provided by the present application. For example, the initial image can be an original image obtained from the on-site shooting. Alternatively, after obtaining the original image obtained from the on-site shooting, image preprocessing such as image cropping, image scaling, image enhancement processing, etc. can be performed to meet the image requirements of the input image of the volume measurement method of the logistics piece provided by the present application, or the position mark can be configured.
[0090] For example, the volume measurement method of the logistics piece provided by the present application can be realized through artificial intelligence (AI), that is, through a related neural network. Therefore, the neural network can be configured with related image requirements of the input image, so that the image size, image quality, etc. of the input image can be uniformly and standardized processed, and the neural network identification and processing are facilitated.
[0091] Wherein, it can be understood that the initial image obtained by the present application is a planar image, or in other words, the initial image is a two-dimensional image, 2D image, and therefore can be obtained by a common 2D camera on the market, without additional hardware requirements or functional requirements for the camera compared to the depth camera (3D camera) required for shooting a depth image.
[0092] The initial image is configured with a position identifier for identifying the upper top surface position of the logistics piece in the image. The position identifier can be generated during the shooting process of the initial image or in the image processing process after the shooting process.
[0093] For example, the position identifier can exist in the form of image attribute information, such as a preset field in the image attribute information configured in the initial image, identifying the pixel range corresponding to the upper top surface position of the logistics piece.
[0094] Or, the position identifier can also exist in the form of an image, such as the direction indicated by an arrow image in the initial image, indicating the range of the upper top surface position of the logistics piece, so that the user can intuitively view the upper top surface identified by the position identifier on the UE such as a PDA, and for example, the position identifier can indicate the range of the upper top surface position of the logistics piece by the position of the position identifier in the initial image, in other words, the position of the position identifier is in the upper top surface position of the logistics piece, so that the user can intuitively view the upper top surface identified by the position identifier, and the data processing of the volume measuring device of the logistics piece is facilitated.
[0095] The position identifier can be generated by the user during the shooting process of the logistics piece, for example.
[0096] For example, a fixed position in the preview interface of the shooting can display a position identifier fixedly configured by historical experience or manually added by the user, and the direction indicated by the position identifier or the position thereof can identify the upper top surface of the logistics piece in the preview interface, so that after the shooting is completed, the position identifier can be added to the image and identify the upper top surface of the logistics piece.
[0097] Or, the position identifier can be generated by machine recognition or user operation after the shooting process.
[0098] For example, the user can manually identify the upper top surface of the logistics piece in the image obtained by shooting, and the corresponding position identifier can be generated by the shooting device according to the manual identification operation of the user, and of course, a device other than the shooting device can also generate the corresponding position identifier in the image obtained by shooting according to the manual identification operation of the user, and the specific form of the position identifier can be referred to the above content.
[0099] For another example, a neural network model can be trained to identify the top surface in an image. This model can be trained using a large number of images of different logistics parts, with the top surfaces of the parts labeled. Based on the top surface recognition results output by the model, such as the top surface's position in the image and the pixel range of the top surface in the image, a corresponding location identifier can be configured. Alternatively, the model can directly output or add a corresponding location identifier to the image based on the top surface recognition results.
[0100] It should be understood that among the several location marker configuration methods listed above, the location marker is configured by user operation during the shooting process. Considering that the user usually needs to observe the preview interface, adjust the lens, and perform other basic shooting operations during the shooting process, user operations related to the location marker are introduced. Users are easy to accept this setting and easy to operate. It is not only convenient and practical, but also has the characteristic of extremely low application cost compared to calling the model or user operation to configure the location marker after the image is captured.
[0101] Based on the position identifier, the surface indicated by the position identifier can be identified as the upper top surface, its position information can be extracted and recorded in the preset field in the image attribute information of the image configuration, and the pixel range corresponding to the upper top surface position of the logistics object can be identified.
[0102] After obtaining the initial image, the location identifier carried by the image can be identified. In this way, based on the identification form of the location identifier, the location of the upper top surface of the logistics part in the image can be known. Combined with this position, the edge contour of the logistics part in the image can be further determined through edge detection processing.
[0103] Specifically, based on the location of the upper surface of the logistics part identified by the position marker, starting from the pixel points of the image area at that location, adjacent pixel points with similar, equivalent or identical image features can be identified, and these pixel points can be connected to form a connected domain image. When the connected domain image has "grown", the connected domain image at this time can be identified as the logistics part image in the initial image, and for the contour of the logistics part image, the edge contour data of the logistics part can be extracted.
[0104] Alternatively, the logistics parts and their initial contours can be detected in the initial image through a neural network model, and then the initial contours can be verified and corrected in combination with the location of the upper top surface of the logistics parts identified by the position marker, so as to obtain the edge contour data of the logistics parts.
[0105] For corresponding reference, see Figure 3 The figure shows a flow chart of edge detection processing of the present application. The present application performs edge detection processing in the initial image to determine the target edge contour data of the logistics object. Specifically, the process may include the following steps S301 to S303:
[0106] Step S301: Input the initial image into the edge detection model for edge detection processing to obtain initial edge contour data of the logistics part, wherein the edge detection model is obtained by training an initial neural network model with different images labeled with the logistics part contour;
[0107] It can be understood that the present application can pre-train a neural network model to implement the edge detection processing referred to in the present application.
[0108] Specifically, a large number of images containing different logistics parts can be configured as training sets, and corresponding annotations can be configured for these images to mark the logistics part contours of the logistics parts contained in the images. In this way, these images are input into the initialized neural network model for forward propagation, so that the model recognizes and outputs edge contour data indicating the contours of the logistics parts in the input image. The loss function is then calculated based on the edge contour data, and back propagation is performed to optimize the model parameters and improve the recognition accuracy. When the training requirements such as the number of training times, training time, and recognition accuracy are met, the model training can be completed, and the model at this time can be used as an edge detection model, which can be used to identify the contours of logistics parts in the input image. In addition, the training of the neural network model mentioned above that can identify the upper top surface of the logistics parts in the image can also refer to the training instructions introduced here.
[0109] In this way, the present application can directly input the initial image into the trained edge detection model, thereby extracting the edge contour data of the logistics parts in the initial image output by the model.
[0110] Step S302, determining whether the upper top surface position identified by the position marker corresponds to the upper region of the logistics part contour indicated by the initial edge contour data, and if so, triggering step S303;
[0111] In this application, the edge contour data output by the edge detection model cannot necessarily be directly used as the final data. In other words, this application can also perform further verification and correction based on the initial edge contour data output by the edge detection model to obtain more accurate edge contour data of the logistics parts.
[0112] Specifically, the present application can combine the position marker configured in the initial image to determine whether the upper top surface position of the logistics part identified by the position marker is consistent with the initial edge contour data output by the edge detection model.
[0113] It can be understood that the logistics piece is usually a regular square, such as a cuboid or a cube, and has a relatively obvious geometric shape, and the upper top surface of the logistics piece can be identified from the image in combination with the geometric shape characteristics of the upper top surface. Therefore, the initial edge contour data output by the edge detection model can also be subdivided into edge contour data of the upper region and the lower region of the logistics piece contour.
[0114] In actual application, considering the recognition error, the upper region and the lower region can be two relatively ambiguous regions in addition to the upper top surface region and the region other than the upper top surface region (the side surface region) of the logistics piece, respectively.
[0115] For example, the image region corresponding to the identified initial edge contour can be divided into an upper region and a lower region according to the average longitudinal parameter value of the pixel points in the image region.
[0116] If the upper top surface position identified by the position identifier coincides with the upper region of the logistics piece contour indicated by the initial edge contour data, it can be determined that the identified logistics piece contour is close to the actual logistics piece, and has a relatively high confidence, especially when the position identifier is configured under user operation in the actual shooting process, and can also have a higher confidence.
[0117] Of course, the upper region of the logistics piece contour can be directly given by the edge detection model, or can be obtained by processing the initial edge contour data output by the edge detection model.
[0118] For example, in an implementation mode suitable for actual application, whether the upper top surface position identified by the position identifier corresponds to the upper region of the logistics piece contour indicated by the initial edge contour data is judged, such as Figure 4 A flowchart for judging whether the position identifier corresponds to the upper region of the present application is shown, and can be implemented by the following steps:
[0119] Step S401: Extract the position of the position identifier in the initial image as the upper top surface position identified by the position identifier.
[0120] It can be understood that in the present application, the position identifier in the initial image can be directly used as the upper top surface position identified by the position identifier through its position.
[0121] It should be noted that the identified upper top surface position does not mean that the positions of all pixel points on the upper top surface of the logistics piece need to be indicated, and can also be in the positions of all pixel points on the upper top surface of the logistics piece, that is, in the positions of part of the pixel points on the upper top surface of the logistics piece.
[0122] In this way, the position of the position identifier in the initial image can be extracted first for subsequent data processing.
[0123] Step S402, judging whether the location is in the upper region of the logistics piece profile indicated by the initial edge profile data, if yes, triggering step S403;
[0124] Specifically, after the location of the location identifier in the initial image is extracted, for example, the corresponding pixel position is obtained, it is judged whether the location is in the upper region of the logistics piece profile indicated by the initial edge profile data, to further verify and ensure that the recognized logistics piece profile is close to the actual logistics piece.
[0125] Step S403, determining that the upper top surface position identified by the location identifier corresponds to the upper region of the logistics piece profile indicated by the initial edge profile data.
[0126] Determining that the upper top surface position identified by the location identifier is in the upper region of the logistics piece profile indicated by the initial edge profile data, that is, determining the above-mentioned upper region of the logistics piece profile indicated by the initial edge profile data.
[0127] Step S404, determining that the initial edge profile data is the target edge profile data.
[0128] At this time, the target edge profile data can be determined on the basis of the initial edge profile data.
[0129] Specifically, the initial edge profile data can be directly used as the target edge profile data, or the initial edge profile data can be further corrected to obtain the target edge profile data, so as to improve the accuracy and ensure that the logistics piece profile described by the target edge profile data is closer to the actual logistics piece.
[0130] For example, in another exemplary implementation, the initial edge profile data is determined as the target edge profile data, as shown in Figure 5 The flowchart of determining the edge profile data of the present application, which also includes:
[0131] Step S501, determining the number of initial vertices existing in the initial edge profile data;
[0132] In actual application, the logistics piece is usually packaged with a paper packaging box, which presents a regular square shape, such as a cuboid or a cube, so these logistics pieces usually have a more obvious geometric shape. In the present application, considering the case of the logistics piece, the more obvious vertices of the regular square geometric shape are used to correct the edge profile.
[0133] It can be understood that in the initial edge contour data, the point cloud at the contour position can be fitted with a line segment, and after fitting, an edge contour shape composed of a line segment can be obtained, and the number of initial vertices existing in the edge contour shape can be extracted.
[0134] In addition, it has been mentioned in the above that the upper top surface of the logistics piece can be recognized from the image in combination with the geometric shape features of the upper top surface. For example, the quadrilateral formed by the four upper top vertices recognized on the continuous edge contour can be recognized as the upper top surface of the logistics piece with a regular square shape. The recognized upper top surface is obviously closer to the actual situation of the logistics piece and has a high confidence.
[0135] In step S502, if the number of initial vertices is not six, the initial vertices are corrected to correct the number of initial vertices to six.
[0136] It can be understood that the edge contour of the logistics piece with a regular square shape in the image usually only has six vertices. Therefore, if the number of initial vertices determined from the initial edge contour data in the foregoing is not six, the correction process in the present application can be triggered to perfect the initial contour data so that the number of vertices recognized in the data is corrected to six.
[0137] In step S503, the initial edge contour data after the correction process is determined as target edge contour data.
[0138] After the number of vertices in the data is corrected to six through the correction process to meet the geometric characteristics of the logistics piece, for example Figure 1 the application scenario shown in the 1-b user interface in the foregoing, the edge contour data at this time can be determined as target edge contour data, and subsequent three-dimensional data recognition processing of the logistics piece can be performed based on the target edge contour data.
[0139] For example, the correction processing of the vertices can include two cases: one is that the number of initial vertices is greater than six, and the other is that the number of initial vertices is less than six, as shown in Figure 6 The flowchart of the correction process of the present application shown in FIG. 6 can specifically include the contents of the steps S601 to S604 shown in the following:
[0140] In step S601, if the number of initial vertices is greater than six, the redundant points in the initial vertices are recognized and deleted according to the preset geometric feature data of the logistics piece to correct the number of initial vertices to six.
[0141] For the case where the number of initial vertices is greater than six, it can be obviously understood that there are too many line segments identified at the edge contour from the initial edge contour data. Normally, the edge contour of six vertices is composed of six line segments. If the number of identified line segments exceeds six, there are extra redundant points.
[0142] In this way, the preset geometric feature data of the logistics part can be combined to identify redundant points in the initial vertices with a number greater than six.
[0143] Specifically, the preset geometric feature data of the logistics parts can configure the corresponding relationship between the line segments according to the geometric shapes presented by the logistics parts of regular square shapes and different specifications and sizes under different shooting angles.
[0144] by Figure 7 Taking the schematic diagram of a scene of the normal edge contour of the present application as an example, in the 7-a scene on the left, the ab line segment and the ef line segment should be approximately the same in length, the bc line segment and the de line segment should also be approximately the same in length, the cd line segment and the af line segment should also be approximately the same in length, and the cd line segment, the be line segment, and the af line segment should be parallel to each other; in the 7-b scene on the right, the ab line segment and the de line segment should be approximately the same in length and tend to be parallel to each other, the bc line segment and the ef line segment should also be approximately the same in length and tend to be parallel to each other, and the cd line segment and the af line segment should also be approximately the same in length and tend to be parallel to each other.
[0145] Of course, in addition to the length and parallel relationship, the corresponding relationship between line segments can also be configured from aspects such as the angle range of the line segment angle, which is not specifically limited here.
[0146] In this way, from the perspective of polygon fitting of a regular square shape, the line segment features of the initial vertex can be compared with the corresponding relationship between the preset line segments (the preset geometric feature data of the logistics parts) in turn, and the six vertices with the highest matching degree can be retained, so as to achieve the effect of correcting the original number of vertices greater than six to six.
[0147] Step S602 , if the number of initial vertices is less than six, skeletonize the initial edge contour data to obtain skeleton data;
[0148] On the other hand, when the number of initial vertices is less than six, it may be affected by special shooting conditions such as shooting angle and exposure time, resulting in two or three edges on the edge contour of the logistics part being closer to the curve, resulting in the number of vertices being less than six when fitting the polygon.
[0149] To address this situation, the present application designs a solution for finding six edges by positioning in order to find six vertices.
[0150] Specifically, the initial edge contour data obtained above can be subjected to skeletonization processing, which can also be called skeleton extraction processing, extracting the central axis pixels of the image, eliminating irrelevant pixels, and maintaining its original shape to form the so-called skeleton.
[0151] Taking a simple rectangular image as an example, its skeleton is its central axis; taking a simple triangle as an example, its skeleton is the "Y" shape connecting the three vertices.
[0152] Through skeletonization, the initial edge contour data can be made thinner than the corresponding coarser edge contour in the image, thereby reducing the number of edge points and the amount of data processing.
[0153] In step S603, straight line fitting is performed on the points in the skeleton data to obtain multiple straight lines. When the number of straight lines is less than six, the fitting is continued based on the distance between the edge points and the straight lines until the straight lines can form a polygon and the number reaches six, thereby correcting the number of initial vertices to six.
[0154] After obtaining the skeleton data, the pixel points in the data can be processed by straight line fitting to obtain multiple straight lines. The distances from all edge points to the straight lines are calculated. If there are enough points on the straight line, it is considered a valid line, and the points of the valid line are deleted from the edge points. The number of valid lines is accumulated until six valid lines closed into polygons are found. The corresponding target edge contour data can be obtained, and the corresponding six vertices are used as the six vertices of the logistics part.
[0155] The above-mentioned edge detection processing related content and its specific edge detection processing in practical applications can all be processed by an edge detection model. The model, for example, can be implemented based on the VGG neural network model.
[0156] In practical applications, this application can also make a series of adjustments to the backbone architecture of the VGG neural network model, such as:
[0157] 1. Through a series of algorithm comparisons, the 3, 4, and 5 stage architectures (the combined architecture of convolutional layer + pooling layer) in the VGG neural network model were streamlined;
[0158] 2. Because the outline of a logistics object contains high-level semantic information, a larger filter size is used at the model input to provide a larger receptive field.
[0159] 3. Each Stage architecture of the VGG neural network model outputs a feature vector map (Feature Map), and the output results of the five Stage architectures are fused through up sampling (Up Sampling). In addition, different Stage architectures are combined with real scenes and set different weights to provide more suitable edge detection effects.
[0160] 4. During training, to solve the problem of unbalanced positive and negative samples, different parameters are set for the loss function of positive and negative samples when calculating the loss function (Loss), and the weight of small samples is increased.
[0161] 5. For the problem of edge breakage that may occur in complex scenes, when judging that the edge of the logistics piece may be broken, a corresponding chevron image filter can be used to connect the broken edge line, thereby improving the stability of the algorithm.
[0162] After obtaining the target edge contour data considered effective, the three-dimensional data of the logistics piece can be determined according to the data.
[0163] As another exemplary implementation, refer to Figure 8 A flowchart for determining three-dimensional data of the present application is shown, which determines the three-dimensional data of the logistics piece according to the target edge contour data, and can specifically include:
[0164] Step S801, obtaining real size data corresponding to the position identifier;
[0165] Specifically, in the present application, the length of the object or the related line segment in the image can be determined in combination with the reference object in the initial image to determine the size relationship between the object in the image and the actual object, and then the length of the three edges of the logistics piece, i.e., length, width and height, can be determined according to the geometric characteristics of the logistics piece.
[0166] For example, the position identifier can be directly used as a reference object. In actual application, the position identifier can be generated on the image processing level as mentioned above, or can be an article or a drawing pattern configured on the actual logistics piece. For example, a label sheet can be pasted on the top surface of the logistics piece. The label sheet can be similar to the paper of the logistics sheet, or can be the logistics sheet itself, which has a fixed standard size. The three-dimensional data of the logistics piece can be determined according to the fixed standard size (real size data).
[0167] Alternatively, the real size data of the position identifier can also be recorded in the image attribute information of the initial image. In this way, the three-dimensional data of the logistics piece can also be determined according to the real size data and the image size of the position identifier in the initial image.
[0168] Step S802, determining a coordinate conversion relationship between a pixel coordinate system and a world coordinate system based on the real size data and the pixel coordinate data of the position marker in the initial image;
[0169] Specifically, after obtaining the real size data of the position marker, the corresponding relationship (coordinate conversion relationship) between the object in the initial image and the corresponding real object can be determined in combination with the image size of the position marker in the initial image.
[0170] Specifically, Figure 9 Taking the schematic diagram of a scene for obtaining a coordinate transformation relationship in the present application as an example, the position of the position marker detected in the world coordinate system can be combined with the six vertex positions corresponding to the target outline data, and the stereoscopic N-point perspective (Pespective-N-Point, PNP) algorithm can be used to correspond to the camera coordinate system to obtain the R and t vectors of the two coordinate systems. The R vector and t vector refer to the rotation vector and translation vector in stereo vision, respectively. According to these two vectors, the coordinate transformation relationship between the camera coordinate system and the world coordinate system can be obtained. Specifically, for example:
[0171]
[0172] Based on this coordinate transformation relationship, we can further obtain the coordinate transformation relationship between the pixel coordinate system and the world coordinate system, namely:
[0173]
[0174] Step S803: converting the target edge contour data into three-dimensional data based on the coordinate transformation relationship;
[0175] In this way, after obtaining the coordinate conversion relationship, the coordinates of the target edge contour data can be converted into three-dimensional coordinates to form three-dimensional data. The three-dimensional data contains the length (X), width (Y), and height (Z) of the logistics part. Therefore, the volume data (X*Y*Z) of the logistics part can be calculated based on the three-dimensional data.
[0176] After obtaining the three-dimensional data of the logistics part and calculating the volume data of the logistics part based on the three-dimensional data, relevant applications can be put into use based on the determined volume data to adjust the operation processing that is compatible with the volume data.
[0177] For example, if the volume measurement of a logistics item occurs at the receiving stage of the logistics item, the quotation for the logistics item can be calculated based on the determined volume data (in actual application, the quotation for this logistics task can be adjusted for logistics items of a specific volume);
[0178] For example, if the volume measurement process of the logistics piece occurs in the transportation link of the logistics piece, the determined volume data can be used to determine how to transport the logistics piece (in actual application, for a logistics piece of a specific volume, the transportation strategy such as the specification of the transportation vehicle, the transportation route, etc. of the current logistics task can be adjusted).
[0179] For example, if the volume measurement process of the logistics piece occurs in the sorting link of the logistics piece, the determined volume data can be used to determine how to sort the logistics piece (in actual application, for a logistics piece of a specific volume, the sorting strategy such as the corresponding sorting channel, the sorting mode, or the sorting time, etc. can be allocated)
[0180] Correspondingly, the logistics piece volume measurement method provided by the present application further comprises the following steps after determining the volume data of the logistics piece:
[0181] Generating a sorting strategy, a transportation strategy, or a logistics quotation of the logistics piece according to the volume data.
[0182] In order to better implement the logistics piece volume measurement method provided by the present application, the present application further provides a logistics piece volume measurement device.
[0183] Referring to Figure 10 , Figure 10 A structural schematic diagram of the logistics piece volume measurement device of the present application, in the present application, the logistics piece volume measurement device 1000 can specifically include the following structures:
[0184] The transceiver unit 1001 is configured to obtain an initial image of the logistics piece, wherein the initial image is a planar image obtained by photographing the logistics piece;
[0185] The processing unit 1002 is configured to identify a position mark of the initial image, wherein the position mark is used to identify the top surface position of the logistics piece; based on the position mark, edge detection processing is performed on the initial image to determine target edge contour data of the logistics piece; based on the target edge contour data, three-dimensional data of the logistics piece is determined, and the volume data of the logistics piece is calculated according to the three-dimensional data.
[0186] In an exemplary implementation manner, the processing unit 1002 is specifically configured to:
[0187] The initial image is input into an edge detection model for edge detection processing to obtain initial edge contour data of the logistics piece, wherein the edge detection model is obtained by training an initial neural network model with different images labeled with the contour of the logistics piece;
[0188] It is judged whether the top surface position identified by the position mark corresponds to the upper region of the logistics piece contour indicated by the initial edge contour data;
[0189] If so, the initial edge contour data is determined to be the target edge contour data.
[0190] In another exemplary implementation, the processing unit 1002 is specifically configured to:
[0191] determining the number of initial vertices present in the initial edge profile data;
[0192] If the number of the initial vertices is not six, the initial vertices are corrected to correct the number of the initial vertices to six;
[0193] The corrected initial edge contour data is determined as target edge contour data.
[0194] In another exemplary implementation, the processing unit 1002 is specifically configured to:
[0195] If the number of the initial vertices is greater than six, redundant points in the initial vertices are identified and deleted based on the preset geometric feature data of the logistics part, so as to correct the number of the initial vertices to six;
[0196] Alternatively, if the number of initial vertices is less than six, skeletonization is performed on the initial edge contour data to obtain skeleton data;
[0197] Perform straight line fitting on the points in the skeleton data to obtain multiple straight lines. When the number of straight lines is less than six, continue fitting based on the distance between the edge points and the straight lines until the straight lines can form a polygon and the number reaches six, thereby correcting the number of initial vertices to six.
[0198] In another exemplary implementation, the judgment processing unit 1002 is specifically configured to:
[0199] Extracting the position of the position marker in the initial image as the upper top surface position identified by the position marker;
[0200] Determining whether the location is in the upper area of the logistics part contour indicated by the initial edge contour data;
[0201] If so, the upper top surface position identified by the position marker is determined to correspond to the upper area of the logistics part contour indicated by the initial edge contour data.
[0202] In another exemplary implementation, the processing unit 1002 is specifically configured to:
[0203] Get the actual size data corresponding to the position marker;
[0204] Determine the coordinate transformation relationship between the pixel coordinate system and the world coordinate system based on the real size data and the pixel coordinate data of the position marker in the initial image;
[0205] Based on the coordinate transformation relationship, the target edge contour data is converted into three-dimensional data.
[0206] In yet another exemplary implementation, the processing unit 1002 is further configured to:
[0207] Generate sorting strategies, transportation strategies or logistics quotations for logistics parts based on volume data.
[0208] This application also provides a volume measurement device for logistics parts, see Figure 11 , Figure 11 The present invention shows a schematic diagram of a volume measurement device for a logistics piece. Specifically, the present invention includes a processor 1101, which is used to execute a computer program stored in a memory 1102 to implement the following. Figures 1 to 9 Corresponding to each step of the method for measuring the volume of a logistics item in any embodiment; or, when the processor 1101 is used to execute the computer program stored in the memory 1102, the following is implemented Figure 10 The functions of each unit in the corresponding embodiment, such as Figure 10 The hardware structure corresponding to the transceiver unit 1001 is the input and output device 1103, the hardware structure corresponding to the processing unit 1002 is the processor 1101, and the memory 1102 is used to store the processor 1101 to execute the above Figures 1 to 9 A computer program required for the volume measurement method of a logistics item in any embodiment.
[0209] For example, the computer program may be divided into one or more modules / units, one or more of which are stored in the memory 1102 and executed by the processor 1101 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer device.
[0210] The volume measurement device for a logistics piece may include, but is not limited to, a processor 1101 and a memory 902. Those skilled in the art will appreciate that the illustration is merely an example of a volume measurement device for a logistics piece and does not constitute a limitation on the volume measurement device for a logistics piece. The device may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the volume measurement device for a logistics piece may also include input and output devices, a network access device, a bus, etc., and the processor 1101, the memory 1102, the input and output devices, and the network access device are connected via a bus.
[0211] The processor 1101 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The processor is the control center of the volume measurement device for logistics parts, connecting various parts of the entire device using various interfaces and lines.
[0212] The memory 1102 can be used to store computer programs and / or modules. The processor 1101 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 1102 and accessing the data stored in the memory 1102. The memory 1102 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the data storage area may store data generated by the use of a volume measurement device for a logistic object. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0213] When the processor 1101 is used to execute the computer program stored in the memory 1102, it can specifically implement the following functions:
[0214] Acquire an initial image of the logistics object, wherein the initial image is a planar image obtained by photographing the logistics object;
[0215] Identify the position mark of the initial image, wherein the position mark is used to identify the top surface position of the logistics object;
[0216] Based on the position mark, edge detection processing is performed in the initial image to determine the target edge contour data of the logistics part;
[0217] According to the target edge contour data, the three-dimensional data of the logistics part is determined, and the volume data of the logistics part is calculated based on the three-dimensional data.
[0218] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the volume measuring device of the logistics piece, the equipment and the corresponding units thereof described above can be referred to as Figures 1 to 9 The description of the volume measuring method of the logistics piece corresponding to any embodiment will not be repeated here.
[0219] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or controlled by related hardware through instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0220] Therefore, the present application provides a computer readable storage medium, which stores a plurality of instructions capable of being loaded by a processor to execute the present application as Figures 1 to 9 The specific operations of the steps in the volume measuring method of the logistics piece corresponding to any embodiment can be referred to as Figures 1 to 9 The description of the volume measuring method of the logistics piece corresponding to any embodiment will not be repeated here.
[0221] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0222] Due to the instructions stored in the computer readable storage medium, the present application as Figures 1 to 9 The steps in the volume measuring method of the logistics piece corresponding to any embodiment, therefore, the present application as Figures 1 to 9 The beneficial effects that can be achieved by the volume measuring method of the logistics piece corresponding to any embodiment are described in detail above, and will not be repeated here.
[0223] The volume measuring method, device, equipment and computer readable storage medium of the present application are described in detail above, and the principles and implementation modes of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed; in conclusion, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for measuring the volume of a logistics item, characterized in that: The method comprises: Acquire an initial image of the logistics object, wherein the initial image is a planar image obtained by photographing the logistics object; Identifying a position marker of the initial image, wherein the position marker is used to identify the top surface position of the logistics object; Performing edge detection processing on the initial image to obtain initial edge contour data of the logistics object; Based on the position identifier, determining the initial edge contour data as target edge contour data of the logistics part; Determining three-dimensional data of the logistics object according to the target edge contour data, and calculating volume data of the logistics object according to the three-dimensional data; The determining the initial edge contour data as the target edge contour data of the logistics object includes: If the number of initial vertices in the initial edge contour data is greater than six, identifying and deleting redundant points in the initial vertices based on preset geometric feature data of the logistics part, so as to correct the number of the initial vertices to six; Alternatively, if the number of the initial vertices is less than six, skeletonizing the initial edge contour data to obtain skeleton data; Performing straight line fitting on the points in the skeleton data to obtain a plurality of straight lines, and when the number of the straight lines is less than six, continuing fitting in combination with the distances between the edge points and the straight lines until the straight lines can form a polygon and the number reaches six, thereby correcting the number of the initial vertices to six; The corrected initial edge contour data is determined as the target edge contour data.
2. The method according to claim 1, characterized in that The performing edge detection processing on the initial image to obtain initial edge contour data of the logistics object includes: Inputting the initial image into an edge detection model for edge detection processing to obtain initial edge contour data of the logistics part, wherein the edge detection model is obtained by training an initial neural network model with different images labeled with the logistics part contour; The determining, based on the position identifier, that the initial edge contour data is the target edge contour data of the logistics object includes: Determining whether the upper top surface position identified by the position identifier corresponds to the upper region of the logistics part contour indicated by the initial edge contour data; If so, the initial edge contour data is determined to be the target edge contour data.
3. The method according to claim 2, characterized in that The step of determining whether the upper top surface position identified by the position identifier corresponds to the upper region of the logistics part contour indicated by the initial edge contour data includes: Extracting the position of the position marker in the initial image as the upper top surface position identified by the position marker; Determining whether the location is in an upper region of the logistics part contour indicated by the initial edge contour data; If so, it is determined that the upper top surface position identified by the position marker corresponds to the upper area of the logistics part contour indicated by the initial edge contour data.
4. The method according to claim 1, wherein Determining the three-dimensional data of the logistics object according to the target edge contour data includes: Obtaining real size data corresponding to the position marker; Determining a coordinate transformation relationship between a pixel coordinate system and a world coordinate system according to the real size data and the pixel coordinate data of the position marker in the initial image; Based on the coordinate transformation relationship, the target edge contour data is transformed into the three-dimensional data.
5. The method according to claim 1, wherein After calculating the volume data of the logistics part according to the three-dimensional data, the method further includes: A sorting strategy, a transportation strategy or a logistics quotation for the logistics parts is generated based on the volume data.
6. A volume measuring device for logistics parts, characterized in that: The device comprises: a transceiver unit, configured to obtain an initial image of the logistics object, wherein the initial image is a planar image obtained by photographing the logistics object; a processing unit configured to identify a position identifier of the initial image, wherein the position identifier is used to identify the upper surface position of the logistics object; perform edge detection processing on the initial image to obtain initial edge contour data of the logistics object; determine the initial edge contour data as target edge contour data of the logistics object based on the position identifier; determine three-dimensional data of the logistics object based on the target edge contour data, and calculate volume data of the logistics object based on the three-dimensional data; The processing unit is specifically configured to: If the number of initial vertices in the initial edge contour data is greater than six, identifying and deleting redundant points in the initial vertices based on preset geometric feature data of the logistics part, so as to correct the number of the initial vertices to six; Alternatively, if the number of the initial vertices is less than six, skeletonizing the initial edge contour data to obtain skeleton data; Performing straight line fitting on the points in the skeleton data to obtain a plurality of straight lines, and when the number of the straight lines is less than six, continuing fitting in combination with the distances between the edge points and the straight lines until the straight lines can form a polygon and the number reaches six, thereby correcting the number of the initial vertices to six; The corrected initial edge contour data is determined as the target edge contour data.
7. A volume measurement device for logistics parts, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method according to any one of claims 1 to 5 is executed.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Parcel volume measuring method and system, storage medium and mobile terminal
CN108627092A
Transparent crystal growth process edge and volume real-time monitoring method and system
CN110033486A