Goods stacking information generation method and device, equipment, medium and program product

The edge detection and clustering algorithm is used to quickly and efficiently determine the accumulation of goods in the logistics field, solving the problems of high computing power consumption and waste of manpower in the existing technology, realizing a method of generating goods accumulation information deployed at the edge, and saving communication bandwidth.

CN118628515APending Publication Date: 2024-09-10BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410736551.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing technology used in the field of logistics to determine large visual models of goods accumulation requires high computing power, requires cloud deployment, consumes a large amount of communication bandwidth, and requires human labeling, which wastes manpower and material resources.

Method used

By obtaining the target captured image of the cargo accumulation area, perform edge detection processing, use a clustering algorithm to determine the set of pixel blocks related to the stacked goods, and generate cargo accumulation information based on the total area of ​​the pixel blocks and the total pixel area of ​​the edge detection image, avoiding neural The use of network models enables deployment at the edge and saves communication bandwidth.

Benefits of technology

It can quickly and efficiently determine the accumulation of goods, save computing power and communication bandwidth, no longer require manual labeling, and improve the management efficiency of the goods accumulation area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628515A
    Figure CN118628515A
Patent Text Reader

Abstract

The embodiment of the invention discloses a cargo stacking information generation method and device, equipment, a medium and a program product. A specific embodiment of the method comprises the following steps: acquiring a target shot image corresponding to a cargo stacking area; performing edge detection processing on the target shot image to generate an edge detection image; determining a pixel block set related to stacked goods from the edge detection image by using a clustering algorithm; and generating cargo stacking information corresponding to the cargo stacking area according to the pixel block total area corresponding to the pixel block set and the pixel total area corresponding to the edge detection image. The implementation mode is related to intelligent logistics, and the cargo stacking condition corresponding to the cargo stacking area can be quickly and efficiently determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to methods, devices, equipment, media, and program products for generating cargo accumulation information. Background Art

[0002] At present, in the logistics field, a large amount of goods are often piled up in the cargo accumulation area during busy hours, causing congestion in the site and reducing the transfer efficiency. At the same time, the messy accumulation is also very easy to cause the loss and damage of goods, and it will also pose a threat to the safety of personnel. Therefore, it is an important task to grasp the situation of the cargo accumulation area in a timely manner and determine whether the goods are excessively accumulated to ensure logistics efficiency. For determining the cargo accumulation situation, the method usually adopted is to generate the cargo accumulation situation of the cargo accumulation area through a large visual model.

[0003] However, the inventors have found that when the above method is used to determine the cargo stacking situation, the following technical problems often occur:

[0004] Using large visual models requires high computing power and must be deployed in the cloud, consuming a large amount of communication bandwidth. In addition, the cargo storage area needs to be manually labeled, wasting a lot of manpower and material resources.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0007] Some embodiments of the present disclosure propose methods, devices, equipment, media and program products for generating cargo accumulation information to solve the technical problems mentioned in the above background technology section.

[0008] In a first aspect, some embodiments of the present disclosure provide a method for generating cargo stacking information, comprising: obtaining a target shot image corresponding to a cargo stacking area; performing edge detection processing on the target shot image to generate an edge detection image; determining a set of pixel blocks related to the stacked cargo from the edge detection image; and generating cargo stacking information corresponding to the cargo stacking area based on the total area of ​​pixel blocks corresponding to the pixel block set and the total area of ​​pixels corresponding to the edge detection image.

[0009] Optionally, the above-mentioned use of a clustering algorithm to determine a set of pixel blocks related to the stacked goods from the above-mentioned edge detection image includes: performing an expansion operation and / or an erosion operation on the above-mentioned edge detection image to generate a processed image; screening out pixel points whose corresponding pixel values ​​are target values ​​from the above-mentioned processed image to obtain a pixel point set; and generating the above-mentioned pixel block set based on the above-mentioned pixel point set using the above-mentioned clustering algorithm.

[0010] Optionally, the above-mentioned pixel block set is generated based on the above-mentioned pixel point set using the above-mentioned clustering algorithm, including: using the above-mentioned clustering algorithm to perform pixel clustering processing on each pixel point in the above-mentioned pixel point set to generate an initial pixel block set; removing initial pixel blocks whose corresponding pixel block areas are larger than a preset cargo area from the above-mentioned initial pixel block set to obtain a first removed pixel block set; generating the above-mentioned pixel block set based on the above-mentioned first removed pixel block set.

[0011] Optionally, the above-mentioned pixel block set is generated based on the above-mentioned first removed pixel block set, including: determining the pixel block area corresponding to each pixel block in the above-mentioned first removed pixel block set to obtain a pixel block area set; sorting the areas of each pixel block in the above-mentioned pixel block area set to generate a pixel block area sequence; determining the pixel block area that is the inflection point of area change in the above-mentioned pixel block area sequence as the inflection point pixel block area; removing pixel blocks whose corresponding pixel block areas are larger than the inflection point pixel block area from the above-mentioned first removed pixel block set to obtain a second removed pixel block set; generating the above-mentioned pixel block set based on the above-mentioned second removed pixel block set.

[0012] Optionally, generating the above-mentioned pixel block set based on the above-mentioned second removed pixel block set includes: acquiring at least one historical shot image; determining a pixel block set related to the stacked goods in each historical shot image in the above-mentioned at least one historical shot image as a historical pixel block set; determining an intersecting pixel block set between the above-mentioned historical pixel block set and the above-mentioned second removed pixel block set to obtain at least one intersecting pixel block set; and removing the above-mentioned at least one intersecting pixel block set from the above-mentioned second removed pixel block set to obtain the above-mentioned pixel block set.

[0013] Optionally, the above-mentioned determination of the pixel block area at the inflection point of area change in the above-mentioned pixel block area sequence as the inflection point pixel block area includes: generating a pixel block area curve for the above-mentioned pixel block area sequence; determining the inflection point in the above-mentioned pixel block area curve by means of a straight line fitting curve; and determining the pixel block area corresponding to the above-mentioned inflection point as the above-mentioned inflection point pixel block area.

[0014] Optionally, the above-mentioned generating cargo accumulation information corresponding to the above-mentioned cargo accumulation area according to the total area of ​​pixel blocks corresponding to the above-mentioned pixel block set and the total area of ​​pixels corresponding to the above-mentioned edge detection image includes: determining the area difference between the total area of ​​pixel blocks corresponding to the above-mentioned pixel block set and the total area of ​​pixels corresponding to the above-mentioned edge detection image; and determining the area ratio between the above-mentioned area difference and the total area of ​​pixels corresponding to the above-mentioned edge detection image as the above-mentioned cargo accumulation information.

[0015] In a second aspect, some embodiments of the present disclosure provide a device for generating cargo stacking information, comprising: an acquisition unit, configured to acquire a target shot image corresponding to a cargo stacking area; a processing unit, configured to perform edge detection processing on the target shot image to generate an edge detection image; a determination unit, configured to use a clustering algorithm to determine a set of pixel blocks related to the stacked cargo from the edge detection image; and a generation unit, configured to generate cargo stacking information corresponding to the cargo stacking area based on the total area of ​​pixel blocks corresponding to the pixel block set and the total area of ​​pixels corresponding to the edge detection image.

[0016] Optionally, the determination unit can be configured to: perform a dilation operation and / or an erosion operation on the above-mentioned edge detection image to generate a processed image; filter out pixel points whose corresponding pixel values ​​are target values ​​from the above-mentioned processed image to obtain a pixel point set; and generate the above-mentioned pixel block set based on the above-mentioned pixel point set using the above-mentioned clustering algorithm.

[0017] Optionally, the determination unit can be configured to: use the above-mentioned clustering algorithm to perform pixel clustering processing on each pixel point in the above-mentioned pixel point set to generate an initial pixel block set; remove the initial pixel blocks whose corresponding pixel block areas are larger than the preset cargo area from the above-mentioned initial pixel block set to obtain a first removed pixel block set; and generate the above-mentioned pixel block set based on the above-mentioned first removed pixel block set.

[0018] Optionally, the determination unit can be configured to: determine the pixel block area corresponding to each pixel block in the above-mentioned first removed pixel block set to obtain a pixel block area set; sort the areas of each pixel block in the above-mentioned pixel block area set to generate a pixel block area sequence; determine the pixel block area that is the inflection point of area change in the above-mentioned pixel block area sequence as the inflection point pixel block area; remove pixel blocks whose corresponding pixel block areas are greater than the above-mentioned inflection point pixel block area from the above-mentioned first removed pixel block set to obtain a second removed pixel block set; generate the above-mentioned pixel block set based on the above-mentioned second removed pixel block set.

[0019] Optionally, the determination unit can be configured to: acquire at least one historical shot image; determine a set of pixel blocks related to the stacked goods in each of the at least one historical shot image as a historical pixel block set; determine an intersecting pixel block set between the historical pixel block set and the second removed pixel block set to obtain at least one intersecting pixel block set; remove the at least one intersecting pixel block set from the second removed pixel block set to obtain the pixel block set.

[0020] Optionally, the determination unit can be configured to: generate a pixel block area curve for the above-mentioned pixel block area sequence; determine the inflection point in the above-mentioned pixel block area curve by means of a straight line fitting curve; and determine the pixel block area corresponding to the above-mentioned inflection point as the above-mentioned inflection point pixel block area.

[0021] Optionally, the generating unit may be configured to: determine the area difference between the total area of ​​pixel blocks corresponding to the above pixel block set and the total area of ​​pixels corresponding to the above edge detection image; and determine the area ratio between the above area difference and the total area of ​​pixels corresponding to the above edge detection image as the above cargo stacking information.

[0022] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0023] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.

[0024] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.

[0025] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the cargo accumulation information generation method of some embodiments of the present disclosure can quickly and efficiently determine the cargo accumulation situation corresponding to the cargo accumulation area. Specifically, the reason why the relevant cargo accumulation situation is not fast and efficient is that the use of a large visual model requires high computing power, and must be deployed in the cloud, consuming a large communication bandwidth. In addition, it is necessary to manually label the cargo accumulation area, wasting a lot of manpower and material resources. Based on this, the cargo accumulation information generation method of some embodiments of the present disclosure first obtains a target shooting image corresponding to the cargo accumulation area, and then performs content analysis on the picture in the shooting picture to accurately generate cargo accumulation information. Here, by shooting images, the problem of inaccurate determination caused by the inability to form a global field of view in manual cargo accumulation determination can be avoided. Then, the above-mentioned target shooting image is subjected to edge detection processing to generate an edge detection image to obtain edge feature information. Here, by edge feature information, the pixel block set related to the piled goods can be accurately determined later. Then, by using a clustering algorithm, the pixel block set related to the piled goods can be accurately and quickly determined from the above-mentioned edge detection image. Finally, according to the total area of ​​the pixel blocks corresponding to the above pixel block set and the total area of ​​the pixels corresponding to the above edge detection image, the cargo accumulation information corresponding to the above cargo accumulation area is accurately generated. In summary, through edge detection processing and clustering algorithm, the cargo accumulation situation corresponding to the cargo accumulation area can be determined quickly and efficiently without using a neural network model and being able to be deployed on the edge and the camera at the same time, saving communication bandwidth and not wasting high computing power. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0027] Figure 1 is a schematic diagram of an application scenario of a method for generating cargo accumulation information according to some embodiments of the present disclosure;

[0028] Figure 2 is a flow chart of some embodiments of the cargo accumulation information generating method according to the present disclosure;

[0029] Figure 3 is a schematic diagram of a pixel block set related to piled goods in some embodiments of the method for generating goods piled information according to the present disclosure;

[0030] Figure 4 is a flow chart of other embodiments of the method for generating cargo accumulation information according to the present disclosure;

[0031] Figure 5 is a schematic diagram of a processed image in some embodiments of the cargo accumulation information generating method disclosed herein;

[0032] Figure 6 is a schematic diagram of curve fitting using two straight lines in some embodiments of the cargo accumulation information generating method disclosed in the present invention;

[0033] Figure 7 It is a schematic diagram of the structure of some embodiments of the cargo accumulation information generating device according to the present disclosure;

[0034] Figure 8 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0036] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0037] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0038] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0039] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0040] With regard to the collection, storage, and use of user personal information (such as cargo information) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.

[0041] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0042] Figure 1 It is a schematic diagram of an application scenario of the method for generating cargo stacking information according to some embodiments of the present disclosure.

[0043] exist Figure 1 In the application scenario, first, the electronic device 101 can obtain the target shot image 102 corresponding to the cargo stacking area. Then, the electronic device 101 can perform edge detection processing on the target shot image 102 to generate an edge detection image 103. Next, the electronic device 101 can use a clustering algorithm to determine a pixel block set 104 related to the stacked cargo from the edge detection image 103. In this application scenario, the pixel block set 104 may include: a first pixel block 1041, a second pixel block 1042, a third pixel block 1043, and a fourth pixel block 1044. Finally, the electronic device 101 can generate cargo stacking information 107 corresponding to the cargo stacking area according to the total pixel block area 105 corresponding to the pixel block set 104 and the total pixel area 106 corresponding to the edge detection image 103. In this application scenario, the total pixel block area 105 corresponding to the pixel block set 104 may be "1000". The total pixel area 106 corresponding to the edge detection image 103 may be "345". The cargo accumulation information 107 may be "34.5%".

[0044] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.

[0045] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.

[0046] Continue to refer Figure 2 , shows a process 200 of some embodiments of the cargo accumulation information generation method according to the present disclosure. The cargo accumulation information generation method comprises the following steps:

[0047] Step 201, obtaining a target shot image corresponding to a cargo stacking area.

[0048] In some embodiments, the execution subject of the above cargo accumulation information generation method (for example Figure 1 The electronic device 101 shown can obtain the target captured image corresponding to the cargo stacking area through a wired connection method or a wireless connection method. The cargo stacking area can be an area where cargo is stacked. That is, the cargo stacking area can be a cargo storage buffer area. In practice, the cargo stacking area can be a transfer area between a storage and sorting site. In addition, the cargo stacking area can also be a buffer area between a loading vehicle and a platform. The target captured image can be an image captured by a camera device installed in the cargo stacking area.

[0049] Step 202: perform edge detection processing on the above-mentioned target captured image to generate an edge detection image.

[0050] In some embodiments, the execution subject may perform edge detection processing on the target captured image to generate an edge detection image. In practice, the edge detection image may be a black and white pixel image.

[0051] It should be noted that the content of the white area in the edge detection image may be the image content corresponding to the piled goods.

[0052] As an example, the execution subject may use an edge detection algorithm to perform edge detection processing on the target captured image to generate an edge detection image. In practice, the edge detection algorithm may be a Canny algorithm.

[0053] Step 203: using a clustering algorithm, determine a set of pixel blocks related to the piled goods from the edge detection image.

[0054] In some embodiments, the execution entity may use a clustering algorithm to determine a set of pixel blocks related to the piled goods from the edge detection image. The pixel block may be a goods pixel block corresponding to the piled goods in the edge detection image. The goods pixel block may be a pixel block formed by a plurality of goods pixel points.

[0055] In practice, the clustering algorithm may be a DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm.

[0056] As an example, the execution entity may directly input each pixel point in the edge detection image into the clustering algorithm to determine a set of pixel blocks related to the stacked goods according to the pixel point position and pixel value corresponding to each pixel point.

[0057] In addition, the execution subject may mark each pixel block in the pixel block set related to the stacked goods as white.

[0058] As an example, see Figure 3 , which shows a schematic diagram of a pixel block set related to piled goods, where the white area is the area corresponding to the goods.

[0059] Step 204: Generate cargo accumulation information corresponding to the cargo accumulation area according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image.

[0060] In some embodiments, the execution subject may generate cargo accumulation information corresponding to the cargo accumulation area according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image. The total area of ​​the pixel blocks corresponding to the pixel block set may represent the number of pixels of each pixel point included in the pixel block set. The total area of ​​the pixel blocks may be the image area of ​​the image content corresponding to the pixel blocks. The total area of ​​the pixels corresponding to the edge detection image may represent the image size corresponding to the edge detection image. That is, the total area of ​​the pixels corresponding to the edge detection image may represent the number of pixels of each pixel point in the edge detection image. The cargo accumulation information may be the accumulation of cargo in the cargo accumulation area. In practice, the cargo accumulation information may be numerical information or text information. For example, the cargo accumulation information may be a numerical value between 0 and 100. The larger the numerical value, the more crowded the cargo in the cargo accumulation area. For another example, the cargo accumulation information may be one of the following: crowded, relatively crowded, relatively empty, and very empty.

[0061] As an example, the execution entity may determine the area ratio between the total area of ​​pixel blocks corresponding to the pixel block set and the total area of ​​pixels corresponding to the edge detection image as the cargo accumulation information.

[0062] In some optional implementations of some embodiments, generating the cargo accumulation information corresponding to the cargo accumulation area according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image may include the following steps:

[0063] The first step is to determine the area difference between the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image.

[0064] As an example, the execution entity may subtract the total area of ​​pixel blocks corresponding to the pixel block set from the total area of ​​pixels corresponding to the edge detection image to generate an area difference.

[0065] In the second step, the area ratio between the area difference and the total area of ​​pixels corresponding to the edge detection image is determined as the cargo accumulation information.

[0066] As an example, the execution entity may divide the area difference by the total area of ​​pixels corresponding to the edge detection image to generate the cargo accumulation information.

[0067] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the cargo accumulation information generation method of some embodiments of the present disclosure can quickly and efficiently determine the cargo accumulation situation corresponding to the cargo accumulation area. Specifically, the reason why the relevant cargo accumulation situation is not fast and efficient is that the use of a large visual model requires high computing power, and must be deployed in the cloud, consuming a large communication bandwidth. In addition, it is necessary to manually label the cargo accumulation area, wasting a lot of manpower and material resources. Based on this, the cargo accumulation information generation method of some embodiments of the present disclosure first obtains a target shooting image corresponding to the cargo accumulation area, and then performs content analysis on the picture in the shooting picture to accurately generate cargo accumulation information. Here, by shooting images, the problem of inaccurate determination caused by the inability to form a global field of view in manual cargo accumulation determination can be avoided. Then, the above-mentioned target shooting image is subjected to edge detection processing to generate an edge detection image to obtain edge feature information. Here, by edge feature information, the pixel block set related to the piled goods can be accurately determined later. Then, by using a clustering algorithm, the pixel block set related to the piled goods can be accurately and quickly determined from the above-mentioned edge detection image. Finally, according to the total area of ​​the pixel blocks corresponding to the above pixel block set and the total area of ​​the pixels corresponding to the above edge detection image, the cargo accumulation information corresponding to the above cargo accumulation area is accurately generated. In summary, through edge detection processing and clustering algorithm, the cargo accumulation situation corresponding to the cargo accumulation area can be determined quickly and efficiently without using a neural network model and being able to be deployed on the edge and the camera at the same time, saving communication bandwidth and not wasting high computing power.

[0068] Further references Figure 4 , shows a process 400 of another embodiment of the method for generating cargo accumulation information according to the present disclosure. The method for generating cargo accumulation information comprises the following steps:

[0069] Step 401, obtaining a target shot image corresponding to the cargo stacking area.

[0070] Step 402: perform edge detection processing on the above-mentioned target captured image to generate an edge detection image.

[0071] Step 403: Perform a dilation operation and / or an erosion operation on the edge detection image to generate a processed image.

[0072] In some embodiments, an execution entity (e.g. Figure 1The electronic device 101 shown can perform a dilation operation and / or an erosion operation on the edge detection image to generate a processed image.

[0073] As an example, first, the execution subject may perform a dilation operation on the edge detection image to obtain a dilated image, and then perform an erosion operation on the dilated image to generate a processed image.

[0074] As an example, see Figure 5 , shows a schematic diagram of the processed image.

[0075] Step 404 , filter out pixel points whose corresponding pixel values ​​are the target values ​​from the processed image to obtain a pixel point set.

[0076] In some embodiments, the execution subject may filter out pixel points whose corresponding pixel values ​​are target values ​​from the processed image to obtain a pixel point set. The target value may be a value corresponding to a black pixel value. That is, the target value may be a value of 0. That is, the pixel points in the pixel point set are all pixel points with black pixel values.

[0077] Step 405: Generate the pixel block set based on the pixel point set using the clustering algorithm.

[0078] In some embodiments, the execution entity may generate the pixel block set based on the pixel point set using the clustering algorithm.

[0079] As an example, the execution entity may input the pixel point set into a clustering algorithm to generate a pixel block set according to the pixel point position and pixel value corresponding to each pixel point.

[0080] In some optional implementations of some embodiments, the step of generating the pixel block set according to the pixel point set by using the clustering algorithm may include the following steps:

[0081] In the first step, the above clustering algorithm is used to perform pixel clustering processing on each pixel in the above pixel set to generate an initial pixel block set. In which, each pixel in the initial pixel block can be in the same pixel cluster. Each pixel in the initial pixel block represents the same object. In which, the pixel block color corresponding to the initial pixel block is black.

[0082] As an example, the execution entity may input each pixel point in the pixel point set into the clustering algorithm to generate an initial pixel block set according to the pixel point position and pixel value corresponding to each pixel point.

[0083] In the second step, the initial pixel blocks whose corresponding pixel blocks are larger than the preset cargo area are removed from the above-mentioned initial pixel block set to obtain a first removed pixel block set. The preset cargo area may be a preset area value. The preset cargo area indicates that the area size has exceeded the area size of conventional cargo. That is, the initial pixel blocks larger than the preset cargo area may be independent black pixel blocks formed by blank areas other than cargo or corresponding areas such as conveyor belts.

[0084] The third step is to generate the above pixel block set based on the above first removed pixel block set. The first removed pixel block set may be a pixel block set from which pixel blocks corresponding to large areas irrelevant to the goods have been removed.

[0085] In some optional implementations of some embodiments, generating the pixel block set according to the first removed pixel block set may include the following steps:

[0086] The first step is to determine the pixel block area corresponding to each pixel block in the above-mentioned first removed pixel block set to obtain a pixel block area set.

[0087] The second step is to sort the areas of the pixel blocks in the above pixel block area set to generate a pixel block area sequence.

[0088] As an example, the execution subject may sort the areas of the respective pixel blocks in the pixel block area set in the order of small to large pixel block areas to generate a pixel block area sequence.

[0089] The third step is to determine the pixel block area at the area change inflection point in the above pixel block area sequence as the inflection point pixel block area. The area change inflection point can represent the inflection point where a large area change suddenly occurs in the pixel block area sequence.

[0090] As an example, for each pixel block area in the pixel block area sequence, first, determine the adjacent pixel block area group corresponding to the pixel block area. Then, determine the area difference between the pixel block area and each adjacent pixel block area in the adjacent pixel block area group to obtain an area difference group. Next, determine the difference between each area difference in the area difference group as the area change difference. Filter out the pixel block area with the largest corresponding area change difference from the pixel block area sequence as the inflection point pixel block area. For the first pixel block area in the pixel block area sequence, the adjacent pixel block area at the left position corresponding to the first pixel block area can be a preset first value. For the last pixel block area in the pixel block area sequence, the adjacent pixel block area at the right position corresponding to the last pixel block area can be a preset second value. Among them, the inflection point pixel block area can represent the maximum area value of the piled goods. That is, the pixel block exceeding the inflection point pixel block area is determined as not the pixel block corresponding to the piled goods.

[0091] The fourth step is to remove pixel blocks whose corresponding pixel block areas are larger than the inflection point pixel block area from the first removed pixel block set to obtain a second removed pixel block set.

[0092] The fifth step is to generate the above pixel block set based on the above second removed pixel block set.

[0093] As an example, the execution subject may determine pixel blocks in a regular cargo stacking range from the second removed pixel block set to obtain a pixel block set, wherein the regular cargo stacking range may be a stacking area where cargo is usually stacked.

[0094] As another example, the execution subject may mark each pixel block in the second removed pixel block set as a white pixel block to be combined with each original white pixel block in the initial pixel block set to generate a pixel block set, wherein each original white pixel block may be each pixel block representing the piled goods.

[0095] In some optional implementations of some embodiments, generating the pixel block set according to the second removed pixel block set may include the following steps:

[0096] The first step is to obtain at least one historical shot image. The historical shot image may be a shot image taken at a historical time. For example, the historical shot image may be an image taken 3 seconds before the corresponding shooting time of the target shot image.

[0097] In the second step, a pixel block set related to the piled goods in each of the at least one historical shot image is determined as a historical pixel block set, thereby obtaining at least one historical pixel block set. In practice, the method for generating the pixel block set related to the piled goods in each historical shot image can refer to the method for generating the pixel block set related to the piled goods.

[0098] The third step is to determine the intersecting pixel block set between the at least one historical pixel block set and the second removed pixel block set, wherein the intersecting pixel block may be a pixel block formed by the same pixel points between multiple pixel blocks.

[0099] As an example, first, the execution subject may determine a set of repeated pixel points between each pixel point in at least one historical pixel block set and each pixel point in the second removed pixel block set. Then, pixel blocks whose formed pixel blocks have an area greater than a preset area are selected from the repeated pixel point set as intersecting pixel blocks to obtain an intersecting pixel block set.

[0100] The fourth step is to remove the at least one intersecting pixel block set from the second removed pixel block set to obtain the pixel block set.

[0101] In some optional implementations of some embodiments, the determining of the pixel block area at the inflection point of area change in the pixel block area sequence as the inflection point pixel block area may include the following steps:

[0102] The first step is to generate a pixel block area curve for the above pixel block area sequence, wherein the pixel block area curve can represent the trend of pixel block area size changes.

[0103] As an example, the execution subject may draw a pixel block area curve for the pixel block area sequence by using the pixel block identifier corresponding to the pixel block as the horizontal coordinate and the pixel block area as the vertical coordinate.

[0104] The second step is to determine the inflection point in the pixel block area curve by a straight line fitting curve method, wherein the straight line fitting curve method may be an elbow method.

[0105] Here, the elbow method is used to select certain candidate points to divide the curve into two segments, and two straight lines are used to fit them respectively, and finally the candidate point corresponding to the result with the smallest fitting error is selected. The pixel block area corresponding to the candidate point is determined as the inflection point pixel block area.

[0106] As an example, Figure 6 A schematic diagram showing curve fitting using two straight lines using the elbow method.

[0107] The third step is to determine the pixel block area corresponding to the inflection point as the pixel block area of ​​the inflection point.

[0108] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the cargo accumulation information generation method in some corresponding embodiments can effectively solve the problem that the contours of some cargoes do not form a closed edge curve due to inaccurate edge detection through corrosion operations and / or expansion operations. After the expansion operations and / or corrosion operations, the contour curves of these cargoes can be closed, so as to facilitate the subsequent accurate generation of pixel block sets.

[0109] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device for generating cargo accumulation information. Figure 2 Corresponding to the method embodiments shown, the cargo accumulation information generating device can be specifically applied to various electronic devices.

[0110] like Figure 7As shown, a cargo accumulation information generating device 700 includes: an acquisition unit 701, a processing unit 702, a determination unit 703 and a generation unit 704. The acquisition unit 701 is configured to acquire a target shot image corresponding to a cargo accumulation area; the processing unit 702 is configured to perform edge detection processing on the target shot image to generate an edge detection image; the determination unit 703 is configured to determine a pixel block set related to the accumulated cargo from the edge detection image using a clustering algorithm; the generation unit is configured to generate cargo accumulation information corresponding to the cargo accumulation area according to the total area of ​​pixel blocks corresponding to the pixel block set and the total area of ​​pixels corresponding to the edge detection image.

[0111] In some optional implementations of some embodiments, the determination unit 703 can be further configured to: perform a dilation operation and / or an erosion operation on the above-mentioned edge detection image to generate a processed image; filter out pixel points whose corresponding pixel values ​​are target values ​​from the above-mentioned processed image to obtain a pixel point set; and generate the above-mentioned pixel block set based on the above-mentioned pixel point set using the above-mentioned clustering algorithm.

[0112] In some optional implementations of some embodiments, the determination unit 703 may be further configured to: perform pixel clustering processing on each pixel point in the above pixel point set using the above clustering algorithm to generate an initial pixel block set; remove initial pixel blocks whose corresponding pixel block areas are larger than a preset cargo area from the above initial pixel block set to obtain a first removed pixel block set; and generate the above pixel block set based on the above first removed pixel block set.

[0113] In some optional implementations of some embodiments, the determination unit 703 can be further configured to: determine the pixel block area corresponding to each pixel block in the above-mentioned first removed pixel block set to obtain a pixel block area set; sort the areas of each pixel block in the above-mentioned pixel block area set to generate a pixel block area sequence; determine the pixel block area that is the inflection point of area change in the above-mentioned pixel block area sequence as the inflection point pixel block area; remove pixel blocks whose corresponding pixel block areas are greater than the above-mentioned inflection point pixel block area from the above-mentioned first removed pixel block set to obtain a second removed pixel block set; generate the above-mentioned pixel block set based on the above-mentioned second removed pixel block set.

[0114] In some optional implementations of some embodiments, the determination unit 703 can be further configured to: acquire at least one historical shot image; determine a set of pixel blocks related to the stacked goods in each of the at least one historical shot image as a historical pixel block set; determine an intersecting pixel block set between the historical pixel block set and the second removed pixel block set to obtain at least one intersecting pixel block set; remove the at least one intersecting pixel block set from the second removed pixel block set to obtain the pixel block set.

[0115] In some optional implementations of some embodiments, the determination unit 703 can be further configured to: generate a pixel block area curve for the above-mentioned pixel block area sequence; determine the inflection point in the above-mentioned pixel block area curve by means of a straight line fitting curve; and determine the pixel block area corresponding to the above-mentioned inflection point as the above-mentioned inflection point pixel block area.

[0116] In some optional implementations of some embodiments, the generation unit 704 may be further configured to: determine the area difference between the total area of ​​pixel blocks corresponding to the above-mentioned pixel block set and the total area of ​​pixels corresponding to the above-mentioned edge detection image; and determine the area ratio between the above-mentioned area difference and the total area of ​​pixels corresponding to the above-mentioned edge detection image as the above-mentioned cargo stacking information.

[0117] It is understandable that the units recorded in the cargo accumulation information generating device 700 are similar to those in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the cargo accumulation information generating device 700 and the units included therein, and will not be described in detail here.

[0118] Reference below Figure 8 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)800. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0119] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory 802 or a program loaded from a storage device 808 into a random access memory 803. Various programs and data required for the operation of the electronic device 800 are also stored in the random access memory 803. The processing device 801, the read-only memory 802, and the random access memory 803 are connected to each other via a bus 804. An input / output interface 805 is also connected to the bus 804.

[0120] Typically, the following devices may be connected to the input / output interface 805: an input device 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0121] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a read-only memory 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0122] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0123] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0124] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a target shot image corresponding to the cargo stacking area; performs edge detection processing on the target shot image to generate an edge detection image; determines a pixel block set related to the stacked cargo from the edge detection image; and generates cargo stacking information corresponding to the cargo stacking area according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image.

[0125] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a processing unit, a determination unit, and a generation unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring the height and width of the first target image".

[0128] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0129] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned methods for generating cargo accumulation information when executed by a processor.

[0130] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A method for generating cargo accumulation information, comprising: Obtain the target shooting image corresponding to the cargo stacking area; Performing edge detection processing on the target captured image to generate an edge detection image; Using a clustering algorithm, determining a set of pixel blocks related to the stacked goods from the edge detection image; The cargo accumulation information corresponding to the cargo accumulation area is generated according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image.

2. The method according to claim 1, wherein: The method of using a clustering algorithm to determine a pixel block set related to the piled goods from the edge detection image includes: Performing a dilation operation and / or an erosion operation on the edge detection image to generate a processed image; Filter out pixel points whose corresponding pixel values ​​are target values ​​from the processed image to obtain a pixel point set; The pixel block set is generated according to the pixel point set using the clustering algorithm.

3. The method according to claim 2, wherein: The step of generating the pixel block set by using the clustering algorithm according to the pixel point set includes: Using the clustering algorithm, performing pixel clustering processing on each pixel point in the pixel point set to generate an initial pixel block set; Removing the initial pixel blocks whose corresponding pixel blocks have an area greater than a preset cargo area from the initial pixel block set to obtain a first pixel block set after removal; The pixel block set is generated according to the first removed pixel block set.

4. The method according to claim 3, wherein: The step of generating the pixel block set according to the first removed pixel block set comprises: Determine the pixel block area corresponding to each pixel block in the first removed pixel block set to obtain a pixel block area set; sorting the areas of the respective pixel blocks in the pixel block area set to generate a pixel block area sequence; Determine the pixel block area at the inflection point of area change in the pixel block area sequence as the inflection point pixel block area; Remove pixel blocks whose corresponding pixel blocks have an area greater than that of the inflection point pixel blocks from the first removed pixel block set to obtain a second removed pixel block set; The pixel block set is generated according to the second removed pixel block set.

5. The method according to claim 4, wherein: The step of generating the pixel block set according to the second removed pixel block set comprises: Acquiring at least one historically captured image; Determine a pixel block set related to the stacked goods in each of the at least one historical shot image as a historical pixel block set, and obtain at least one historical pixel block set; Determine an intersection pixel block set between the at least one historical pixel block set and the second removed pixel block set; The intersecting pixel block set is removed from the second removed pixel block set to obtain the pixel block set.

6. The method according to claim 4, wherein: The step of determining the pixel block area at the inflection point of area change in the pixel block area sequence as the inflection point pixel block area comprises: generating a pixel block area curve for the pixel block area sequence; Determine the inflection point in the pixel block area curve by means of a straight line fitting curve; The pixel block area corresponding to the inflection point is determined as the inflection point pixel block area.

7. The method according to claim 1, wherein: The generating of cargo accumulation information corresponding to the cargo accumulation area according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image comprises: Determine an area difference between a total area of ​​pixel blocks corresponding to the pixel block set and a total area of ​​pixels corresponding to the edge detection image; The area ratio between the area difference and the total area of ​​pixels corresponding to the edge detection image is determined as the cargo accumulation information.

8. A device for generating cargo accumulation information, comprising: An acquisition unit is configured to acquire a target photographed image corresponding to the cargo stacking area; a processing unit configured to perform edge detection processing on the target captured image to generate an edge detection image; A determination unit configured to determine a pixel block set related to the stacked goods from the edge detection image using a clustering algorithm; The generating unit is configured to generate cargo accumulation information corresponding to the cargo accumulation area according to the total area of ​​the pixel blocks corresponding to the pixel block set and the total area of ​​the pixels corresponding to the edge detection image.

9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.