A dispensing detection method, device, equipment and medium

By segmenting and moment calculating the product image after dispensing, combined with the expert system, automated dispensing detection is achieved, solving the problem of low efficiency of traditional manual detection, improving detection efficiency and reducing costs, and ensuring product quality.

CN115797271BActive Publication Date: 2025-10-03GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211439733.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-10-03
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Traditional dispensing quality inspection relies on manual judgment, which is inefficient and costly, and cannot effectively guarantee product quality.

Method used

By acquiring images of the product after dispensing, image segmentation is performed to extract the dispensing area, and image moments are calculated to determine the detection results, including features such as zero-order moment, center of mass, and intersection-over-union ratio. Combined with the expert system, processing suggestions are provided.

Benefits of technology

It realizes automated dispensing detection, improves detection efficiency, reduces labor costs, ensures product quality, and can adjust dispensing equipment parameters in time to avoid the outflow of unqualified products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797271B_ABST
    Figure CN115797271B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for detecting glue dispensing, comprising: obtaining an image of a product after glue dispensing; performing image segmentation on the product image to obtain a glue dispensing area; calculating an image moment of the glue dispensing area, and determining a glue dispensing detection result based on the image moment. In this way, the image of the product after glue dispensing is segmented to extract the glue dispensing area, and then the image moment of the glue dispensing area is calculated to obtain the image features of the glue dispensing area, thereby determining the glue dispensing detection result. Automatically detecting the glue dispensing area can improve detection efficiency, reduce labor costs, and ensure product quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of dispensing detection technology, and in particular to a dispensing detection method, device, equipment and medium. Background Art

[0002] With the rapid development of automation technology, automatic dispensing machines, as specialized equipment replacing manual dispensing, have been widely used in applications such as integrated circuits, semiconductor packaging, printed circuit boards, color LCD screens, electronic components (such as relays and speakers), electronic parts, and automotive parts. This significantly improves production efficiency, saves labor costs, and provides more stable dispensing quality than manual dispensing. However, limitations in dispensing machine technology often lead to product overflow, broken glue, or glue shortages. Failure to promptly detect these defective products can seriously impact product performance.

[0003] At present, traditional dispensing quality inspections are performed manually through judgment or random inspections, which has low inspection efficiency and high labor costs. Sometimes this step is even ignored, making it impossible to guarantee product quality. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a dispensing detection method, device, equipment and medium that can improve detection efficiency and reduce labor costs, thereby ensuring product quality. The specific solution is as follows:

[0005] In a first aspect, the present application discloses a dispensing detection method, comprising:

[0006] Get product images of the product after dispensing;

[0007] Performing image segmentation on the product image to obtain a dispensing area;

[0008] An image moment of the glue dispensing area is calculated, and a glue dispensing detection result is determined based on the image moment.

[0009] Optionally, calculating the image moment of the glue dispensing area and determining the glue dispensing detection result based on the image moment includes:

[0010] Calculating the zero-order moment of the binarized dispensing area to obtain a first zero-order moment;

[0011] If the first zero-order moment is smaller than the preset glue deficiency threshold, the glue dispensing detection result is determined to be glue deficiency; if the first zero-order moment is larger than the preset glue overflow threshold, the glue dispensing detection result is determined to be glue overflow.

[0012] Optionally, calculating the image moment of the glue dispensing area and determining the glue dispensing detection result based on the image moment includes:

[0013] Calculating the zero-order moment of the binarized dispensing area to obtain a first zero-order moment;

[0014] Calculating the zero-order moment of the grayscaled dispensing area to obtain a second zero-order moment;

[0015] Calculating the ratio of the second zero-order moment to the first zero-order moment to obtain a zero-order moment ratio;

[0016] If the zero-order moment ratio is within a preset threshold range, the glue dispensing detection result is determined to be that the glue thickness meets the standard; otherwise, the glue dispensing detection result is determined to be that the glue thickness does not meet the standard.

[0017] Optionally, calculating the image moment of the glue dispensing area and determining the glue dispensing detection result based on the image moment includes:

[0018] Calculate the first-order moment of the grayscaled dispensing area;

[0019] Calculating the zero-order moment of the grayscaled dispensing area to obtain a second zero-order moment;

[0020] Calculating the centroid of the dispensing area based on the first-order moment and the second zero-order moment;

[0021] If the distance between the centroid and the ideal centroid is greater than a preset distance threshold, the glue dispensing detection result is determined to be glue position deviation.

[0022] Optionally, before calculating the image moment of the glue spotting area and determining the glue spotting detection result based on the image moment, the method further includes:

[0023] Comparing the dispensing area with a standard dispensing area to obtain an intersection-over-union ratio between the dispensing area and the standard dispensing area;

[0024] It is determined whether the intersection-over-union ratio is less than a preset intersection-over-union ratio threshold value. If so, it is determined that the dispensing area does not meet the standard.

[0025] Optionally, after calculating the image moment of the glue spotting area and determining the glue spotting detection result based on the image moment, the method further includes:

[0026] The preset expert service logic is called and a processing suggestion is generated based on the dispensing detection result.

[0027] Optionally, calling a preset expert service logic and generating a processing suggestion based on the dispensing detection result includes:

[0028] The preset expert service logic is called, and the frequency of occurrence of any type of problem is determined based on the dispensing detection result. If the frequency exceeds the preset frequency threshold, a corresponding setting parameter modification suggestion is generated.

[0029] In a second aspect, the present application discloses a dispensing detection device, comprising:

[0030] An image acquisition module, used to acquire product images of the product after dispensing;

[0031] An image segmentation module, configured to segment the product image to obtain a dispensing area;

[0032] An image moment calculation module, used for calculating the image moment of the dispensing area;

[0033] The detection result determination module is used to determine the dispensing detection result based on the image moment.

[0034] In a third aspect, the present application discloses an electronic device, including a memory and a processor, wherein:

[0035] The memory is used to store computer programs;

[0036] The processor is used to execute the computer program to implement the aforementioned dispensing detection method.

[0037] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned dispensing detection method when executed by a processor.

[0038] It can be seen that the present application first obtains a product image of the product after gluing, and performs image segmentation on the product image to obtain the gluing area, then calculates the image moment of the gluing area, and determines the gluing detection result based on the image moment. In other words, the present application performs image segmentation on the product image of the product after gluing, extracts the gluing area, then calculates the image moment of the gluing area to obtain the image features of the gluing area, and then determines the gluing detection result. In this way, automatic detection of the gluing area can improve detection efficiency and reduce labor costs, thereby ensuring product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0040] Figure 1 This is a flow chart of a dispensing detection method disclosed in this application;

[0041] Figure 2 This is a specific dispensing detection schematic diagram disclosed in this application;

[0042] Figure 3 A specific dispensing detection flow chart disclosed in this application;

[0043] Figure 4 This is a structural schematic diagram of a dispensing detection device disclosed in this application;

[0044] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0046] Currently, traditional glue dispensing quality inspections rely on manual judgment or spot checks, which have low inspection efficiency and high labor costs. Sometimes, this step is even overlooked, making it impossible to guarantee product quality. To this end, this application provides a glue dispensing inspection solution that can improve inspection efficiency, reduce labor costs, and ensure product quality.

[0047] See also Figure 1 As shown, the embodiment of the present application discloses a dispensing detection method, comprising:

[0048] Step S11: Acquire a product image of the product after dispensing.

[0049] In one embodiment, a product image of the product after dispensing captured by an industrial camera can be obtained. In an embodiment of the present application, the industrial camera captures the product image of the product after dispensing during the operation of the automatic dispensing machine, and sends the product image to the host computer through the serial port. The dispensing detection of the present application can be executed in the host computer.

[0050] Step S12: performing image segmentation on the product image to obtain a glue dispensing area.

[0051] In a specific embodiment, before performing image segmentation on the product image, the product image may be preprocessed, and the preprocessing operation includes correction and / or denoising, etc. After the preprocessing operation, the product image is segmented to extract the glue dispensing area.

[0052] Step S13: Calculating the image moment of the glue-dispensing area, and determining the glue-dispensing detection result based on the image moment.

[0053] In one embodiment, the glue spotting area can be binarized, with the foreground target being 1 and the background being 0; if the first zero-order moment is less than a preset glue-deficient threshold, the glue spotting detection result is determined to be glue-deficient; if the first zero-order moment is greater than the preset glue-overflow threshold, the glue spotting detection result is determined to be glue-overflow; if the first zero-order moment is greater than or equal to the preset glue-deficient threshold and less than or equal to the preset glue-overflow threshold, the glue spotting detection result is determined to be no glue-overflow or glue-deficient. The calculation formula for the zero-order moment is:

[0054] m00=∫∫f(x,y)dxdy

[0055] Here, x and y represent the horizontal and vertical coordinates of the point, and f(x, y) is the pixel value of the pixel at that coordinate. It should be noted that for a binary image, its zero-order moment is the area of ​​the glue-dotted area. The size of this area is compared with the set threshold. If it is larger than the glue overflow threshold, it is determined to be glue overflow; if it is smaller than the glue deficiency threshold, it is determined to be glue deficiency. If the area size is within a reasonable threshold range, there is no glue overflow or glue deficiency.

[0056] Furthermore, in one embodiment, the glue spotting area can be binarized, and the zero-order moment of the binarized glue spotting area is calculated to obtain a first zero-order moment; the glue spotting area can be grayscaled, and the zero-order moment of the grayscale glue spotting area is calculated to obtain a second zero-order moment; the ratio of the second zero-order moment to the first zero-order moment is calculated to obtain a zero-order moment ratio; if the zero-order moment ratio is within a preset threshold range, the glue spotting detection result is determined to be that the glue thickness meets the standard; otherwise, the glue spotting detection result is determined to be that the glue thickness does not meet the standard.

[0057] Furthermore, in one embodiment, the glue spotting area can be grayscaled, and the first-order moment of the grayscaled glue spotting area can be calculated; the zero-order moment of the grayscaled glue spotting area can be calculated to obtain a second zero-order moment; the center of mass of the glue spotting area can be calculated based on the first-order moment and the second zero-order moment; if the distance between the center of mass and the ideal center of mass is greater than a preset distance threshold, the glue spotting detection result is determined to be a glue position shift, otherwise, the glue spotting detection result is determined to have no glue position shift. Specifically, the ratio of the first-order moment to the second zero-order moment can be calculated to obtain the center of mass of the glue spotting area. The calculation formula for the first-order moment is:

[0058]

[0059]

[0060] Where x and y represent the horizontal and vertical coordinates of the point, and f(x, y) is the pixel value of the pixel at that coordinate. Divide the first-order moment of the grayscaled glue spot area by the zero-order moment of the grayscaled glue spot area to obtain the centroid of the glue spot area. The calculation formula is:

[0061]

[0062]

[0063] Furthermore, the distance between the centroid coordinate (x0, y0) and the ideal coordinate is calculated. If the distance is greater than a set threshold, it is determined to be a glue position offset.

[0064] Moreover, before calculating the image moment of the glue spotting area and determining the glue spotting detection result based on the image moment, the glue spotting area can be compared with the standard glue spotting area to obtain the intersection-and-union ratio between the glue spotting area and the standard glue spotting area; determine whether the intersection-and-union ratio is less than the preset intersection-and-union ratio threshold value. If so, the glue spotting area is determined to be substandard. Otherwise, the image moment of the glue spotting area is calculated, and the glue spotting detection result is determined based on the image moment. In this way, in scenarios with high hourly output requirements, it is possible to quickly determine whether the glue spotting area meets the standard. If it does not meet the standard, no subsequent detection will be performed, thereby improving detection efficiency. Of course, in scenarios with low hourly output requirements, even if the glue spotting area does not meet the standard, subsequent detection can be performed to further accurately detect specific problems with glue spotting. Among them, the glue spotting area can be binarized, and the binarized glue spotting area can be compared with the standard glue spotting area to obtain its intersection-and-union ratio. The calculation formula for the intersection-and-union ratio is as follows:

[0065]

[0066] Here, A and B refer to the glue dispensing area of ​​the product to be inspected and the glue dispensing area of ​​the standard template (i.e., the standard glue dispensing area), respectively. If the IoU ratio is less than the threshold requirement, the product is directly judged as failing to meet the requirements. If it meets the requirements, the next step of testing is carried out. It is understood that if the IoU ratio calculation is performed, since the binarization operation has already been performed, there is no need to perform the binarization operation again in subsequent processing.

[0067] Furthermore, after determining the glue dispensing detection results based on the image moments, embodiments of the present application can call preset expert service logic and generate processing suggestions based on the glue dispensing detection results. For example, if manual re-inspection or manual rework is required, in one embodiment, the preset expert service logic can be called and the frequency of occurrence of any type of problem based on the glue dispensing detection results can be determined. If the frequency exceeds a preset frequency threshold, corresponding setting parameter modification suggestions are generated. For example, if the glue overflow problem occurs 4 times, corresponding setting parameter modification suggestions are generated.

[0068] Furthermore, in one embodiment, the glue spot area can be binarized first, and the binarized glue spot area can be compared with the standard glue spot area to obtain the intersection-and-union ratio between the glue spot area and the standard glue spot area; and it is determined whether the intersection-and-union ratio is less than a preset intersection-and-union ratio threshold. If so, it is determined that the glue spot area does not meet the standard. Accordingly, the image moment of the glue spotting area is calculated, and the glue spotting detection result is determined based on the image moment, including: calculating the zero-order moment of the glue spotting area after binarization to obtain a first zero-order moment; if the first zero-order moment is less than a preset glue shortage threshold, the glue spotting detection result is determined to be glue shortage; if the first zero-order moment is greater than the preset glue overflow threshold, the glue spotting detection result is determined to be glue overflow; calculating the zero-order moment of the glue spotting area after grayscale to obtain a second zero-order moment; calculating the ratio of the second zero-order moment to the first zero-order moment to obtain a zero-order moment ratio; if the zero-order moment ratio is within a preset threshold range, the glue spotting detection result is determined to be glue thickness meeting the standard; otherwise, the glue spotting detection result is determined to be glue thickness failing to meet the standard; calculating the first-order moment of the glue spotting area after grayscale; calculating the center of mass of the glue spotting area based on the first-order moment and the second zero-order moment; if the distance between the center of mass and the ideal center of mass is greater than a preset distance threshold, the glue spotting detection result is determined to be glue position offset. That is, the embodiment of the present application can perform glue overflow / glue shortage, thickness, and glue position offset detection in sequence.

[0069] For example, see Figure 2 As shown, Figure 2 This is a specific schematic diagram of glue dispensing detection disclosed in an embodiment of the present application. An industrial camera is used to obtain images of products that have been operated by an automatic glue dispensing machine, and the images are sent to a host computer via a serial port. The glue dispensing detection scheme is executed in the host computer to determine whether there are any glue dispensing anomalies. The anomalies are then analyzed using an expert system to obtain the next processing suggestions. For products that pass the inspection, assembly or other operations are performed. The glue dispensing detection scheme uses image moments to extract image features, detect glue overflow, glue deficiency, glue thickness, and glue position offset, and detect the glue dispensing conditions of the production line products, especially the glue dispensing conditions in concentrated areas. Specifically, the following steps are included:

[0070] Step 1: After preprocessing (correction, denoising, etc.) the original image is segmented to extract the glue dispensing area.

[0071] Step 2: Binarize the segmented image, with the foreground target as 1 and the background as 0.

[0072] Step 3: Perform preliminary screening. Compare the dispensing area with the dispensing area of ​​the standard template to obtain their intersection-over-union ratio. If the intersection-over-union ratio is less than the threshold requirement, it is directly judged as not meeting the requirements. If it meets the requirements, proceed to the next step of testing.

[0073] Step 4: Detect glue overflow and glue shortage. Calculate the zero-order moment of the binarized glue area. For a binary image, the zero-order moment is the area of ​​the glue area. Compare this area with the set threshold. If it is larger than the glue overflow threshold, it is determined to be glue overflow. If it is smaller than the glue shortage threshold, it is determined to be glue shortage. If the area size is within the reasonable threshold range, proceed to the next step of detection.

[0074] Step 5: Convert the image segmented in Step 1 to grayscale to obtain a grayscale image of the glue dispensing area.

[0075] Step 6: Check the glue thickness. The zero-order moment of the grayscale image is calculated to confirm whether the glue thickness meets the standard. Since the glue spot area size compliance test in Step 4 has already passed, the glue thickness can be judged by the ratio of the zero-order moment of the grayscale image to the zero-order moment of the binarized glue spot area. If the value is within a reasonable threshold range, the next step of testing is carried out.

[0076] Step 7: If necessary, a simple test for glue position shift can be performed. Calculate the first-order moment of the grayscaled glue area and divide the first-order moment of the grayscaled image by the zero-order moment of the grayscaled image calculated in Step 6 to obtain the center of mass of the glue area. Calculate the distance between the center of mass coordinates (x_0, y_0) and the ideal coordinates. If the distance is greater than the set threshold, it is determined to be glue position shift.

[0077] Products that pass all of the above inspections are deemed "passed" and flow to the next workstation for assembly or other operations. If any of Steps 3, 4, 6, or 7 fail to meet requirements, they are deemed "NG" (failed). The problematic images and inspection results are then fed into an expert system for analysis. The expert system is a software system that provides repair or remediation recommendations for abnormalities such as glue overflow, glue shortage, glue thickness, and glue position deviation, and determines whether manual re-inspection or rework is required. The expert system also records NG status for all products processed by the automatic glue dispensers on the production line. For those automatic glue dispensers that frequently experience problems, the parameters can be adjusted promptly. For example, if the frequency of glue shortages on products produced by a certain automatic glue dispenser exceeds a certain threshold, the expert system will alert the engineer to modify the settings and increase the glue output of the automatic glue dispenser. Alternatively, if the glue position of an automatic glue dispenser is consistently offset in a certain direction, the expert system will prompt the production line technician to adjust the tooling displacement to correct the glue position. This allows for effective adjustments to the problematic automatic glue dispenser, preventing the subsequent production of products with glue quality issues.

[0078] For further information, see Figure 3 As shown, Figure 3 This is a specific dispensing detection flow chart disclosed in the embodiment of this application. It specifically includes the following steps:

[0079] (1) The assembly line sends the product to the automatic dispensing machine for dispensing;

[0080] (2) After dispensing, the industrial camera obtains the image of the dispensing area, and the image is transmitted to the host computer via the serial port;

[0081] (3) Using image segmentation and other processing methods to intercept the dispensing area;

[0082] (4) Binarization of the intercepted dispensing area;

[0083] (5) Calculate the intersection-and-union ratio between the binary image and the set standard dispensing area template. If the intersection-and-union ratio meets the range, the dispensing is preliminarily judged to be qualified and flows into the next step. If it does not meet the range, the dispensing is judged to be unqualified and fails the test;

[0084] (6) Calculate the zero-order moment of the binary image. If the zero-order moment meets the range, it is preliminarily judged that the dispensing is qualified and flows into the next link. If it does not meet the range, it is judged as glue overflow or glue shortage and fails the inspection;

[0085] (7) grayscale processing is performed on the segmented image obtained in (3) to obtain a grayscale image of the glue-dispensing area;

[0086] (8) Calculate the zero-order moment of the grayscale image. If the zero-order moment is within the range, it is preliminarily judged that the dispensing is qualified and flows into the next step. If it is not within the range, it is judged that the dispensing thickness is unqualified and fails the test;

[0087] (9) Calculate the first-order moment of the grayscale image and divide it by the zero-order moment to obtain the centroid of the glue dispensing area. If the distance between the centroid and the set centroid is within the range, the glue dispensing is judged to be qualified and flows into the next link. If it is not within the range, it is judged to be glue position offset and fails the test.

[0088] (10) The products that have passed through (9) flow into the next workstation for assembly or other processes;

[0089] (11) Input the product images that failed the inspection in (5), (6), (8), and (9) into the expert system, and the system will analyze the problem;

[0090] (12) Perform corresponding repairs or adjust the automatic dispensing machine parameters or other processing according to the suggestions of the expert system;

[0091] (13) Return the processed product to step (2) for re-testing.

[0092] In this way, it is possible to ensure that glue dispensing inspection is carried out for each product, ensuring the production quality of the product, improving the automation level of production testing, and saving manpower. In addition, the expert system can provide repair and processing suggestions, or guide how to adjust the automatic glue dispensing machine to avoid producing more problematic products, so that the production and manufacturing process can operate stably and efficiently. With high reliability and automation, it can replace manual labor to perform accurate glue dispensing quality inspection. It can be applied to integrated circuits, semiconductor packaging, printed circuit boards, color LCD screens, electronic components (such as relays, speakers), electronic components, automotive parts and other fields that require glue dispensing inspection.

[0093] As can be seen, the embodiment of the present application first obtains a product image of the product after gluing, and then performs image segmentation on the product image to obtain the gluing area, then calculates the image moment of the gluing area, and determines the gluing detection result based on the image moment. In other words, the embodiment of the present application performs image segmentation on the product image of the product after gluing, extracts the gluing area, then calculates the image moment of the gluing area to obtain the image features of the gluing area, and then determines the gluing detection result. In this way, automatically detecting the gluing area can improve detection efficiency and reduce labor costs, thereby ensuring product quality.

[0094] See also Figure 4 As shown, the embodiment of the present application discloses a dispensing detection device, comprising:

[0095] An image acquisition module 11 is used to acquire an image of the product after dispensing;

[0096] An image segmentation module 12 is used to segment the product image to obtain a dispensing area;

[0097] An image moment calculation module 13 is used to calculate the image moment of the dispensing area;

[0098] The detection result determination module 14 is used to determine the dispensing detection result based on the image moment.

[0099] As can be seen, the embodiment of the present application first obtains a product image of the product after gluing, and then performs image segmentation on the product image to obtain the gluing area, then calculates the image moment of the gluing area, and determines the gluing detection result based on the image moment. In other words, the embodiment of the present application performs image segmentation on the product image of the product after gluing, extracts the gluing area, then calculates the image moment of the gluing area to obtain the image features of the gluing area, and then determines the gluing detection result. In this way, automatically detecting the gluing area can improve detection efficiency and reduce labor costs, thereby ensuring product quality.

[0100] In one embodiment, the image moment calculation module 13 is specifically used to calculate the zero-order moment of the binarized glue spotting area to obtain a first zero-order moment; correspondingly, the detection result determination module 14 is specifically used to determine that the glue spotting detection result is glue shortage if the first zero-order moment is less than a preset glue shortage threshold, and to determine that the glue spotting detection result is glue overflow if the first zero-order moment is greater than the preset glue overflow threshold.

[0101] In one embodiment, the image moment calculation module 13 is specifically used to calculate the zero-order moment of the binarized glue spot area to obtain a first zero-order moment; calculate the zero-order moment of the glue spot area after grayscale to obtain a second zero-order moment; correspondingly, the detection result determination module 14 is specifically used to calculate the ratio of the second zero-order moment to the first zero-order moment to obtain a zero-order moment ratio; if the zero-order moment ratio is within a preset threshold range, the glue spot detection result is determined to be that the glue thickness meets the standard; otherwise, the glue spot detection result is determined to be that the glue thickness does not meet the standard.

[0102] In one embodiment, the image moment calculation module 13 is specifically used to calculate the first-order moment of the grayscaled glue spot area; calculate the zero-order moment of the grayscaled glue spot area to obtain a second zero-order moment; correspondingly, the detection result determination module 14 is specifically used to calculate the center of mass of the glue spot area based on the first-order moment and the second zero-order moment; if the distance between the center of mass and the ideal center of mass is greater than a preset distance threshold, the glue spot detection result is determined to be a glue position offset.

[0103] In addition, the device also includes a preliminary detection module, which is used to compare the glue spot area with the standard glue spot area before starting the image moment calculation module 13 to obtain the intersection-and-union ratio between the glue spot area and the standard glue spot area; determine whether the intersection-and-union ratio is less than a preset intersection-and-union ratio threshold value, and if so, determine that the glue spot area does not meet the standard.

[0104] Furthermore, the device also includes an expert suggestion generation module for calling a preset expert service logic and generating processing suggestions based on the dispensing detection results.

[0105] In a specific embodiment, the expert advice generation module is specifically used to call the preset expert service logic and determine the frequency of any type of problem based on the dispensing detection results. If the frequency exceeds the preset frequency threshold, a corresponding setting parameter modification suggestion is generated.

[0106] See also Figure 5 As shown, an embodiment of the present application discloses an electronic device 20, including a processor 21 and a memory 22; wherein the memory 22 is used to store a computer program; the processor 21 is used to execute the computer program, the dispensing detection method disclosed in the above embodiment.

[0107] For the specific process of the above-mentioned dispensing detection method, reference can be made to the corresponding content disclosed in the aforementioned embodiments, which will not be repeated here.

[0108] Furthermore, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the storage method may be temporary storage or permanent storage.

[0109] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; wherein the power supply 23 is used to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0110] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the dispensing detection method disclosed in the aforementioned embodiment.

[0111] For the specific process of the above-mentioned dispensing detection method, reference can be made to the corresponding content disclosed in the aforementioned embodiments, which will not be repeated here.

[0112] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0113] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0114] The above is a detailed introduction to the dispensing detection method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A dispensing detection method, characterized in that: include: Get product images of the product after dispensing; Performing a preprocessing operation on the product image, and after the preprocessing operation, performing image segmentation on the product image to obtain a glue dispensing area, wherein the preprocessing operation includes correction and / or denoising; Calculating an image moment of the glue dispensing area, and determining a glue dispensing detection result based on the image moment; Among them, the calculating of the image moment of the glue spotting area and determining the glue spotting detection result based on the image moment include: calculating the zero-order moment of the glue spotting area after binarization to obtain a first zero-order moment; calculating the zero-order moment of the glue spotting area after grayscale to obtain a second zero-order moment; calculating the ratio of the second zero-order moment to the first zero-order moment to obtain a zero-order moment ratio; if the zero-order moment ratio is within a preset threshold range, the glue spotting detection result is determined to be that the glue thickness meets the standard; otherwise, the glue spotting detection result is determined to be that the glue thickness does not meet the standard.

2. The dispensing detection method according to claim 1, characterized in that: The calculating the image moment of the dispensing area and determining the dispensing detection result based on the image moment further includes: Calculating the zero-order moment of the binarized dispensing area to obtain a first zero-order moment; If the first zero-order moment is smaller than a preset glue-deficient threshold, the glue dispensing detection result is determined to be glue-deficient; if the first zero-order moment is larger than a preset glue-overflow threshold, the glue dispensing detection result is determined to be glue-overflow.

3. The dispensing detection method according to claim 1, characterized in that: The calculating the image moment of the dispensing area and determining the dispensing detection result based on the image moment further includes: Calculate the first-order moment of the grayscaled dispensing area; Calculating the zero-order moment of the grayscaled dispensing area to obtain a second zero-order moment; Calculating the centroid of the dispensing area based on the first-order moment and the second zero-order moment; If the distance between the centroid and the ideal centroid is greater than a preset distance threshold, the glue dispensing detection result is determined to be glue position deviation.

4. The dispensing detection method according to claim 1, characterized in that: Before calculating the image moment of the dispensing area and determining the dispensing detection result based on the image moment, the method further includes: Comparing the dispensing area with a standard dispensing area to obtain an intersection-over-union ratio between the dispensing area and the standard dispensing area; It is determined whether the intersection-over-union ratio is less than a preset intersection-over-union ratio threshold value. If so, it is determined that the dispensing area does not meet the standard.

5. The dispensing detection method according to any one of claims 1 to 4, characterized in that: After calculating the image moment of the dispensing area and determining the dispensing detection result based on the image moment, the method further includes: The preset expert service logic is called and a processing suggestion is generated based on the dispensing detection result.

6. The dispensing detection method according to claim 5, characterized in that: The calling of preset expert service logic and generating processing suggestions based on the dispensing detection results include: The preset expert service logic is called, and the frequency of occurrence of any type of problem is determined based on the dispensing detection result. If the frequency exceeds the preset frequency threshold, a corresponding setting parameter modification suggestion is generated.

7. A dispensing detection device, characterized in that: include: An image acquisition module, used to acquire product images of the product after dispensing; An image segmentation module is used to perform a preprocessing operation on the product image. After the preprocessing operation, the product image is segmented to obtain a glue dispensing area, wherein the preprocessing operation includes correction and / or denoising; An image moment calculation module, used for calculating the image moment of the dispensing area; A detection result determination module, configured to determine a dispensing detection result based on the image moment; Among them, the image moment calculation module is specifically used to calculate the zero-order moment of the binarized glue spot area to obtain the first zero-order moment; calculate the zero-order moment of the glue spot area after grayscale to obtain the second zero-order moment; the detection result determination module is specifically used to calculate the ratio of the second zero-order moment to the first zero-order moment to obtain the zero-order moment ratio; if the zero-order moment ratio is within the preset threshold range, the glue spot detection result is determined to be that the glue thickness meets the standard, otherwise, the glue spot detection result is determined to be that the glue thickness does not meet the standard.

8. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to implement the dispensing detection method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, the dispensing detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Dispensing quality detection method and device, medium and camera focusing machine

    CN113686867A

  • Dispensed product segmented detection method, system and equipment and storage medium

    CN114581445A