Method and device for detecting spraying quality of glue points and electronic equipment

By deploying glue spray modules, camera modules and light sources on the production line, combining image preprocessing and grid technology, automated detection of glue spray quality is achieved, solving the problems of low detection efficiency and insufficient accuracy, and improving the quality of cigarette products and the stability of the production line.

CN120471875APending Publication Date: 2025-08-12CHINA TOBACCO ZHEJIANG IND CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510575590.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-12

Smart Images

  • Figure CN120471875A_ABST
    Figure CN120471875A_ABST
Patent Text Reader

Abstract

The invention discloses a glue point spraying quality detection method and device and electronic equipment. A glue spraying module, a camera shooting module and a light source are sequentially arranged in the flowing direction of the production line, the glue spraying module is used for spraying glue points on label paper placed on a conveying belt, a preset angle is formed between the light source and the conveying belt, the light source is used for illuminating target label paper sprayed with the glue points, and the camera shooting module is used for shooting a to-be-processed image including the target label paper. A to-be-processed image is preprocessed to obtain a grayscale image; gridding the grayscale image according to the grid division information to obtain a first grid image; according to the first grid image and a preset reference template image comprising a glue point area, determining a target grid area of a glue point sprayed in the first grid image and corresponding glue point position information; according to the glue point position information, the glue point detection result of the sprayed glue point under the at least one spraying quality evaluation index is determined, and the precision and efficiency of glue point spraying quality detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and electronic equipment for detecting glue dot spraying quality. Background Art

[0002] Cigarette packaging equipment typically uses high-pressure airflow to spray glue onto specific areas of label paper, achieving a bond between the label and the cigarette case based on the applied glue dots. Because the quality of the glue dots applied to the label paper affects the overall quality of cigarette packaging, it is necessary to perform quality inspections on the glue dots applied to the label paper.

[0003] At present, the quality inspection of glue dot spraying is mainly carried out by relevant staff through manual inspection of the glue dots sprayed on the trademark paper. However, the above method is not only inefficient, but also difficult to accurately identify problems such as insufficient glue, broken glue, no glue, or glue dot position offset at each glue dot. It is impossible to ensure the accuracy of each glue dot, thereby affecting the overall quality of cigarette products. Summary of the Invention

[0004] The present invention provides a method, a device and an electronic device for detecting the quality of glue point spraying, which improve the accuracy and efficiency of the detection of the quality of glue point spraying.

[0005] According to one aspect of the present invention, a method for detecting the quality of glue dot spraying is provided. A glue spraying module, a camera module, and a light source are sequentially arranged along the flow direction of a production line. The glue spraying module is used to spray glue dots on label paper placed on a conveyor belt. The light source is arranged at a preset angle to the conveyor belt to illuminate the target label paper on which the glue dots have been sprayed. The camera module is used to capture an image to be processed including the target label paper. The method includes:

[0006] By preprocessing the image to be processed, a grayscale image corresponding to the image to be processed is obtained;

[0007] Gridding the grayscale image according to preset grid division information to obtain a first grid image corresponding to the grayscale image;

[0008] Determining target grid areas for spraying glue dots in the first grid image and corresponding glue dot position information based on the first grid image and a preset reference template image including the glue dot areas, wherein the size information of the reference template image is related to the size information of each grid area in the first grid image;

[0009] Based on the glue point position information, a glue point detection result of the sprayed glue point under at least one spraying quality evaluation index is determined.

[0010] According to another aspect of the present invention, a device for detecting the quality of glue dot spraying is provided. A glue spraying module, a camera module, and a light source are sequentially arranged along the flow direction of the production line. The glue spraying module is used to spray glue dots on the label paper placed on the conveyor belt. The light source is arranged at a preset angle with the conveyor belt to illuminate the target label paper on which the glue dots have been sprayed. The camera module is used to capture an image to be processed including the target label paper. The device includes:

[0011] An image preprocessing module is used to obtain a grayscale image corresponding to the image to be processed by preprocessing the image to be processed;

[0012] An image gridding processing module, configured to grid the grayscale image according to preset grid division information to obtain a first grid image corresponding to the grayscale image;

[0013] a glue dot position information determination module, configured to determine a target grid area for spraying glue dots in the first grid image and corresponding glue dot position information based on the first grid image and a preset reference template image including the glue dot area; wherein the size information of the reference template image is related to the size information of each grid area in the first grid image;

[0014] The glue point detection result determination module is used to determine the glue point detection result of the sprayed glue point under at least one spraying quality evaluation index based on the glue point position information.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the method for detecting the glue dot spraying quality of any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for enabling a processor to implement the method for detecting glue dot spraying quality according to any embodiment of the present invention when the computer instructions are executed.

[0020] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for detecting the glue dot spraying quality according to any embodiment of the present invention.

[0021] The technical solution of an embodiment of the present invention is to spray glue dots on trademark paper placed on a conveyor belt through a glue spraying module deployed along the flow direction of the production line. When a light source at a preset angle to the conveyor belt acts on the target trademark paper on which the glue dots have been sprayed, the camera module captures the image to be processed including the target trademark paper to improve the image accuracy of the image to be processed and avoid the problem of unclear image to be processed due to reflection or other reasons. Based on this, the glue spraying module, camera module and light source are deployed in sequence to achieve glue spraying and image acquisition processing of the trademark paper. By preprocessing the image to be processed, a grayscale image corresponding to the image to be processed is obtained. The grayscale image is gridded according to the grid division information to obtain a first grid image. Based on the first grid image and a pre-set reference template image including the glue dot area, the target grid area of the glue dot sprayed in the first grid image and the corresponding glue dot position information are determined. Based on the glue dot position information, the glue dot detection result of the sprayed glue dot under at least one spraying quality evaluation indicator is determined. The present invention solves the problems of low detection efficiency and inability to ensure the accuracy of each glue point caused by manual detection of glue point spraying quality in the prior art, improves the accuracy and efficiency of glue point spraying quality detection, reduces quality problems caused by uneven glue or glue point position deviation, ensures the overall quality of cigarette product packaging, and thus improves the overall stability and operating efficiency of the production line.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 is an example image of an image to be processed provided by an embodiment of the present invention;

[0025] Figure 2 The hardware system for implementing the glue dot spraying quality detection method provided by the embodiment of the present invention;

[0026] Figure 3 This is a flow chart of a method for detecting glue dot spraying quality provided by an embodiment of the present invention;

[0027] Figure 4 is an example diagram of glue point position information in a first grid image provided by an embodiment of the present invention;

[0028] Figure 5 This is a flow chart of a method for detecting glue dot spraying quality provided by an embodiment of the present invention;

[0029] Figure 6 1 is a schematic structural diagram of a device for detecting the quality of glue dot spraying provided by an embodiment of the present invention;

[0030] Figure 7 The figure is a schematic structural diagram of an electronic device for implementing the method for detecting the glue dot spraying quality according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] Before describing the technical solution provided by the embodiment of the present invention, the application scenario may be described first. The image to be processed in the embodiment of the present invention is obtained by capturing the image of the target trademark paper after the glue spraying module sprays glue points under the illumination of a light source by the camera module. The glue spraying module, the camera module and the light source are deployed in sequence along the flow direction of the production line. The glue spraying module is used to spray glue points on the trademark paper placed on the conveyor belt. The light source is at a preset angle to the conveyor belt and is used to illuminate the target trademark paper on which the glue points have been sprayed. The light source may be an LED light source or other light source device for illumination. The camera module is used to capture the image to be processed containing the target trademark paper. Optionally, the camera module may be a module composed of a camera or other camera device.

[0034] For example, see Figure 1 , Figure 1 is a sample image of the image to be processed. Figure 1 In the figure, the running direction of the trademark paper is the flow direction of the production line. The camera is a camera module, which is used to capture images of the target trademark paper to facilitate the subsequent determination of the quality of the glue dots in the to-be-processed image corresponding to the target trademark paper. Optionally, the camera device can be deployed 150 mm above the target trademark paper. The LED light source is the light source. Since the glue dots on the target trademark paper are usually white, close to the color of the trademark paper, in order to improve the image acquisition effect, the LED light source can be deployed above the conveyor belt, with the angle between the conveyor belt and the flow direction of the production line corresponding to the conveyor belt being 15 degrees, that is, the preset angle can be 15 degrees.

[0035] Figure 1 The specific processing flow can be as follows: after the glue spraying module sprays glue dots on the label paper placed on the conveyor belt, the label paper with glue dots sprayed on it can be used as the target label paper. When an LED light source at a 15-degree angle to the flow direction of the production line corresponding to the conveyor belt is irradiated on the target label paper with glue dots sprayed on it, the camera captures the image to be processed containing the target label paper. During the acquisition of the image to be processed, under the illumination of the LED light source, the glue dots on the target label paper will be illuminated on the side facing the LED light source, while the side facing away from the LED light source will be shadowed. Based on this, the glue dots in the collected image to be processed are clear and have a certain difference in color from the target label paper, which can improve the accuracy of subsequent glue dot spraying quality inspection.

[0036] It should be noted that, taking cigarette label paper as an example, if the glue spraying module is a spray gun on a dual-channel packaging device, since the dual-channel packaging device corresponds to two cigarette label paper conveying channels, a camera module can be deployed in the flow direction corresponding to each conveying channel to capture images of the target label paper that has been glued on each conveying channel. Correspondingly, if the glue spraying module is a spray gun on a single-channel packaging device, since the single-channel packaging device corresponds to one cigarette label paper conveying channel, a camera module can be deployed in the flow direction corresponding to the current conveying channel.

[0037] For example, see Figure 2 , Figure 2This hardware system implements a method for inspecting the quality of glue dot spraying. The system includes components such as a camera (camera 1 and camera 2), a light source (LED light source), an industrial computer, an I / O interface, a light source controller, a rejection control system, and a shaft encoder. The light source controller is used to control the on / off switching of the LED light source. If the glue spraying module is a dual-channel packaging device, two cameras, camera 1 and camera 2, can be used to capture and process images of the target label paper on the corresponding production line. If the glue spraying module is a single-channel packaging device, camera 2 can be turned off, leaving only camera 1 enabled to capture the image to be processed corresponding to the target label paper on the corresponding production line.

[0038] Example 1

[0039] Figure 3 This is a flow chart of a method for detecting glue dot spraying quality provided by the first embodiment of the present invention. This embodiment is applicable to the situation where after glue dots are sprayed on trademark paper placed on a conveyor belt by a glue spraying module, an image of the target trademark paper is captured under the illumination of a light source, and the glue dot spraying quality detection is performed on the captured image to be processed. This method can be executed by a glue dot spraying quality detection device, which can be implemented in the form of hardware and / or software. The glue dot spraying quality detection device can be configured in electronic devices such as mobile phones, computers or servers. Figure 3 As shown, the method includes:

[0040] S110 , obtaining a grayscale image corresponding to the image to be processed by preprocessing the image to be processed.

[0041] The image to be processed may be an image captured by a camera module and containing the target label paper. The target label paper may be a label paper with glue dots sprayed on it. Optionally, the label paper may be a cigarette package label paper or a label paper for other products. Image preprocessing may include grayscale processing and denoising the image to be processed. Denoising may be performed by denoising the image using a Gaussian filter or other filter. The grayscale image may be the image obtained after grayscale processing and denoising the image to be processed.

[0042] Specifically, when it is detected that a light source at a preset angle to the flow direction of the production line is irradiated on the target trademark paper, an image to be processed including the target trademark paper is captured based on the camera module. The image to be processed captured by the camera module is obtained, and grayscale processing is performed on the image to be processed to convert the image to be processed into a grayscale image to be used. Based on this, the subsequent image processing speed can be improved while maintaining image clarity. In the process of capturing the image to be processed through the camera module, interference factors such as dust and particles may exist, causing the captured image to be unclear. Then, the grayscale image to be used can be denoised to obtain a grayscale image corresponding to the image to be processed. Based on this, the image clarity is improved, and the accuracy of subsequent glue dot spraying quality inspection is guaranteed.

[0043] For example, taking the target label paper as cigarette case label paper sprayed with glue dots, and the glue spraying module as the spray gun on the cigarette case packaging equipment, the spray gun on the cigarette case packaging equipment typically uses a glue spraying method to bond the label paper to the cigarette case. The glue sprayed on the label paper is typically white latex. The spray gun on the cigarette case packaging equipment uses a high-pressure airflow to spray glue dots on the cigarette case label paper placed on the conveyor belt, so as to spray the glue dots on specific areas of the cigarette case label paper. Ideal glue dots sprayed on the cigarette case label paper are typically circular or conform to a pre-designed geometric shape. The ideal glue dot shape is generally a 2mm*2mm circle or a 2mm*3mm oval. The distance between the glue gun on the cigarette case packaging equipment and the cigarette case label paper is typically between 3mm and 5mm. When spraying glue dots on the cigarette case label paper using the glue gun on the cigarette case packaging equipment, it is also necessary to spray multiple glue dots on the cigarette case label paper according to the spraying position requirements. Because the quality of glue spraying affects the firmness and stability of the bond between the cigarette case label and the cigarette case, the glue spraying quality can be tested. Specifically, a camera captures an image of the cigarette case label with glue sprayed on it, obtaining a color image corresponding to the cigarette case label, i.e., the image to be processed. The color image is then grayscale processed to obtain a grayscale image to be processed. During the process of capturing the image to be processed by the camera, dust or tobacco particles may affect the image to be processed, resulting in unclear image quality. In this case, a Gaussian filter can be used to grayscale the grayscale image to remove noise from the grayscale image to be processed, resulting in a grayscale image corresponding to the image to be processed, thereby improving image clarity.

[0044] S120 , gridding the grayscale image according to preset grid division information to obtain a first grid image corresponding to the grayscale image.

[0045] The grid division information may include the width and height information of each grid, the grid step size, and the number of grids. The grid width information may be understood as the width of the divided grid. The grid height information may be understood as the height of the divided grid. The grid step size may be understood as the interval between two adjacent grids, which is used to characterize the density of the divided grid. The number of grids may be understood as the number of divided grids. The first grid image may be an image obtained by performing grid division processing on the grayscale image.

[0046] Specifically, to improve the efficiency of glue dot spraying quality inspection, the grayscale image can be gridded based on the width, height, step size, and number of grids in the pre-set grid division information to obtain a first grid image corresponding to the grayscale image. Each grid in the first grid image can be a rectangular grid area of the same size.

[0047] For example, the grid division information includes: grid width information w, height information h and grid number n, and the image size of the grayscale image is W×H. It should be noted that when the grid step size is consistent with the grid width information or length information, there is no overlap of grids in the first grid image. In this case, the grid number

[0048] In order to reduce the complexity of subsequent image comparison and improve the efficiency of glue dot spraying quality inspection, the grayscale image is gridded to divide the grayscale image into rectangular grid areas of equal size. When the width information of the grid is w and the height information is h, and the image size of the grayscale image is W×H, the grayscale image can be divided into The divided grayscale image is used as a first grid image to detect the spraying quality of the glue dots sprayed on the target trademark paper based on each grid area in the first grid image.

[0049] S130 , determining a target grid area of the glue dots sprayed in the first grid image and corresponding glue dot position information based on the first grid image and a preset reference template image including the glue dot area.

[0050] The size information of the reference template image is related to the size information of each grid area in the first grid image. The image size of the reference template image is consistent with the image size of each grid area in the first grid image. The reference template image can be a pre-set grayscale image corresponding to glue dots of qualified quality. The glue point area in the reference template image is the area corresponding to glue dots of qualified quality. The target grid area can be the grid area containing glue dots in the first grid image. Optionally, there can be at least one target grid area. The glue point position information can be the position information of the glue dots in the target grid area in the first grid image. Optionally, the glue point position information can be represented by pixel coordinates or glue point coordinates in a preset coordinate system. The preset coordinate system can be a coordinate system with the upper left corner point of the first grid image as the origin.

[0051] Specifically, for each grid area in the first grid image, the pixel value of each pixel in the current grid area in the first grid image is compared with the pixel value of each pixel in a preset reference template image that includes the glue dot area, thereby obtaining a grayscale difference result between the current grid area and the reference template image. Based on the grayscale difference result corresponding to each grid area, at least one target grid area is determined from all grid areas in the first grid image. Based on the pixel value information of each pixel in each target grid area, the glue dot position information in each target grid area is determined.

[0052] S140: Determine a glue point detection result of the sprayed glue point under at least one spraying quality evaluation index based on the glue point position information.

[0053] Among them, at least one spraying quality assessment indicator may include at least one of a position detection indicator, a glue dot shape indicator, an integrity indicator, and a uniformity indicator. The position detection indicator can be used to characterize whether there is a deviation in the glue dot position. The glue dot shape indicator can be used to characterize whether the glue dot shape is a standard glue dot shape. For example, it can detect whether the glue dot shape is a 2mm*2mm circle or a 2mm*3mm ellipse. The integrity indicator is used to characterize whether the glue dot has cracks or uneven surfaces. The uniformity indicator is used to characterize whether the glue dot surface is uniform and whether there are bubbles. The glue dot detection result can be a final spraying quality detection result determined based on the detection results corresponding to at least one spraying quality assessment indicator.

[0054] Specifically, based on the glue dot position information of each glue dot in the first grid image, a test result for each glue dot sprayed on the target label stock under at least one of the following spraying quality assessment indicators: a position detection indicator, a glue dot shape indicator, an integrity indicator, and a uniformity indicator can be determined. A glue dot detection result for each glue dot sprayed on the target label stock is comprehensively determined based on the at least one test result corresponding to each glue dot.

[0055] In an embodiment of the present invention, the method for determining the glue dot detection result can be: determining the position deviation information based on the glue dot position information and the pre-set position information, so as to determine the first detection result under the position detection index based on the position deviation information; determining the glue dot shape information based on the glue dot position information, so as to determine the second detection result under the glue dot shape index based on the glue dot shape information and the corresponding judgment conditions; determining the ratio of the glue dot perimeter to the area based on the glue dot position information, and determining the third detection result of the glue dot under the integrity index; determining the glue dot detection result based on the first detection result, the second detection result and the third detection result.

[0056] Among them, the preset position information can be the preset standard position information of the glue dot on the trademark paper. The preset position information can be represented by the standard pixel coordinates corresponding to the glue dot on the trademark paper or the standard glue dot coordinates corresponding to the glue dot in the preset coordinate system. The preset coordinate system can be a coordinate system with the corner point of the upper left corner of the first grid image as the origin. The position deviation information can be the horizontal and vertical coordinate differences between the glue dot position information of each glue dot and the preset position information. The first detection result can represent whether there is a deviation between the glue dot position information and the preset position information. If there is a large deviation between the glue dot position information and the preset position information, the first detection result may be that the glue dot position is abnormal. Correspondingly, if there is no deviation or a small deviation between the glue dot position information and the preset position information, the first detection result may be that the glue dot position is normal.

[0057] The glue dot shape information may be information corresponding to the shape of the glue dot in the first grid image. Optionally, the glue dot shape information may include the glue dot aspect ratio, area information, and roundness information. The corresponding judgment condition may be whether the glue dot shape information matches the pre-set glue dot standard shape. The pre-set glue dot standard shape may be a 2mm*2mm circle or a 2mm*3mm ellipse. The second detection result may be used to characterize whether the glue dot shape information matches the pre-set glue dot standard shape. If the glue dot shape information matches the pre-set glue dot standard shape, the second detection result may be that the glue dot shape is qualified; correspondingly, if the glue dot shape information does not match the pre-set glue dot standard shape, the second detection result may be that the glue dot shape is unqualified.

[0058] The glue dot perimeter can be understood as the perimeter of the glue dot in the first grid image. The area is the area of the glue dot in the first grid image. The third test result can be a result indicating that the glue dot integrity is acceptable or unacceptable. The glue dot test result can be a test result of the glue dot spraying quality determined based on the first, second, and third test results. It should be noted that a corresponding glue dot test result can be determined for each glue dot in the first grid image.

[0059] Specifically, a preset coordinate system is constructed with the corner point in the upper left corner of the first grid image as the origin. Based on the pixel value information of each pixel point in each target grid area in the first grid image, the glue point coordinate information of all glue points in the first grid image, that is, the glue point position information, is determined. For all glue points in the first grid image, the position deviation information is determined based on the glue point position information of the current glue point and the pre-set position information. If the position deviation information is: there is a deviation between the glue point position information of the current glue point and the pre-set position information, and the position deviation information exceeds the preset deviation threshold, then the first detection result is determined to be that the glue point position is abnormal. Correspondingly, if the position deviation information does not exceed the preset deviation threshold, or there is no deviation between the glue point position information of the current glue point and the pre-set position information, then the first detection result is determined to be that the glue point position is normal.

[0060] Based on the glue dot position information of the current glue dot in the first grid image, the aspect ratio of the current glue dot is detected to determine the glue dot aspect ratio of the current glue dot. The area of the current glue dot is detected to determine the area information of the current glue dot. The roundness of the current glue dot is detected to determine the roundness information of the current glue dot. The glue dot aspect ratio, area information, and roundness information of the current glue dot are used as the glue dot shape information of the current glue dot. If the glue dot shape information matches a preset glue dot standard shape, the second detection result is determined as a qualified glue dot shape. Conversely, if the glue dot shape information does not match the preset glue dot standard shape, the second detection result is determined as an unqualified glue dot shape.

[0061] Based on the glue dot location information of the current glue dot in the first grid image, the ratio of the glue dot perimeter to the area of the current glue dot is calculated. Based on the ratio of the glue dot perimeter to the area and a preset ratio range, a determination is made as to whether the current glue dot is complete. If the current glue dot is complete, the third test result indicates that the glue dot integrity is acceptable. Conversely, if the current glue dot is incomplete, the third test result indicates that the glue dot integrity is unacceptable. A glue dot test result is determined based on the first test result, the second test result, and the third test result.

[0062] For example, the glue point position information is the glue point coordinates in the preset coordinate system, and the preset position information is the standard glue point coordinates corresponding to the glue point in the preset coordinate system. Figure 4 , Figure 4 is an example diagram of the glue point position information in the first grid image. Figure 4In the example, the first grid image contains 10 glue dots. A preset coordinate system is constructed with the top-left corner of the first grid image as the origin. The coordinates of the eight glue dots on the left are (X1, Y1), (X2, Y1), (X3, Y1), (X4, Y1), (X1, Y2), (X2, Y2), (X3, Y2), and (X4, Y2), in order from top to bottom and from left to right. The coordinates of the two glue dots on the right are (X5, Y3) and (X6, Y3). The glue dot coordinates of each glue dot in the first grid image are compared with the pre-set standard glue dot coordinates for each glue dot to determine the horizontal and vertical coordinate difference corresponding to each glue dot, i.e., the position deviation information. The horizontal and vertical coordinate difference corresponding to each glue dot is compared with the preset deviation threshold. If the horizontal and vertical coordinate difference does not exceed the preset deviation threshold, the first detection result is determined to be normal glue dot position. If the horizontal and vertical coordinate difference exceeds the preset deviation threshold, the first detection result is determined to be abnormal glue dot position.

[0063] Take the example of a 2mm*2mm circle as an example. Based on the current glue point location information, determine the glue point aspect ratio, area information, and roundness information corresponding to the current glue point. If the glue point aspect ratio of the current glue point is 1 and the area information is πmm 2 If the roundness information is 1, it means that the glue dot shape information of the current glue dot matches the preset glue dot standard shape, and the second detection result is determined to be that the glue dot shape is qualified.

[0064] Based on the glue point location information of the current glue point, the glue point perimeter and area of the current glue point are detected to determine the ratio of the glue point perimeter to the area of the current glue point. The ratio of the glue point perimeter to the area can be determined using the following function.

[0065]

[0066] Where P is the perimeter of the glue dot, A is the area of the glue dot, and r is the radius of the glue dot (for an elliptical glue dot, r is the minor semi-axis of the glue dot).

[0067] If the ratio of the perimeter to the area of the current glue dot meets the preset ratio range, the current glue dot is determined to be a complete glue dot, and the third test result is that the glue dot integrity is qualified. If the ratio of the perimeter to the area of the current glue dot does not meet the preset ratio range, the third test result is that the glue dot integrity is unqualified. For example, for a 2mm*2mm circular glue dot, P / A=2; for a 2mm*3mm elliptical glue dot, P / A=1.69. The preset ratio range can be 1.5 to 2.5. If the ratio of the perimeter to the area of the current glue dot is detected to be P / A>2.5, it means that the glue dot may have cracks or uneven surface (bubbles, pores, irregular surface of the glue dot, etc.); if the ratio of the perimeter to the area of the current glue dot is detected to be P / A<1.5, it means that the glue dot is incomplete, which may be due to uneven glue application or insufficient glue application, resulting in uncovered areas or partial missing glue dots.

[0068] In an embodiment of the present invention, the second detection result can be determined by: determining the glue dot aspect ratio, area information and roundness information based on the glue dot position information, and determining the second detection result based on the glue dot aspect ratio, area information, roundness information and judgment conditions corresponding to the glue dot shape information.

[0069] The glue dot aspect ratio can be understood as the ratio of the glue dot's length to its width. The area information is the glue dot's area. The roundness information is the glue dot's roundness. Since the glue dot shape information includes the glue dot aspect ratio, area information, and roundness information, there are also three judgment conditions corresponding to the glue dot shape information: the glue dot aspect ratio, the area information, and the roundness information. The judgment condition corresponding to the glue dot aspect ratio can be whether the glue dot aspect ratio is within a preset aspect ratio range. The judgment condition corresponding to the area information can be whether the glue dot's area meets a preset area threshold. The judgment condition corresponding to the roundness information can be whether the glue dot's roundness meets a preset roundness range.

[0070] Specifically, for all glue dots in the first grid image, the current glue dot is inspected based on its location information to determine its aspect ratio, area, and roundness. If the aspect ratio of the current glue dot is within a preset aspect ratio range, the area of the current glue dot meets a preset area threshold, and the roundness of the current glue dot meets a preset roundness range, the second inspection result may be that the glue dot shape is qualified. Conversely, if the aspect ratio of the current glue dot is not within the preset aspect ratio range, the area of the current glue dot does not meet the preset area threshold, or the roundness of the current glue dot does not meet the preset roundness range, the second inspection result may be that the glue dot shape is unqualified.

[0071] Exemplarily, the preset standard shape of the glue dot can be a 2mm*2mm circle or a 2mm*3mm ellipse, and the preset aspect ratio range can be 1 to 1.5. Determine the glue dot aspect ratio of the current glue dot. If the glue dot aspect ratio of the current glue dot is within the preset aspect ratio range, it means that the glue dot aspect ratio is normal. Accordingly, if the glue dot aspect ratio of the current glue dot is less than 1, it means that the glue dot is insufficiently glued. If the glue dot aspect ratio of the current glue dot is greater than 1.5, it means that there is glue overflow on the glue dot, which may be caused by abnormal operation of the glue gun. Determine the area information of the current glue dot. If the area information of the current glue dot meets the preset area threshold, it means that the glue dot area is normal. Accordingly, if the area information of the current glue dot is greater than or less than the preset area threshold, it means that the glue dot is unevenly coated or the glue amount of the glue dot is inappropriate. Determine the roundness information of the current glue dot. When the roundness information of the glue dot meets the preset roundness range, it indicates that the roundness of the glue dot is normal; when the roundness information of the glue dot does not meet the preset roundness range, it indicates that there is a problem with the shape of the glue dot sprayed by the glue gun.

[0072] Optionally, the method for determining the glue spot detection result also includes: determining the glue spot contrast information, glue spot homogeneity information and the entropy value corresponding to the glue spot based on the glue spot position information; determining the fourth detection result under the uniformity index based on the glue spot contrast information, glue spot homogeneity information and the entropy value corresponding to the glue spot, so as to determine the glue spot detection result based on the first detection result, the second detection result, the third detection result and the fourth detection result.

[0073] Glue dot contrast information can be used to characterize the clarity and texture depth of the glue dot. A higher glue dot contrast indicates a rougher texture, poorer uniformity, or the presence of bubbles. Glue dot homogeneity information can be used to characterize the uniformity of the glue dot's texture. A higher glue dot homogeneity indicates a more uniform texture. The entropy value of the glue dot can be used to characterize the complexity of the glue dot. A higher entropy value indicates a more complex texture, indicating an uneven surface or bubbles.

[0074] Specifically, for all glue dots in the first grid image, texture analysis is performed on the current glue dot based on the Grey-Level Co-occurrence Matrix (GLCM) to determine glue dot contrast information, glue dot homogeneity information, and the entropy value corresponding to the current glue dot. Based on the glue dot contrast information, glue dot homogeneity information, and the entropy value corresponding to the glue dot, it is determined whether the current glue dot is uneven. If so, the fourth test result is determined to be unqualified for glue dot uniformity. If not, the fourth test result is determined to be qualified for glue dot uniformity.

[0075] Optionally, the glue point detection result includes at least one or more of a glue overflow detection result, a glue deficiency detection result, and a normal glue spraying detection result. The method further includes: generating a detection report corresponding to the glue point detection result based on each glue spraying point.

[0076] The glue overflow detection result can be used to indicate whether glue dots sprayed on the target label paper have overflowed. The glue deficiency detection result can be used to indicate whether glue dots sprayed on the target label paper have insufficient glue. The normal glue spraying detection result can be used to indicate that the glue dots sprayed on the target label paper are of acceptable quality. The sprayed glue dots can be the glue dots sprayed on the target label paper corresponding to the first grid image. The test report is used to indicate the glue spraying quality of all the glue dots sprayed on the target label paper corresponding to the first grid image.

[0077] Specifically, for at least one glue dot on the target trademark paper, based on at least one of the first detection result under the position detection index, the second detection result under the glue dot shape index, the third detection result under the integrity index, and the fourth detection result under the uniformity index, it can be determined that the glue dot detection result of the current glue dot is a glue overflow detection result, a glue deficiency detection result, or a normal glue spraying detection result. Based on this, the glue dot detection results of all glue dot on the target trademark paper can be obtained. That is, the glue dot detection results corresponding to the target trademark paper include at least one or more of the glue overflow detection results, the glue deficiency detection results, and the normal glue spraying detection results. Based on the glue dot detection results of all glue dot on the target trademark paper, a test report corresponding to all glue dot on the target trademark paper is generated.

[0078] The technical solution of this embodiment is to spray glue dots on the trademark paper placed on the conveyor belt through the glue spraying module deployed along the flow direction of the production line. When a light source at a preset angle to the conveyor belt acts on the target trademark paper on which the glue dots have been sprayed, the camera module captures the image to be processed including the target trademark paper to improve the image accuracy of the image to be processed and avoid the problem of unclear image to be processed due to reflection or other reasons. Based on this, the glue spraying module, camera module and light source are deployed in sequence to achieve glue spraying and image acquisition processing of the trademark paper. By preprocessing the image to be processed, a grayscale image corresponding to the image to be processed is obtained. The grayscale image is gridded according to the grid division information to obtain a first grid image. Based on the first grid image and a pre-set reference template image including the glue dot area, the target grid area of the glue dot sprayed in the first grid image and the corresponding glue dot position information are determined. Based on the glue dot position information, the glue dot detection result of the sprayed glue dot under at least one spraying quality evaluation index is determined. The present invention solves the problems of low detection efficiency and inability to ensure the accuracy of each glue point caused by manual detection of glue point spraying quality in the prior art, improves the accuracy and efficiency of glue point spraying quality detection, reduces quality problems caused by uneven glue or glue point position deviation, ensures the overall quality of cigarette product packaging, and thus improves the overall stability and operating efficiency of the production line.

[0079] Example 2

[0080] Figure 5 This is a flow chart of a method for detecting the quality of glue dot spraying provided by the second embodiment of the present invention. This embodiment of the present invention is based on the above embodiment and refines the step of "determining the target grid area of the glue dot sprayed in the first grid image based on the first grid image and the pre-set reference template image including the glue dot area". Its specific implementation method can be found in the technical solution of this embodiment. Among them, the technical terms that are the same as or corresponding to the above embodiment are not repeated here. Figure 5 As shown, the method includes:

[0081] S210 , obtaining a grayscale image corresponding to the image to be processed by preprocessing the image to be processed.

[0082] S220 , gridding the grayscale image according to preset grid division information to obtain a first grid image corresponding to the grayscale image.

[0083] S230 . For each grid area in the first grid image, determine a target grid area according to pixel values of the grid area and pixel values in the reference template image.

[0084] The target grid area may be the grid area where the glue point is located in the first grid image.

[0085] Specifically, for each grid area in the first grid image, a determination is made as to whether the current grid area is the grid area where the glue point is located based on the pixel value of each pixel in the current grid area and the pixel value of each pixel in the reference template image. If the current grid area is the grid area where the glue point is located, the current grid area is determined to be the target grid area. Based on this, at least one target grid area in the first grid image can be determined.

[0086] It should be noted that for each grid area in the first grid image, parallel calculations can be used to simultaneously determine whether each grid area is a target grid area, thereby improving processing speed. Furthermore, determining the target grid area where the glue point is located based on the grid area reduces the amount of calculation and improves processing efficiency compared to directly determining the glue point in the image.

[0087] In an embodiment of the present invention, a method for determining the target grid area may be: determining the error result information of the grid area by performing mean square error processing on the pixel values of the same pixel point in the grid area and the reference template image; determining the grid area as a glue point candidate area when the error result information and the preset error threshold meet preset conditions; and determining the target grid area from the glue point candidate area.

[0088] The same pixel point in the grid area and the reference template image can be understood as the pixel point corresponding to the same pixel coordinate in the grid area and the reference template image. The mean square error processing can be implemented by the following function.

[0089]

[0090] Among them, MSE(R, T) represents the error result information, which is used to characterize the pixel value difference between the grid area and the reference template image. Since the grid area and the reference template image are both grayscale images, the error result information is the grayscale difference result between the grid area and the reference template image. R represents the grid area, and T represents the reference template image. N represents the number of pixels in the grid area. Since the grid area and the reference template image have the same image size, N also represents the number of pixels in the reference template image. I(x, y) represents the pixel value of the pixel with pixel coordinates (x, y) in the grid area, and T(x, y) represents the pixel value of the pixel with pixel coordinates (x, y) in the reference template image.

[0091] The preset condition may be a condition that the error result information is less than a preset error threshold. The preset error threshold may be a pre-set standard value for the grayscale difference between the same pixel coordinates in the grid area and the reference template image. The glue spot candidate area may be a grid area that may contain glue spots. The target grid area is the grid area that contains glue spots.

[0092] Specifically, for all grid areas in the first grid image, since each grid area and the reference template image have the same image size and are both grayscale images, the mean square error value corresponding to the current grid area and the reference template image, i.e., the error result information, can be determined based on the above-mentioned mean square error function according to the pixel value (grayscale value) of the same pixel coordinate in the current grid area and the reference template image and the number of pixels in the current grid area. When the error result information is less than the preset error threshold, it is determined that the error result information and the preset error threshold meet the preset conditions, and the current grid area is determined to be a glue point candidate area. Based on this, at least one glue point candidate area can be determined from all grid areas in the first grid image. The target grid area is determined based on at least one glue point candidate area. Based on this, by determining the error result information between each grid area and the reference template area, a preliminary screening of the grid areas is achieved, and the glue point candidate areas are obtained, thereby reducing the complexity of directly determining the target grid area.

[0093] Optionally, a target grid area is determined from the glue point candidate area, including: for the glue point candidate area, using a normalized cross-correlation function to process the pixel values of the same pixel in the glue point candidate area and the reference template image to determine the candidate attribute value of the glue point candidate area; taking the glue point candidate area with the largest candidate attribute value as the starting search area, and determining the overlap information of the starting search area with other glue point candidate areas; when the overlap information meets a preset overlap threshold, removing other glue point candidate areas from the candidate area list, and repeating the steps of taking the glue point candidate area with the largest candidate attribute value as the starting search area and removing the glue point candidate area according to the overlap information until the last largest candidate attribute value is traversed to obtain the target grid area.

[0094] The normalized cross-correlation function can be used to measure the similarity between the glue spot candidate region and the reference template image. The candidate attribute value can be used to characterize the degree of similarity between the glue spot candidate region and the reference template image. The candidate attribute value can be characterized by the normalized cross-correlation value corresponding to the normalized cross-correlation function. A larger candidate attribute value indicates a higher similarity between the glue spot candidate region and the reference template image, while a smaller candidate attribute value indicates a lower similarity between the glue spot candidate region and the reference template image.

[0095] The starting search area is the glue point candidate area from which this area is taken as the starting point. Overlap information can be used to indicate the degree of overlap between the starting search area and other glue point candidate areas. The preset overlap threshold can be a pre-set standard value for the overlap information. Optionally, the preset overlap threshold can be 0.5. When the overlap information meets the preset overlap threshold, it indicates that other glue point candidate areas overlap with the starting search area. The candidate area list includes all glue point candidate areas in the first grid image.

[0096] Specifically, for all glue spot candidate regions in the first grid image, a normalized cross-correlation function is used to process the pixel values of the current glue spot candidate region and the same pixel in the reference template image to determine the normalized cross-correlation value corresponding to the current glue spot candidate region, and then determine the candidate attribute value of the current glue spot candidate region based on the normalized cross-correlation value. The normalized cross-correlation function can be expressed as follows.

[0097]

[0098] Where NCC(R', T) represents the normalized cross-correlation value corresponding to the current glue point candidate area, R' represents the current glue point candidate area, T represents the reference template image, I(i, j) represents the pixel value of the pixel with pixel coordinates (i, j) in the current glue point candidate area, and T(i, j) represents the pixel value of the pixel with pixel coordinates (i, j) in the reference template image. I Indicates the pixel mean corresponding to all pixels in the current glue point candidate area, μ T Represents the pixel mean corresponding to all pixels in the reference template image.

[0099] Based on the above normalized cross-correlation function, the normalized cross-correlation values corresponding to all glue point candidate regions in the first grid image can be determined. The normalized cross-correlation value corresponding to each glue point candidate region is used as the candidate attribute value corresponding to each glue point candidate region. Specifically, as shown in the following function,

[0100] S i =NCC(R',T)

[0101] NCC(R, T) represents the normalized cross-correlation value corresponding to the current glue point candidate area, R' represents the current glue point candidate area, T represents the reference template image, S i Indicates the candidate attribute value corresponding to the current glue point candidate area.

[0102] The candidate attribute values corresponding to all glue point candidate areas in the first grid image are sorted and processed to determine the glue point candidate area with the largest candidate attribute value. It should be noted that when dividing the grid according to the grid division information, there may be overlap between two grid areas in the first grid image. In order to avoid repeated detection of the same glue point, it is necessary to eliminate the glue point candidate areas belonging to the same glue point based on the overlap information. That is, the glue point candidate area with the largest candidate attribute value is used as the starting search area, and the overlap information between the other glue point candidate areas in the candidate area list and the starting search area is determined. The overlap information can be determined by the following function.

[0103]

[0104] Among them, IoU(R i , R j ) represents the starting search area R i and other glue point candidate regions R j The overlap information between i Indicates the starting search area, R j Indicates another candidate glue point area. Area(R i ∩R j ) represents the starting search area R i and other glue point candidate regions R j The area of the overlapping part, Area(R i ∪R j ) represents the starting search area R i and other glue point candidate regions R j Based on this, the overlap information between the starting search area and each other glue point candidate area can be determined. If the overlap information between any other glue point candidate area and the starting search area exceeds a preset overlap threshold, the other glue point candidate area and the starting search area are determined to belong to the same glue point, and the other glue point candidate area is removed from the candidate area list. The comparison of the overlap information and the preset overlap threshold can be seen in the following function.

[0105] IoU(R i , R j )>threshold

[0106] Among them, IoU(R i , R j ) represents the overlap information between the starting search area and the current other glue point candidate areas, and threshold represents the preset overlap threshold, which is usually 0.5. i , R j )>threshold, it is determined that the overlap information meets the preset overlap threshold, and the other current glue point candidate areas are removed from the candidate area list. Based on this, it is achieved that other glue point candidate areas whose overlap information with the current starting search area is higher than the preset overlap threshold are removed from the candidate area list. Repeat the above steps of taking the glue point candidate area with the largest candidate attribute value as the starting search area and removing the glue point candidate areas according to the overlap information until the last largest candidate attribute value is traversed, and at least one glue point candidate area after deduplication is obtained, that is, the target grid area. It should be noted that, in at least one target grid area, the candidate attribute value corresponding to each target grid area is relatively high, and there is not much overlap between the target grid areas.

[0107] S240 , after determining the target grid area, determine the glue point position information according to the pixel value information in the target grid area.

[0108] Specifically, based on the pixel value information of each pixel in the target grid area and a preset pixel threshold, pixels with pixel values exceeding the preset pixel threshold are identified and selected as candidate glue points. Based on the pixel value information of at least one candidate pixel, at least one connected domain is identified and selected as a glue point. Based on this, glue points in each target grid area can be determined. Based on the pixel coordinate information of all candidate pixels in each connected domain, the glue point location information of the corresponding glue point is determined.

[0109] It should be noted that the glue point position information of the current glue point may include the pixel coordinate information of all candidate pixel points in the current connected domain, or the glue point position information of the current glue point is the glue point coordinate information of the current glue point at the preset coordinates determined based on the pixel coordinate information of all candidate pixel points in the current connected domain.

[0110] S250: Determine a glue point detection result of the sprayed glue point under at least one spraying quality evaluation index based on the glue point position information.

[0111] The technical solution of this embodiment utilizes glue spraying modules deployed along the flow direction of the production line to apply glue dots to label paper placed on a conveyor belt. When a light source at a preset angle to the conveyor belt is applied to the target label paper on which the glue dots have been applied, a camera module captures an image of the target label paper to be processed, thereby improving the image accuracy of the processed image and avoiding image blurring caused by reflections or other factors. Based on this, the sequential deployment of the glue spraying module, camera module, and light source enables glue spraying and image acquisition on the label paper. By preprocessing the image to be processed, a grayscale image corresponding to the image to be processed is obtained. The grayscale image is gridded based on grid division information to obtain a first grid image. For each grid area in the first grid image, a target grid area is determined based on the pixel values of the grid area and the pixel values in the reference template image. Each grid area can be processed simultaneously through parallel computing, thereby improving processing speed. Furthermore, determining the target grid area where the glue dots are located based on the grid area reduces computational complexity and improves processing efficiency compared to directly determining the glue dots in the image. After determining the target grid area, the glue point position information is determined based on the pixel value information in the target grid area. Based on this, the accuracy of the determination of the glue point position information is improved. Based on the glue point position information, the glue point detection result of the sprayed glue point under at least one spraying quality evaluation index is determined. The present invention solves the problems of low detection efficiency and inability to ensure the accuracy of each glue point caused by manual detection of glue point spraying quality in the prior art, improves the accuracy and efficiency of glue point spraying quality detection, reduces quality problems caused by uneven glue or glue point position deviation, ensures the overall quality of cigarette product packaging, and thus improves the overall stability and operating efficiency of the production line.

[0112] Example 3

[0113] Figure 6 This is a schematic diagram of the structure of a device for detecting the quality of glue spraying provided by the third embodiment of the present invention. Figure 6 As shown, the device includes: an image pre-processing module 310, an image gridding processing module 320, a glue point position information determination module 330 and a glue point detection result determination module 340.

[0114] The image preprocessing module 310 is used to obtain a grayscale image corresponding to the image to be processed by preprocessing the image to be processed; the image gridding processing module 320 is used to grid the grayscale image according to pre-set grid division information to obtain a first grid image corresponding to the grayscale image; the glue point position information determination module 330 is used to determine the target grid area of the glue point sprayed in the first grid image and the corresponding glue point position information based on the first grid image and a pre-set reference template image including the glue point area; wherein the size information of the reference template image is related to the size information of each grid area in the first grid image; the glue point detection result determination module 340 is used to determine the glue point detection result of the sprayed glue point under at least one spraying quality evaluation index based on the glue point position information.

[0115] The technical solution of this embodiment is to spray glue dots on the trademark paper placed on the conveyor belt through the glue spraying module deployed along the flow direction of the production line. When a light source at a preset angle to the conveyor belt acts on the target trademark paper on which the glue dots have been sprayed, the camera module captures the image to be processed including the target trademark paper to improve the image accuracy of the image to be processed and avoid the problem of unclear image to be processed due to reflection or other reasons. Based on this, the glue spraying module, camera module and light source are deployed in sequence to achieve glue spraying and image acquisition processing of the trademark paper. By preprocessing the image to be processed, a grayscale image corresponding to the image to be processed is obtained. The grayscale image is gridded according to the grid division information to obtain a first grid image. Based on the first grid image and a pre-set reference template image including the glue dot area, the target grid area of the glue dot sprayed in the first grid image and the corresponding glue dot position information are determined. Based on the glue dot position information, the glue dot detection result of the sprayed glue dot under at least one spraying quality evaluation index is determined. The present invention solves the problems of low detection efficiency and inability to ensure the accuracy of each glue point caused by manual detection of glue point spraying quality in the prior art, improves the accuracy and efficiency of glue point spraying quality detection, reduces quality problems caused by uneven glue or glue point position deviation, ensures the overall quality of cigarette product packaging, and thus improves the overall stability and operating efficiency of the production line.

[0116] Based on the above embodiment, optionally, the glue point position information determination module includes a target grid area determination unit, which is used to determine the target grid area for each grid area in the first grid image based on the pixel value of the grid area and the pixel value in the reference template image.

[0117] Optionally, the target grid area determination unit includes: an error result information determination subunit, used to determine the error result information of the grid area by performing mean square error processing on the pixel values of the same pixel point in the grid area and the reference template image; a glue point candidate area determination subunit, used to determine the grid area as a glue point candidate area when the error result information and a preset error threshold meet preset conditions; and a target grid area determination subunit, used to determine the target grid area from the glue point candidate area.

[0118] Optionally, a target grid area determination subunit is used to process the pixel values of the glue point candidate area and the same pixel point in the reference template image using a normalized cross-correlation function to determine the candidate attribute value of the glue point candidate area; the glue point candidate area with the largest candidate attribute value is used as the starting search area, and the overlap information of the starting search area with other glue point candidate areas is determined; when the overlap information meets the preset overlap threshold, the other glue point candidate areas are removed from the candidate area list, and the steps of using the glue point candidate area with the largest candidate attribute value as the starting search area and removing the glue point candidate area according to the overlap information are repeated until the last largest candidate attribute value is traversed to obtain the target grid area.

[0119] Optionally, the glue point position information determination module further includes: a glue point position information determination unit configured to determine the glue point position information based on pixel value information in the target grid area.

[0120] Optionally, the glue dot detection result determination module includes: a first detection result determination unit, used to determine the position deviation information based on the glue dot position information and pre-set position information, so as to determine the first detection result under the position detection index based on the position deviation information; a second detection result determination unit, used to determine the glue dot shape information based on the glue dot position information, so as to determine the second detection result under the glue dot shape index based on the glue dot shape information and corresponding judgment conditions; a third detection result determination unit, used to determine the ratio of the glue dot perimeter to the area based on the glue dot position information, and determine the third detection result of the glue dot under the integrity index; a glue dot detection result determination unit, used to determine the glue dot detection result based on the first detection result, the second detection result and the third detection result.

[0121] Optionally, the second detection result determination unit is used to determine the glue dot aspect ratio, area information and roundness information based on the glue dot position information, so as to determine the second detection result based on the glue dot aspect ratio, area information, roundness information and judgment conditions corresponding to the glue dot shape information.

[0122] Optionally, the glue point detection result includes at least one or more of a glue overflow detection result, a glue deficiency detection result, and a normal glue spraying detection result. The device also includes: a detection report generation module, which is used to generate a detection report corresponding to the glue point detection result based on each glue spraying point.

[0123] The device for detecting the quality of glue dot spraying provided by the embodiment of the present invention can execute the method for detecting the quality of glue dot spraying provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0124] Example 4

[0125] Figure 7 1 is a structural diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0126] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0127] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0128] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for detecting the quality of glue dot spraying.

[0129] In some embodiments, the method for detecting glue point spraying quality can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for detecting glue point spraying quality described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the method for detecting glue point spraying quality in any other appropriate manner (e.g., by means of firmware).

[0130] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0131] The computer programs for implementing the method for detecting the quality of glue dot spraying of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0132] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.

[0133] Example 5

[0134] Embodiment 5 of the present invention further provides a computer-readable storage medium storing computer instructions, the computer instructions being used to cause a processor to execute a method for detecting the quality of glue dot spraying, wherein a glue spraying module, a camera module, and a light source are sequentially deployed along the flow direction of the production line, the glue spraying module being used to spray glue dots on the trademark paper placed on the conveyor belt, the light source being at a preset angle to the conveyor belt and being used to illuminate the target trademark paper on which the glue dots have been sprayed, and the camera module being used to capture an image to be processed including the target trademark paper, the method comprising:

[0135] By preprocessing the image to be processed, a grayscale image corresponding to the image to be processed is obtained; the grayscale image is gridded according to preset grid division information to obtain a first grid image corresponding to the grayscale image; based on the first grid image and a preset reference template image including the glue dot area, the target grid area of the glue dot sprayed in the first grid image and the corresponding glue dot position information are determined; wherein the size information of the reference template image is related to the size information of each grid area in the first grid image; based on the glue dot position information, the glue dot detection result of the sprayed glue dot under at least one spraying quality evaluation index is determined.

[0136] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0138] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0139] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0140] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0141] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for detecting the quality of glue point spraying, characterized in that: A glue spraying module, a camera module, and a light source are sequentially arranged along the flow direction of the production line. The glue spraying module is used to spray glue dots on the label paper placed on the conveyor belt. The light source is at a preset angle to the conveyor belt to illuminate the target label paper on which the glue dots have been sprayed. The camera module is used to capture an image to be processed including the target label paper. The method includes: Obtaining a grayscale image corresponding to the image to be processed by preprocessing the image to be processed; Gridding the grayscale image according to preset grid division information to obtain a first grid image corresponding to the grayscale image; Determining target grid areas for spraying glue dots and corresponding glue dot position information in the first grid image based on the first grid image and a preset reference template image including glue dot areas; wherein the size information of the reference template image is related to the size information of each grid area in the first grid image; A glue point detection result of the sprayed glue point under at least one spraying quality evaluation index is determined based on the glue point position information.

2. The method according to claim 1, characterized in that The step of determining a target grid area for spraying glue dots in the first grid image based on the first grid image and a preset reference template image including a glue dot area includes: For each grid area in the first grid image, a target grid area is determined according to a pixel value of the grid area and a pixel value in the reference template image.

3. The method according to claim 2, characterized in that The determining of the target grid area according to the pixel values of the grid area and the pixel values in the reference template image includes: Determine error result information of the grid area by performing mean square error processing on pixel values of the same pixel point in the grid area and the reference template image; When the error result information and the preset error threshold meet a preset condition, determining the grid area as a glue point candidate area; The target grid area is determined from the glue point candidate areas.

4. The method according to claim 3, characterized in that The step of determining the target grid area from the glue point candidate area includes: For the glue spot candidate area, a normalized cross-correlation function is used to process pixel values of the glue spot candidate area and the same pixel point in the reference template image to determine a candidate attribute value of the glue spot candidate area; Taking the glue point candidate area with the largest candidate attribute value as the starting search area, and determining the overlap information of the starting search area with other glue point candidate areas respectively; When the overlap information meets the preset overlap threshold, the other glue point candidate areas are removed from the candidate area list, and the steps of taking the glue point candidate area with the largest candidate attribute value as the starting search area and removing the glue point candidate area according to the overlap information are repeated until the last largest candidate attribute value is traversed and the target grid area is obtained.

5. The method according to claim 1, wherein After determining the target grid area, the method further includes: The glue point position information is determined based on the pixel value information in the target grid area.

6. The method according to claim 1, characterized in that Determining a glue point detection result of the sprayed glue point under at least one spraying quality evaluation index based on the glue point position information includes: Determining position deviation information based on the glue point position information and pre-set position information, so as to determine a first detection result under the position detection index according to the position deviation information; Determining glue dot shape information according to the glue dot position information, and determining a second detection result under the glue dot shape index based on the glue dot shape information and corresponding judgment conditions; Determining a ratio of a perimeter to an area of the glue dot based on the glue dot location information, and determining a third test result of the glue dot under an integrity index; The glue point detection result is determined according to the first detection result, the second detection result, and the third detection result.

7. The method according to claim 6, characterized in that The step of determining the glue dot shape information based on the glue dot position information, and determining a second detection result under the glue dot shape index based on the glue dot shape information and corresponding judgment conditions, includes: According to the glue dot position information, the glue dot aspect ratio, area information and roundness information are determined, so as to determine the second detection result based on the glue dot aspect ratio, the area information, the roundness information and the judgment conditions corresponding to the glue dot shape information.

8. The method according to claim 1, characterized in that: The glue point detection result includes at least one or more of a glue overflow detection result, a glue deficiency detection result, and a normal glue spraying detection result. The method further includes: A test report corresponding to the test result of each glue point is generated based on each glue point sprayed.

9. A device for detecting the quality of glue spraying, characterized in that: A glue spraying module, a camera module, and a light source are sequentially arranged along the flow direction of the production line. The glue spraying module is used to spray glue dots on the label paper placed on the conveyor belt. The light source is at a preset angle to the conveyor belt to illuminate the target label paper with glue dots sprayed on it. The camera module is used to capture an image to be processed including the target label paper. The device includes: An image preprocessing module, configured to obtain a grayscale image corresponding to the image to be processed by preprocessing the image to be processed; An image gridding processing module, configured to grid the grayscale image according to preset grid division information to obtain a first grid image corresponding to the grayscale image; a glue dot position information determination module, configured to determine a target grid area for the glue dot to be sprayed in the first grid image and corresponding glue dot position information based on the first grid image and a preset reference template image including the glue dot area; wherein the size information of the reference template image is related to the size information of each grid area in the first grid image; The glue point detection result determination module is used to determine the glue point detection result of the sprayed glue point under at least one spraying quality evaluation index based on the glue point position information.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for detecting the glue dot spraying quality according to any one of claims 1 to 8.

Citation Information

Cited By

  • Material information base updating method and device, electronic equipment and readable storage medium

    CN121446741A

  • Vision-based method for evaluating gluing uniformity of water-based casein glue for labeling glass bottles

    CN121921322A

  • Visual-based evaluation method for adhesive uniformity of water-based casein adhesive for labeling glass bottles

    CN121921322B