Counting verification device, counting system and counting method

By combining image recognition counting and weighing counting, the counting error is determined and the mass distribution information is updated, which solves the problem of insufficient counting accuracy in the existing technology and achieves more accurate item counting.

CN112307828BActive Publication Date: 2024-09-10METTLER TOLEDO (CHANGZHOU) MEASUREMENT TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910700271.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-31
Publication Date
2024-09-10
Estimated Expiration
2040-03-08

AI Technical Summary

Technical Problem

Existing weighing counting and image recognition counting have problems with accuracy. They are affected by the pre-stored average weight and item distribution status, resulting in inaccurate counting results.

Method used

Combining image recognition counting and weighing counting, the judgment unit determines whether the number of image recognition counts is within the counting error range of the weighing count. If so, confirm the counting result, otherwise re-carry out the image recognition counting and update the pre-stored mass distribution. information to improve average weight accuracy.

Benefits of technology

Through double counting verification, the deficiencies of weighing counting and image recognition counting are overcome, the accuracy and reliability of counting results are improved, and the counting results are ensured to be consistent with the actual situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112307828B
    Figure CN112307828B
Patent Text Reader

Abstract

The present invention provides a counting verification device, a counting system and a counting method, wherein the counting verification device comprises: a processing unit for performing image recognition counting on the image of the counted object; a calculation unit for weighing and counting according to the weighed total weight of the counted object and pre-stored mass distribution information; a judgment unit for judging whether the image recognition count number is within the counting error range of the weighing count number according to the mass distribution information; if so, judging the image recognition count number as the count number of the counted object, otherwise the processing unit performs image recognition counting again. The counting verification device, the counting system and the counting method can improve the accuracy of object counting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of counting technology, and in particular to a counting verification device, a counting system and a counting method. Background Art

[0002] Item counting is widely used in production statistics, packaging operations, etc. in various industries such as food, medicine, daily chemicals, hardware, etc. Compared with traditional manual counting, the automatic counting system has high efficiency and accuracy and is suitable for batch industrial operations.

[0003] The principle of weighing and counting is to weigh the total weight of a number of items, and then divide the total weight of the items by the average weight of the items of the same type measured in advance. For weighing and counting, it is necessary to obtain the average weight of the items of the same type. Therefore, the accuracy of weighing and counting will be affected by the pre-stored average weight.

[0004] The average weight of this type of items is a statistic of historical average weight data, and even under the same production process, the average weight of products produced in different batches may be different. Therefore, whether the weight distribution in the statistical data is the same as the weight distribution of the currently counted products will affect the accuracy of the weighing and counting.

[0005] Image counting uses image recognition technology to obtain images of the objects being counted, and then processes the images through image recognition models to finally calculate the counting results. However, image counting will be affected by factors such as the dispersion of the objects being counted. If the objects being counted touch or overlap each other, the accuracy of the counting results will also be affected. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a counting system which can improve the accuracy of object counting in view of the problems existing in the existing weighing counting and image recognition counting.

[0007] In order to solve the above technical problems, the present invention provides a counting verification device, including: a processing unit, used to perform image recognition counting on the image of the counted object; a calculation unit, used to weigh and count according to the total weight of the counted object and pre-stored mass distribution information; a judgment unit, used to judge whether the image recognition count number is within the counting error range of the weighing count number according to the mass distribution information; if so, determine that the image recognition count number is the count number of the counted object, otherwise the processing unit re-performs image recognition counting.

[0008] Preferably, the calculation unit is further configured to calculate the average weight AW=AW of the counted objects when the determination result of the judgment unit is yes. old +K×(AW old-AW new ), and update the pre-stored mass distribution information; wherein, W is the total weight of the object being counted, N is the number of image recognition counts of the object being counted; AW old is the original average weight obtained according to the mass distribution information, K is the preset convergence coefficient, AW new is the average weight of the objects counted.

[0009] Preferably, the counting error of the weighing count number includes the counting error allowed by the statistical error, and the counting error allowed by the statistical error is: The method of judging whether the number of image recognition counts is within the counting error range of the weighing counts includes: calculating whether N′ falls within ; wherein A is a preset credibility multiple index, σ is a standard deviation obtained according to the mass distribution information, N is the number of image recognition counts of the counted object, AW is the original average weight obtained according to the mass distribution information, and N′ is the number of weighing counts of the counted object.

[0010] Preferably, the counting error of the weighing count number also includes the allowable counting error of the weighing error, and the allowable counting error of the weighing error is: ±C / AW; the determination of whether the image recognition count number is within the counting error range of the weighing count number includes: calculating whether N′ falls within Within the range of; where C is the weighing accuracy error of the weighing equipment.

[0011] In order to solve the above-mentioned counting problem, the present invention also discloses a counting system, including the counting verification device as mentioned above, and also including: a camera device for obtaining an image of the counted object; a weighing device for obtaining the total weighed weight of the counted object; and a storage device for storing the mass distribution data of the counted object.

[0012] Preferably, the counting system further comprises: a vibration device for vibrating the placement platform of the counted objects before the processing unit re-performs the image recognition counting.

[0013] Preferably, the placement platform for the counted objects is provided with a plurality of grooves suitable for the counted objects to fall into, or is provided with a plurality of protrusions suitable for separating the counted objects.

[0014] In order to solve the above technical problems, the present invention also discloses a counting method, including: obtaining an image of an object to be counted, and identifying the number of objects to be counted in the image; weighing and counting the objects to be counted; judging whether the image count number of the counted objects is within the counting error range of the weighing count number based on pre-stored mass distribution information; if so, taking the image count number as the counting result of the counted objects; if not, re-performing image recognition counting.

[0015] Preferably, the counting method described above, after determining that the number of image counts of the counted object is within the counting error range of the weighing count number, further comprises: calculating the average weight AW of the counted object = AW old +K×(AW old -AW new ), and update the pre-stored mass distribution information; wherein, AW old is the original average weight obtained according to the mass distribution information, K is the preset convergence coefficient, AW new is the average weight of the objects being counted, W is the total weight of the objects being counted, and N is the number of objects being counted by image recognition.

[0016] Preferably, the counting error of the weighing count number includes the counting error allowed by the statistical error, and the counting error allowed by the statistical error is: The method of judging whether the number of image recognition counts is within the counting error range of the weighing counts includes: calculating whether N′ falls within ; wherein A is a preset credibility multiple index, σ is a standard deviation obtained according to the mass distribution information, N is the number of image recognition counts of the counted object, AW is the original average weight obtained according to the mass distribution information, and N′ is the number of weighing counts of the counted object.

[0017] Preferably, the counting error of the weighing count number also includes the allowable counting error of the weighing error, and the allowable counting error of the weighing error is: ±C / AW; the determination of whether the image recognition count number is within the counting error range of the weighing count number includes: calculating whether N′ falls within Within the range of; where C is the weighing accuracy error of the weighing equipment.

[0018] Preferably, the above counting method further comprises: vibrating the placement platform of the counted objects before re-performing the image recognition counting.

[0019] The positive and progressive effects of the present invention are:

[0020] The counting system of the present invention performs counting verification by combining the two counting methods of image recognition counting and weighing counting. On the one hand, the image recognition counting can reflect the actual situation that the current quality of the counted object changes with the production situation, thereby overcoming the problem of weighing counting. On the other hand, by using weighing counting as a comparison standard, it is possible to overcome the recognition errors that may exist in image recognition due to the influence of factors such as the dispersion state of the counted object, thereby ensuring the accuracy and reliability of the counting results.

[0021] Certain terms are used throughout the specification and claims to refer to specific system components. As will be appreciated by those skilled in the art, different objects may refer to the same component by different names. Components with different names but the same functions are not distinguished herein and are all within the scope of protection of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of the structure of a counting system according to an embodiment of the present invention;

[0023] Figure 2 The present invention is a flowchart of a counting method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0025] Example 1

[0026] When the packaging production line performs counting packaging, a certain number of products to be packaged are successively transported to the counting system through the conveyor belt, and the counting system performs weighing and counting. Figure 1 As shown, the counting system includes: a scale, a camera, a counting verification device, a storage device and a vibration device. Among them, the counting verification device includes a processing unit, a calculation unit and a judgment unit. The storage device stores the mass distribution information of various types of products. The mass distribution information is statistical data information formed based on the weight data distribution of the product collected from the production process, such as the average weight of the product, and the standard deviation and other data, reflecting the production weight fluctuation of the product.

[0027] The counting system takes an image of the batch of products through the camera. After the counting and verification device obtains the captured image, the processing unit applies image recognition technology and performs image processing on the acquired image through the image recognition model of the detected product to identify the number of products in the image, which may include: grayscale processing of the acquired image and image enhancement through median filtering to improve image clarity and image quality. Then, by binarizing and thresholding the image, the enhanced image obtained in the previous step is converted into a black and white binary image, so that a clearer edge contour line can be obtained. At the same time, image segmentation is performed to extract the target features required for identification. Finally, after the edge of the product is identified by an edge detection algorithm, such as the Canny edge detection operator, the counting result is calculated by the recognition function, such as using the Bwlabel function to automatically identify and calculate the number of connected domains in the image, thereby obtaining the image count value N.

[0028] The counting system weighs the product to be packaged by a scale to obtain the total weight W of the product to be packaged, and at the same time obtains the pre-stored average weight AW of the product in the storage device, and then the calculation unit calculates the weighing and counting result of the product.

[0029] The counting system determines whether the difference between the image count N and the weighing count N' is within the counting error range through the judgment unit. If the image count number N and the weighing count number N' of the product are significantly different and exceed the counting error range determined by the standard deviation data of the mass distribution information of the product, the judgment unit determines that there is a counting error in the image counting. For example, the number of counts obtained by weighing is 30, and the counting error range is determined to be ±2, while the number of counts obtained by image counting is 26, then the image counting error is determined. At this time, the placement platform can be vibrated by the vibration device to make the products to be packaged in a scattered state, or an error prompt can be given through the prompt device on the packaging production line, and the operator can directly manually flatten the products on the placement platform so that the products are not in contact with each other, and then perform image recognition counting, and verify with the weighing counting results.

[0030] The counting error of the weighing count number may include the counting error allowed by the statistical error and the counting error allowed by the weighing error. Since the mass distribution information is only statistical analysis data, the same type of components will have a certain objective error with the weighing mean AW during production. Therefore, the calculation module of the object recognition data processing device obtains the statistical standard deviation σ based on the mass distribution information of the target component; at the same time, based on the preset credibility multiple index A, the error range ±Aσ of a single component is obtained by the credibility multiple index A×standard deviation σ. Then, by calculating the error range×image recognition count value N, that is, ±AσN, the error range of a certain number of captured components is obtained, and finally, Get the counting error allowed due to statistical error.

[0031] At the same time, considering that the scale as a weighing device will itself have certain equipment measurement errors in weight measurement, the calculation module obtains the weighing accuracy error C of the scale according to the specification parameters of the scale in the storage device. For example, if the accuracy error C of the scale is 0.05g, it is ±0.05g, and then further calculates that the allowable counting error due to the weighing error of the weighing device itself is: ±C / AW.

[0032] The method of judging whether the number of image recognition counts is within the counting error range of the weighing counts includes: calculating whether N' falls within within the scope of In this formula, if the count number N of image recognition is a true value, then the formula is established, so the count number N of image recognition can be verified. If the formula is established, it is determined that the image recognition count number is within the counting error range of the weighing count number; otherwise, it is determined to be outside the counting error range.

[0033] If the image count number N of the product is within the error range of the weighing count number N', then the image count number N is determined to be the number of the product, and it is detected whether the image count number N reaches the preset standard packaging number. If it reaches it, the packaging production line will package the number of objects to be packaged. If it has not reached it, wait for the subsequent products to be added through the conveyor belt before counting and calculating.

[0034] This embodiment 1 performs double counting verification on the items to be weighed through image recognition counting and weighing counting, so that the results of image counting or weighing counting can be verified, which not only avoids the problem that the detection counting performance of image recognition counting is affected by the scattering state of the object, but also avoids the weighing counting being unable to be updated in real time according to changes in product production conditions resulting in changes in product weight distribution data, thereby ensuring the accuracy of counting results in packaging production.

[0035] It can be understood by those skilled in the art that the counting system of this embodiment 1 can be applied not only to the packaging counting operation of products, but also to other scenarios where items need to be counted and counted, and perform double counting verification of image counting and weighing counting, which also falls within the scope of protection of the present invention.

[0036] Example 2

[0037] After the production line completes the production of a batch of products, the batch of products is transferred to the counting system, which weighs and counts the batch of products to calculate its average weight, and then updates the pre-stored average weight of the product to ensure the accuracy and real-time performance of the average weight data. The counting system includes: a scale, a camera, a counting verification device, a storage device, and a vibration device. Among them, the counting verification device includes a processing unit, a judgment unit, and a calculation unit. The storage device stores the mass distribution information of various types of products. The mass distribution information is statistical data information formed based on the weight data distribution of the product collected from the production process, such as the average weight of the product, and standard deviation data, which reflects the production weight fluctuation of this component.

[0038] The product placement platform is provided with a plurality of grooves. The counting system firstly vibrates the placement platform where the batch of products are placed through the vibration device, so that the products no longer touch each other due to the vibration, and the grooves provided on the placement platform can fall into the grooves when a single product moves due to the vibration, further avoiding the contact between them. After the vibration is completed, the counting system performs subsequent identification and counting of the product.

[0039] As a variation, a plurality of protrusions may be provided on the platform on which the products are placed, so that when the vibration device is vibrating and the products are moved by the vibration, the products can also be separated and scattered from each other.

[0040] The counting system takes an image of the batch of products through the camera. After the counting verification device obtains the captured image, the processing unit applies image recognition technology and processes the acquired image through the image recognition model of the detected product to identify the number of products in the image, including: grayscale processing of the acquired image and image enhancement through median filtering to improve image clarity and image quality. Then, the enhanced image obtained in the previous step is converted into a black and white binary image by binarizing and thresholding the image, so that a clearer edge contour line can be obtained. At the same time, image segmentation is performed to extract the target features required for identification. Finally, after the edge detection algorithm, such as the Canny edge detection operator, completes the edge recognition of the product, the counting result is calculated through the recognition function, such as using the Bwlabel function to automatically identify and calculate the number of connected domains in the image.

[0041] The counting system weighs the product to be packaged by a scale to obtain the total weight W of the product to be packaged, and at the same time obtains the original average weight AWold of the product pre-stored in the storage device, and then calculates the weighing and counting result of the product. The counting system determines whether the difference between the image count number N and the weighing count number N′ is within the counting error range through the judgment unit. If the image count number N and the weighing count number N′ of the product are significantly different, for example, exceeding the counting error range determined by the standard deviation data of the mass distribution information of the product, it is determined that the image counting is abnormal. For example, the number of counts obtained by weighing is 30, and the counting error range is determined to be ±2 according to the standard deviation σ, while the number of counts obtained by image counting is 26, then the image counting is determined to be wrong. At this time, the placement platform can be vibrated again by the vibration device, or the operator can directly manually flatten the products on the placement platform so that the products are not in contact with each other, and then re-perform image recognition counting.

[0042] If the judgment unit determines that the image count N is within the counting error range of the weighing count N′, the calculation unit calculates the average weight of the batch of products based on the obtained weight W of the batch of products and the image count result N. And according to the average weight AW new , calculate the average weight AW of the type of product stored in the storage device, so that AW = AW old +K×(AW old -AW new ). Where K is a preset convergence coefficient. After calculating the average weight AW of the product of this type, the original average weight AW in the storage device is updated. old And the corresponding mass distribution information.

[0043] In this embodiment, the average weight AW old After the update, the counting system can calculate the number of weighing counts according to the latest average weight calculation AW when subsequently weighing and counting the products of the same type. In this way, it can be ensured that the average weight AW data will be updated in real time with the fluctuation of actual production, thereby improving the accuracy of weighing and counting.

[0044] It can be understood by those skilled in the art that Embodiment 2 and Embodiment 1 are based on the same inventive concept, and reference can be made to the corresponding contents of Embodiment 1 for Embodiment 2, and the two can be combined and supplemented with each other.

[0045] Example 3

[0046] A counting method of this embodiment can be applied to the counting system of the above-mentioned embodiment 1 or 2 to complete the counting statistics of the objects to be counted. Figure 2 As shown, the counting method includes:

[0047] Step S101, acquiring an image of an object to be counted.

[0048] The counting system uses a camera therein to take images of the batch of products. Before taking the images, the vibrating device of the counting system can first vibrate the placement platform of the counted objects so that the counted objects are scattered and not in contact with each other.

[0049] Step S102, identifying the number of counted objects in the counted object image.

[0050] After acquiring the captured image, the image recognition technology is applied to process the acquired image through the image recognition model of the detected product to identify the number of products in the image, such as grayscale processing of the acquired image and image enhancement through median filtering to improve image clarity and image quality. Then, the enhanced image obtained in the previous step is converted into a black and white binary image by binarization and threshold processing of the image, so that a clearer edge contour line can be obtained. At the same time, image segmentation is performed to extract the target features required for identification. Finally, after completing the edge recognition of the product through the edge detection algorithm, such as the Canny edge detection operator, the counting result is calculated through the recognition function, such as using the Bwlabel function to automatically identify and calculate the number of connected domains in the image to obtain the image count value N.

[0051] Step S103, weighing and counting the object to be counted.

[0052] The counting system weighs the product to be packaged by a scale to obtain the total weight W of the product to be packaged. At the same time, the mass distribution data of the product is pre-stored in the storage device of the counting system. Through the mass distribution data, corresponding statistical information can be obtained, such as the average weight AW and standard deviation σ of the counted object, so as to calculate the weighing and counting results of the product.

[0053] Step S104, determining whether the number of image counts of the counted object is within the counting error range of the weighing count number.

[0054] The standard deviation σ can be obtained according to the mass distribution information of the counted object, thereby determining the counting error, and comparing whether N is within the range of the counting error of N'. If yes, proceed to step S105, otherwise proceed to step S106.

[0055] Step S105: taking the number of counted images as the counting result of the counted object.

[0056] After determining to use the number of counted images as the final counting result, the packaging operation can be further performed as in Embodiment 1 or 2, or the average weight of the counted objects can be calculated to update the data.

[0057] Step S106, vibrating the placement platform, or prompting the user to flatten the object to be counted.

[0058] If the image count number N is not within the counting error range of the weighing count number N', there is a high probability that an error has occurred in the image count. At this time, the placement platform can be vibrated again by the vibration device, or a leveling prompt can be issued by the prompt device, and the operator can directly manually level the products on the placement platform so that the products do not contact each other, and then restart the image recognition counting from step S101.

[0059] This embodiment 3 is based on the same inventive concept as embodiments 1 and 2, so the content of this embodiment can also refer to the corresponding content of embodiments 1 and 2, which will not be repeated here.

[0060] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0061] Although the present invention has been described with reference to a number of current specific embodiments, those skilled in the art should recognize that the above embodiments are only used to illustrate the present invention, and various equivalent changes or substitutions may be made without departing from the spirit of the present invention. Therefore, any changes or modifications to the above embodiments within the spirit of the present invention will fall within the scope of the claims of this application.

Claims

1. A counting and verification device, characterized in that: include: A processing unit, used for performing image recognition and counting on images of objects to be counted; A calculation unit, used for weighing and counting according to the total weight of the object to be counted and the pre-stored mass distribution information; A judging unit, used to judge whether the number of counts by image recognition is within a counting error range of the number of weighing counts according to the mass distribution information; If yes, determining that the image recognition count is the count of the counted object, otherwise the processing unit performs image recognition count again; The mass distribution information is statistical data information formed based on the weight data distribution of products collected from the production process.

2. The counting and verification device according to claim 1, characterized in that: The calculation unit is further used to calculate the average weight AW=AW of the counted objects when the judgment result of the judgment unit is yes. old +K×(AW old -AW new ), and updating the pre-stored mass distribution information; in, W is the total weight of the object being counted, N is the number of image recognition counts of the object being counted; AW old is the original average weight obtained according to the mass distribution information, K is the preset convergence coefficient, AW new is the average weight of the objects counted.

3. The counting and verification device according to claim 1, characterized in that: The counting error of the weighing count number includes the counting error allowed by the statistical error, and the counting error allowed by the statistical error is: The method of judging whether the number of image recognition counts is within the counting error range of the weighing counts includes: calculating whether N' falls within within the scope of Wherein, A is a preset credibility multiple index, σ is a standard deviation obtained according to the mass distribution information, N is the number of image recognition counts of the counted object, AW is the original average weight obtained according to the mass distribution information, and N' is the number of weighing counts of the counted object.

4. The counting and verification device according to claim 3, characterized in that: The counting error of the weighing count number also includes an allowable counting error of the weighing error, and the allowable counting error of the weighing error is: ±C / AW; The method of judging whether the number of image recognition counts is within the counting error range of the weighing counts includes: calculating whether N' falls within within the scope of Wherein, C is the weighing accuracy error of the weighing equipment.

5. A counting system, characterized in that: The counting and verification device according to any one of claims 1 to 4 further comprises: A camera device, used to obtain images of objects to be counted; A weighing device, used to obtain the total weight of the counted object; The storage device is used to store the mass distribution data of the counted objects.

6. The counting system according to claim 5, characterized in that Also includes: The vibration device is used to vibrate the placement platform of the counted object before the processing unit re-performs image recognition counting.

7. The counting system according to claim 5, characterized in that The placement platform for the counted objects is provided with a plurality of grooves suitable for the counted objects to fall into, or is provided with a plurality of protrusions suitable for separating the counted objects.

8. A counting method, characterized in that: include: Acquire an image of the object to be counted, and identify the number of the objects to be counted in the image; Weigh and count the objects to be counted according to the total weight of the objects to be counted and the pre-stored mass distribution information; According to the pre-stored mass distribution information, it is determined whether the number of image counts of the counted object is within the counting error range of the weighing count number; If yes, the number of image counts is taken as the counting result of the counted object; if no, the image recognition counting is performed again; The mass distribution information is statistical data information formed based on the weight data distribution of products collected from the production process.

9. The counting method according to claim 8, characterized in that: After determining that the image count number of the counted object is within the counting error range of the weighing count number, it also includes: Calculate the average weight of the counted objects AW = AW old +K×(AW old -AW new ), and updating the pre-stored mass distribution information; in, AW old is the original average weight obtained according to the mass distribution information, K is the preset convergence coefficient, AW new is the average weight of the objects being counted, W is the total weight of the objects being counted, and N is the number of objects being counted by image recognition.

10. The counting method according to claim 8, characterized in that: The counting error of the weighing count number includes the counting error allowed by the statistical error, and the counting error allowed by the statistical error is: The method of judging whether the number of counts of the counted object by image recognition is within the counting error range of the weighing count includes: calculating whether N' falls within within the scope of Wherein, A is a preset credibility multiple index, σ is a standard deviation obtained according to the mass distribution information, N is the number of image recognition counts of the counted object, AW is the original average weight obtained according to the mass distribution information, and N' is the number of weighing counts of the counted object.

11. The counting method according to claim 10, characterized in that: The counting error of the weighing count number also includes an allowable counting error of the weighing error, and the allowable counting error of the weighing error is: ±C / AW; The method of judging whether the number of image recognition counts is within the counting error range of the weighing counts includes: calculating whether N' falls within within the scope of Wherein, C is the weighing accuracy error of the weighing equipment.

12. The counting method according to claim 8, characterized in that: Before re-performing image recognition counting, the method further includes: vibrating the placement platform of the counted object.