A material inventory method based on image processing

By performing brightness smoothing processing and similarity calculation on the images of materials in elevated three-dimensional warehouses, combined with the cargo target detection model, the problems of low efficiency, high cost and poor accuracy of material inventory in the prior art are solved, and high accuracy of material inventory under uneven lighting conditions are achieved.

CN113989207BActive Publication Date: 2025-03-14JIANGSU THINK TANK INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111226019.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-03-14
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

The prior art is inefficient and costly when inventorying materials in elevated three-dimensional warehouses, and cannot effectively distinguish the color and structural similarity of goods. Especially under uneven lighting conditions, the accuracy rate is extremely low.

Method used

The material inventory method based on image processing is adopted. By smoothing the brightness of the original picture and the inventory picture, the pixel value difference rate of R, G, and B channels is calculated, and the overall similarity is calculated using the cosine distance and structural similarity. The pre-established cargo target detection model is used to identify and compare the cargo position, type and shape size.

Benefits of technology

Effectively eliminate the impact of uneven lighting on the pixel value of the picture, accurately compare the color and structure of goods, improve the accuracy of inventory of materials in large and complex warehouses, and reduce the cost and time of manual inventory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989207B_ABST
    Figure CN113989207B_ABST
Patent Text Reader

Abstract

The invention discloses a material inventory method based on image processing, which belongs to the technical field of image processing and comprises: performing brightness smoothing processing on the original picture and the goods in the inventory picture, calculating the pixel value difference rate of the three channels R, G and B of the goods in the original picture and the inventory picture, and outputting the abnormal result of the inventory if the pixel value difference rate of any channel exceeds the set pixel threshold; expressing the original picture and the inventory picture as vectors, calculating the cosine distance and the structural similarity, and obtaining the overall similarity accordingly, and outputting the normal result of the inventory if the overall similarity exceeds the set similarity threshold, otherwise outputting the abnormal result of the inventory; eliminating the influence of uneven illumination on the pixel value of the picture, being able to compare the color of the goods, avoiding the situation that the dissimilar structure of the goods cannot be distinguished, being able to achieve the purpose of the material inventory of large and complex warehouses, reducing the money cost and time cost of manual inventory, and better meeting the needs of customers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a material inventory method based on image processing, belonging to the technical field of image processing. Background Art

[0002] At present, manual counting is usually used in the management of elevated warehouses. Due to the large warehouse area and the high height of the elevated warehouse, manual counting and management is not only inefficient, but also very time- and labor-intensive. At present, there are some automated inventory counting methods and devices, but these methods are still very different from manual inventory counting.

[0003] For example, the inventory counting method that finds the minimum circumscribed rectangle of the goods in the image and then compares the pixel values ​​can only determine whether the size of the goods is consistent, and whether the goods are rotated and offset, but cannot determine whether the color of the goods is consistent. For example, take the electrical cabinets in the power material storage industry as an example: the shapes of the electrical cabinets are generally the same, but there are many colors, and it is impossible to distinguish between goods of the same size but different types or dissimilar appearances. More importantly, the light intensity has a greater impact on this method. When the lighting of the two pictures is uneven, the accuracy of the tape counting results is extremely low. In summary, the inventory counting results obtained by this method are not reliable, and the accuracy is even lower in large warehouses with more complex material types, and the purpose of material inventory cannot be achieved at all. Summary of the invention

[0004] The purpose of the present invention is to provide a material inventory method based on image processing, which can eliminate the influence of uneven lighting on the pixel value of the image, can compare the color of the goods, avoid the situation where the dissimilar structures of the goods cannot be distinguished, can achieve the purpose of material inventory in large and complex warehouses, reduce the monetary cost and time cost of manual inventory, and better meet customer needs.

[0005] To achieve the above objectives, the present invention is implemented by adopting the following technical solutions:

[0006] The present invention provides a material inventory method based on image processing, comprising:

[0007] Perform brightness smoothing on the goods in the original image and the counted image, and calculate the pixel value difference rate of the three channels R, G, and B of the goods in the original image and the counted image. If the pixel value difference rate of any channel exceeds the set pixel threshold, the result of abnormal inventory counting is output;

[0008] The original image and the counted image are represented as vectors, and the cosine distance and structural similarity are calculated to obtain the overall similarity. If the overall similarity exceeds the set similarity threshold, the normal count result is output, otherwise the abnormal count result is output.

[0009] Furthermore, it also includes: using a pre-established cargo target detection model to identify and compare the location, existence, type, shape and size of the cargo in the original image and the inventory image, and if any of the above items does not meet the first preset requirement, outputting an abnormal inventory result.

[0010] Furthermore, the cargo target detection model is established by the following method:

[0011] Collect different warehouse images containing all types of goods, mark these images by type and location to form a training set, then use the existing target detection model to train the training set, save the trained target detection model, and obtain the cargo target detection model.

[0012] Furthermore, the image processing steps are also included:

[0013] The original images and inventory images are normalized and represented as vectors.

[0014] Furthermore, the cosine distance is calculated as follows:

[0015] The dot product between two vectors represented by the original image and the counted image is calculated, and the cosine distance is obtained through the dot product.

[0016] Furthermore, the structural similarity is calculated by using a SSIM algorithm.

[0017] Furthermore, the overall similarity is calculated as follows:

[0018] Sim=Aα+Bβ

[0019] Among them, Sim is the overall similarity, α is the cosine distance, β is the structural similarity, A is the cosine distance coefficient, B is the structural similarity coefficient, and A+B=1.

[0020] Furthermore, the brightness smoothing process includes: cutting out the goods in the original picture and the inventory picture, and performing a light balance process on the cut-out goods picture using an image white balance algorithm.

[0021] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0022] The material inventory method based on image processing provided by the present invention performs brightness smoothing processing on the goods in the original picture and the inventory picture, eliminates the influence of uneven illumination on the pixel value of the picture, and can compare the color of the goods; uses cosine distance and structural similarity to calculate the overall similarity, and also uses the structure of the goods as one of the reference factors for comparison, so as to avoid the situation where the dissimilar structures of the goods cannot be distinguished, and can achieve the purpose of material inventory in large and complex warehouses, reduce the monetary cost and time cost of manual inventory, and better meet customer needs;

[0023] The present invention provides a material inventory method based on image processing, which also includes using a pre-established cargo target detection model to identify and compare the location, type, shape and size of the cargo in the original image and the inventory image. The cargo target detection model can not only find the location of the cargo, but also identify the type of cargo, such as electrical cabinets and transformers in the power material storage industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The present invention provides a flowchart of a material inventory method based on image processing. DETAILED DESCRIPTION

[0025] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the protection scope of the present invention.

[0026] Embodiment 1

[0027] like Figure 1 As shown, the present invention provides a material inventory method based on image processing, comprising the following steps:

[0028] S1. Perform brightness smoothing on the goods in the original image and the counted image, calculate the pixel value difference rate of the three channels R, G, and B of the goods in the original image and the counted image, and output the abnormal result of the inventory if the pixel value difference rate of any channel exceeds the set pixel threshold;

[0029] S2. Represent the original image and the counted image as vectors, calculate the cosine distance and structural similarity, and obtain the overall similarity based on this. If the overall similarity exceeds the set similarity threshold, the normal count result is output, otherwise the abnormal count result is output.

[0030] Embodiment 2

[0031] An embodiment of the present invention provides a material inventory method based on image processing, and the specific technologies involved are digital image processing technology and target detection technology. The application scenario is warehouse material management. In the presence of image acquisition equipment such as hardware devices such as cameras and computer equipment, the present invention completes the warehouse material inventory by comparing the goods in two pictures. The two pictures, one is the original picture of the warehouse location placed in the database of the computer, and the other is the inventory picture of the warehouse location under the inventory state taken in order to complete the inventory.

[0032] Step 1: For large specialized warehouses, the types of goods stored are generally fixed. Collect a certain number of different warehouse location images containing all types of goods, annotate these images with types and locations to form a training set, and then use the target detection model to train these training sets so that the parameters in the target detection model can correctly identify all types of goods in the warehouse. Save the target detection model to obtain the cargo target detection model for subsequent use.

[0033] During the inventory process, the cargo target detection model is used to find the location of the cargo in the two images to be compared and identify the type. First, the presence and type of cargo in the two images are compared. If the first preset requirement is not met, that is, there is an inconsistent result (such as one image has cargo and the other does not) or the cargo type is inconsistent, the inventory result is directly determined to be abnormal and the abnormal inventory result is output. If the cargo presence results and cargo types of the two images are consistent, the shape and size of the cargo in the two images are compared. If the first preset requirement is not met, that is, the shape difference exceeds the set threshold, the result is reported to be abnormal and the abnormal inventory result is output. If the shape difference does not exceed the set threshold, go to step 2.

[0034] Step 2: The goods found in the original image and the inventory image are respectively captured, and the captured images are subjected to light balance processing using the image white balance algorithm to eliminate the impact of uneven lighting on the image pixel values. The pixel values ​​of the three channels R, G, and B of the screenshot images are extracted respectively, and then the pixel value difference rate of the three channels R, G, and B of the goods in the two images is calculated respectively. If the pixel value difference rate of any channel exceeds the set pixel threshold, the abnormal inventory result is output, otherwise, go to step 3.

[0035] The pixel value difference rate of the R channel is calculated as follows (the same applies to the G and B channels):

[0036] First, the average pixel value of the R channel of the image is obtained as sum of all pixels / num, and then the pixel value difference rate of the two images under the R channel is obtained as (average1-average2) / average2×100%, where sum of all pixels is the sum of the pixel values ​​of all pixels contained in the image under the R channel, num is the number of pixels, average1 is the pixel average of the counted image, and average2 is the pixel average of the original image.

[0037] Step 3: Normalize the captured image, then represent the image as a vector. Calculate the dot product between the two vectors to get the cosine distance α between the two images. Use the image SSIM (Structural Similarity) algorithm to calculate the structural similarity β of the goods in the two images to determine the degree of structural difference between the two goods. Use the cosine distance α and structural similarity β to get the overall similarity Sim.

[0038] Sim=Aα+Bβ, where A+B=1, A is the cosine distance coefficient, and B is the structural similarity coefficient. The values ​​of A and B need to be determined according to actual conditions.

[0039] Step 4: Set a similarity threshold for the overall similarity Sim. If the overall similarity Sim exceeds the similarity threshold, the result of the inventory count is determined to be normal and the normal result of the inventory count is output. Otherwise, the result of the inventory count is determined to be abnormal and the abnormal result of the inventory count is output.

[0040] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A material inventory method based on image processing, characterized in that: include: Perform brightness smoothing on the goods in the original image and the counted image, and calculate the pixel value difference rate of the three channels R, G, and B of the goods in the original image and the counted image. If the pixel value difference rate of any channel exceeds the set pixel threshold, the result of abnormal inventory counting is output; The original image and the counted image are represented as vectors, and the cosine distance and structural similarity are calculated to obtain the overall similarity. If the overall similarity exceeds the set similarity threshold, the normal count result is output, otherwise the abnormal count result is output; The cosine distance is calculated as follows: Calculate the dot product between two vectors represented by the original image and the counted image, and obtain the cosine distance through the dot product; The structural similarity is calculated by the SSIM algorithm; The overall similarity is calculated as follows: Sim = Aα + Bβ; Among them, Sim is the overall similarity, α is the cosine distance, β is the structural similarity, A is the cosine distance coefficient, B is the structural similarity coefficient, and A+B=1; The brightness smoothing process includes: cutting out goods from the original picture and the inventory picture, and performing light balance processing on the cut-out goods picture using an image white balance algorithm.

2. A material inventory method based on image processing according to claim 1, characterized in that: Also includes: The pre-established cargo target detection model is used to identify and compare the location, existence, type, shape and size of the cargo in the original image and the inventory image. If any of the above items does not meet the first preset requirement, the abnormal inventory result is output.

3. A material inventory method based on image processing according to claim 2, characterized in that: The cargo target detection model is established by the following method: Collect different warehouse images containing all types of goods, mark these images by type and location to form a training set, then use the existing target detection model to train the training set, save the trained target detection model, and obtain the cargo target detection model.

4. The material inventory method based on image processing according to claim 1 is characterized in that: It also includes the steps of image processing: The original images and inventory images are normalized and represented as vectors.

Citation Information

Patent Citations

  • Comprehensive image retrieval method based on colors and shapes

    CN104462481A

  • Machine vision algorithm for appearance inspection

    CN111739003A