Visual detection method and system for zip-top can code spraying in high-speed production line

By adopting a defect detection algorithm based on the joint judgment of area gray value and injection size in the can-coding character detection system, combined with adaptive denoising and morphological processing technology, the problems of light instability and dependence of deep learning models are solved, and high-precision, stability and low-threshold detection effects are achieved.

CN119941672APending Publication Date: 2025-05-06TIANJIN SINO GERMAN VOCATIONAL TECHNICAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510015682.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing can-coding character detection system is difficult to maintain high precision in unstable lighting and complex production environments, and its dependence on deep learning models increases technical thresholds and costs.

Method used

A defect detection algorithm based on the joint judgment of area grayscale values ​​and injection size is adopted. By dynamically adjusting the image threshold and area grayscale mean, combined with adaptive denoising, edge enhancement and morphological processing technology, the dependence on light and the dependence on deep learning models is reduced.

Benefits of technology

Maintaining high-precision detection effect under different lighting conditions improves the stability and accuracy of detection, lowers the technical threshold, and adapts to production environments of different scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941672A_ABST
    Figure CN119941672A_ABST
Patent Text Reader

Abstract

The invention discloses a visual detection method and system for pop-top can code spraying in a high-speed production line, and the detection method comprises the following steps: 1), obtaining an image containing code spraying characters, and carrying out the preprocessing of the image through a self-adaptive denoising algorithm, an edge enhancement technology and character segmentation; 2) extracting a code spraying area; 3) code spraying defect judgment; 4) character processing; and 5) outputting detection information. According to the invention, excessive dependence on illumination is avoided, and the detection stability is improved; the technical threshold is effectively reduced while high efficiency and accuracy are guaranteed, and the method adapts to production environments of different scales on the premise that performance is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual inspection, and in particular to a visual inspection method and system for spraying codes on cans in a high-speed production line. Background Art

[0002] The detection and recognition of the inkjet characters on cans has become a key link in ensuring product traceability and quality safety. Machine vision technology has gradually become an ideal solution to replace manual inspection.

[0003] In recent years, research at home and abroad has further deepened the application of machine vision in the detection of inkjet characters on cans, focusing on improving the adaptability and intelligence of the detection system. Although the existing inkjet detection system has solved the problems of unstable lighting and character recognition accuracy to a certain extent, it still faces some difficult-to-overcome challenges. First of all, unstable lighting conditions, especially when the surface of the can is highly reflective, will still affect the image quality and thus reduce the accuracy of detection. Existing solutions mainly focus on the combination of high-resolution cameras and intelligent lighting systems, trying to optimize the imaging effect by adjusting the angle and intensity of the light source. However, these methods are still difficult to completely eliminate the impact of lighting changes in complex production environments, and the processing process is relatively cumbersome, making it difficult to achieve real-time and effective lighting adjustments in high-speed production lines.

[0004] At the same time, the domestic market has a growing demand for visual inspection. Domestic companies pay particular attention to cost-effectiveness optimization. Existing algorithms often rely on deep learning models and require a lot of computing resources and data support, which poses a high technical threshold and cost pressure for small and medium-sized enterprises. Summary of the invention

[0005] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a visual inspection method and system for can coding in a high-speed production line, which avoids excessive reliance on light and improves detection stability; while ensuring high efficiency and accuracy, it effectively lowers the technical threshold and adapts to production environments of different scales while ensuring performance.

[0006] The present invention provides a visual inspection method for can coding in a high-speed production line, comprising the following steps:

[0007] 1) Obtain an image containing coded characters and pre-process the image by using an adaptive denoising algorithm, edge enhancement technology and character segmentation;

[0008] 2) Extraction of coding area;

[0009] Mark a circular area in the image with the center of the coded character as the center and covering the coded character, and cut off the part of the image outside the circular area to obtain a cut image; perform threshold processing on the cut image, preset a grayscale threshold that is smaller than the coded character and larger than the rest of the area, and take the part of the cut image that is higher than the grayscale threshold as the effective area; then perform closing and opening operations on the effective area, and then find the part with the largest area of ​​the effective area in the cut image as the coded area by segmenting the connected domain and selecting the eigenvalue; calculate the area, center position, length, width and rotation angle of the coded character in the coded area by obtaining the area, center and minimum enclosing rectangle of the area;

[0010] 3) Determination of coding defects;

[0011] Code size judgment: if the area, length or height of the code characters in the coding area does not meet the preset range, it will be marked as a defect;

[0012] Missing character detection: if missing characters are detected, it will be marked as a defect;

[0013] Rotation correction: determine the long side of the coding area and rotate the coding area to make it display in the positive direction;

[0014] Character detection: find the coding characters in the coding area and calculate the width, height and number of coding characters based on the text model;

[0015] 4) Character processing;

[0016] Missing character supplement: if the number of inkjet characters is detected to be insufficient, the missed characters will be found and repaired;

[0017] Character adhesion processing: if the coded characters are horizontally adhered, that is, the character spacing is too small, they will be split or merged;

[0018] Draw all valid character frames, mark the character positions, and display them in the coding area;

[0019] 5) Output detection information.

[0020] Furthermore, in the step 1), a ring light source is provided when acquiring the image.

[0021] Furthermore, in step 5), the detection information includes the area, length, and number of characters of the coded characters.

[0022] In addition, the present invention also provides a detection system for the visual detection method of can coding in the above-mentioned high-speed production line, comprising:

[0023] The detection box has an inlet on one side and an outlet on the other side;

[0024] a high-speed conveyor belt passing through the inlet and outlet arrangements;

[0025] Photoelectric sensor modules are fixedly arranged in the detection box and located on both sides above the high-speed conveyor belt;

[0026] A visual inspection module is arranged in the inspection box and located above the high-speed conveyor belt, and is used to obtain the image of the inkjet character;

[0027] The PLC and integrated circuit modules are arranged in the detection box and are electrically connected to the high-speed conveyor belt, the photoelectric sensor module and the visual detection module respectively;

[0028] The rejecting device is arranged on one side of the high-speed conveyor belt close to the transmission end, is electrically connected to the PLC and the integrated circuit module, and is used to reject defective products.

[0029] Furthermore, the visual inspection module includes a first bracket fixedly disposed in the inspection box, an industrial camera is disposed on the first bracket above the high-speed conveyor belt, and an annular light source is disposed on the first bracket between the industrial camera and the high-speed conveyor belt.

[0030] Furthermore, the rejection device includes a second bracket fixedly arranged on the side of the high-speed conveyor belt close to the transmission end, a linear motor is fixedly arranged on the second bracket, and an output end of the linear motor is transmission-connected to a push rod.

[0031] Furthermore, the PLC and integrated circuit module are communicatively connected to a product traceability database.

[0032] Compared with the prior art, the beneficial effects of the present invention are:

[0033] (1) The defect detection algorithm of the present invention is based on the joint judgment of regional grayscale value and inkjet code size. By dynamically adjusting the image threshold and regional grayscale mean value, it ensures that high-precision detection effects can be maintained under different lighting conditions. This strategy can effectively cope with the challenges of lighting changes in the production site environment, avoid excessive dependence on lighting, and improve the stability of detection.

[0034] (2) The present invention uses morphologically based coding area preprocessing and character recognition technology to ensure high efficiency and accuracy while avoiding the complex training requirements of deep learning models, effectively lowering the technical threshold and adapting to production environments of different scales while ensuring performance, thus having extremely high promotion value.

[0035] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0037] Figure 1 is a flow chart of the visual inspection method;

[0038] Figure 2 It is the structural diagram of the detection system;

[0039] Figure 3 It is a structural diagram of the visual detection module;

[0040] Figure 4 It is a schematic diagram of the structure of the rejection device.

[0041] Numbers in the figure: 1. Detection box; 2. High-speed conveyor belt; 3. Photoelectric sensor module; 4. Visual inspection module; 5. PLC and integrated circuit module; 6. Rejection device;

[0042] 41. first bracket; 42. industrial camera; 43. ring light source;

[0043] 61. Second bracket; 62. Linear motor; 63. Push rod. DETAILED DESCRIPTION

[0044] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0045] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0046] Please refer to Figure 1 The embodiment of the present invention provides a visual inspection method for can coding in a high-speed production line, comprising the following steps:

[0047] 1) Equipped with a ring light source, the image containing the inkjet characters is acquired, and the image is pre-processed by adaptive denoising algorithm, edge enhancement technology and character segmentation;

[0048] 2) Extraction of coding area;

[0049] Mark a circular area in the image with the center of the coded character as the center and covering the coded character, and cut off the part of the image outside the circular area to obtain a cut image; perform threshold processing on the cut image, preset a grayscale threshold that is smaller than the coded character and larger than the rest of the area, and take the part of the cut image that is higher than the grayscale threshold as the effective area, then perform closing and opening operations on the effective area, and then find the part with the largest area of ​​the effective area in the cut image as the coded area by segmenting the connected domain and selecting the eigenvalue; calculate the area, center position, length, width and rotation angle of the coded character in the coded area by obtaining the area, center and minimum enclosing rectangle of the area;

[0050] 3) Determination of coding defects;

[0051] Code size judgment: if the area, length or height of the code characters in the coding area does not meet the preset range, it will be marked as a defect;

[0052] Missing character detection: if missing characters are detected, it will be marked as a defect;

[0053] Rotation correction: determine the long side of the coding area and rotate the coding area to make it display in the positive direction;

[0054] Character detection: find the coding characters in the coding area and calculate the width, height and number of coding characters based on the text model;

[0055] 4) Character processing;

[0056] Missing character supplement: if the number of inkjet characters is detected to be insufficient, the missed characters will be found and repaired;

[0057] Character adhesion processing: if the coded characters are horizontally adhered, that is, the character spacing is too small, they will be split or merged;

[0058] Draw all valid character frames, mark the character positions, and display them in the coding area;

[0059] 5) Output detection information, including the area, length and number of characters of the coded characters.

[0060] In this embodiment, the defect detection algorithm based on the joint judgment of regional grayscale value and inkjet size ensures high-precision detection under different lighting conditions by dynamically adjusting the image threshold and regional grayscale mean. This strategy can effectively cope with the challenges of lighting changes in the production site environment, avoid excessive dependence on lighting, and improve the stability of detection.

[0061] Through the coding area preprocessing and character recognition technology based on morphological processing, while ensuring high efficiency and accuracy, the complex training requirements of deep learning models are avoided, effectively lowering the technical threshold and being cost-effective. It can adapt to production environments of different scales while ensuring performance and has extremely high promotion value.

[0062] Also, please refer to Figure 2 to Figure 4 The embodiment of the present invention further provides a detection system for the visual detection method of can coding in the above-mentioned high-speed production line, comprising:

[0063] The detection box 1 has an inlet on one side and an outlet on the other side;

[0064] A high-speed conveyor belt 2 is provided passing through the inlet and outlet;

[0065] The photoelectric sensor module 3 is fixedly arranged in the detection box 1 and located on both sides above the high-speed conveyor belt 2;

[0066] The visual inspection module 4 is arranged in the inspection box 1 and located above the high-speed conveyor belt 2, and is used to obtain the inkjet character image; the visual inspection module 4 includes a first bracket 41 fixedly arranged in the inspection box 1, an industrial camera 42 is arranged on the first bracket 41 and located above the high-speed conveyor belt 2, and an annular light source 43 is arranged on the first bracket 41 and located between the industrial camera 42 and the high-speed conveyor belt 2;

[0067] The PLC and integrated circuit module 5 are arranged in the detection box 1 and are electrically connected to the high-speed conveyor belt 2, the photoelectric sensor module 3, the visual detection module 4 and the product traceability database respectively;

[0068] The rejection device 6 is arranged on the side of the high-speed conveyor belt 6 close to the transmission end, is electrically connected to the PLC and the integrated circuit module 5, and is used to reject defective products; the rejection device 6 includes a second bracket 61 fixedly arranged on the side of the high-speed conveyor belt 2 close to the transmission end, and a linear motor 62 is fixedly arranged on the second bracket 61, and the output end of the linear motor 62 is transmission-connected to a push rod 62.

[0069] In this embodiment, on the production line, cans are transported by a high-speed conveyor belt 2, and first pass through a photoelectric sensor module 3. When the photoelectric sensor module 3 detects that the cans have passed, the target is confirmed, and the cans enter the visual inspection area. The industrial camera 42 here collects images in real time, and combines the uniform lighting provided by the ring light source 43 to optimize the shooting effect. The detection system interface is designed by Qt Designer, with an image display area on the left and a parameter adjustment area on the right. It supports two login modes, operator and administrator. The administrator can flexibly set it in the parameter adjustment area. The interface also includes functional modules such as running status, log recording, job loading, offline testing, and image saving. Users can monitor the detection status of the system in real time, view logs, and manage and test jobs.

[0070] After image acquisition, the detection system performs preprocessing operations such as denoising, edge enhancement and character segmentation on the image to ensure the clarity of character recognition. Denoising uses Gaussian filtering to effectively reduce the noise in the image through convolution operations, and edge enhancement uses the Canny algorithm to highlight the edges of characters for better character recognition. Character recognition uses the OCR module in the Halcon software, which combines template matching and feature extraction algorithms to enable the system to accurately identify the coded characters when the characters are blurred or deformed. Template matching detects and identifies the coded content by comparing the similarity between the character image and the standard template. The detection system adjusts the sensitivity of character extraction by setting the threshold range. When missing characters or abnormal character spacing are detected, the detection system automatically adjusts the parameters to ensure the integrity of the character information, thereby improving the accuracy of recognition.

[0071] When the inkjet character is identified as a defective character, the PLC and integrated circuit module 5 controls the linear motor 62 of the rejection device 6 to start, driving the push rod 62 to extend to complete the defective product rejection operation. The push rod 62 is arranged in a direction perpendicular to the high-speed conveyor belt 2.

[0072] The detection system of the present application allows the user to flexibly adjust the detection parameters of the industrial camera 42 and the control parameters of the detection system to meet the requirements of different production environments. The detection parameters of the industrial camera 42 include exposure time and gain size. Through the slider or numerical input, the operator can adjust the image acquisition conditions to adapt to different lighting conditions. The control parameters support the adjustment of the speed of the high-speed conveyor belt 2, the lighting time of the annular light source 43, and the trigger time of the rejection device 6, ensuring that the detection system maintains efficient and stable detection performance at a variety of production speeds. In addition, users can set the number of pulses per millimeter and the light source lighting pulse time through the global parameter module in the detection system, automatically update the settings and adjust synchronously, which enhances the adaptability and flexibility of the detection system.

[0073] The inkjet code detection is the core function of the detection system. It uses multiple parameters for comprehensive detection, including the inkjet code threshold, total area, total character height and total width, etc., to accurately identify the inkjet code content. If characters are missing, the detection system restores the character information by adjusting the character spacing and missing character compensation parameters to ensure the integrity and reliability of the inkjet code detection.

[0074] The inspection system is integrated with the product traceability database to achieve real-time recording of inspection data and automatic classification management of defective products. Users can choose to store each inspection image and defective product image to facilitate subsequent data analysis and quality control during production. The operation log module records the system's working status, total number of inspections, statistics of good and defective products, and issues an alarm when image acquisition is abnormal, ensuring that operators can obtain information and make adjustments in a timely manner. The job loading function allows users to create or load job tasks to meet the job requirements of different production lines.

[0075] In the defective product rejection part of the production line, when the detection system identifies defective products, the rejection device 6 will accurately start the rejection process based on the feedback information of the photoelectric sensor module 3. The rejection device 6 can set the rejection duration and its distance from the sensor to achieve accurate rejection. In addition, if there is a system abnormality or detection failure during the production process, the system will trigger the alarm device and start the emergency stop operation according to the situation to ensure the safety and stable operation of the production line. The alarm mechanism can promptly notify the operator to handle the fault, thereby avoiding production losses.

[0076] Through the close integration of software and hardware, the present invention realizes real-time detection and quality control on the production line. The entire system not only has efficient and stable inkjet character detection capabilities, but also provides flexible application support through parameter adjustment and system integration. In short, the system greatly improves the automation level and accuracy of production line detection, and provides strong technical support for quality control and production efficiency improvement in fast-moving consumer goods industries such as cans.

[0077] The present invention uses a high-resolution industrial camera 42 to collect real-time images, and through a variety of image processing algorithms (such as adaptive denoising, edge enhancement, character segmentation, etc.), ensures that clear character images are obtained under various lighting conditions. This method effectively copes with the light interference caused by the reflection on the surface of the can, and significantly improves the detection accuracy and stability. Secondly, the present invention uses optical character recognition (OCR) technology to identify inkjet characters, and through template matching and feature extraction technology, it can recognize characters of various fonts, sizes and angles. It overcomes the defect of insufficient recognition of traditional visual systems when characters are deformed, blocked or blurred, and improves the robustness of character recognition.

[0078] In the description of this specification, the terms "connection", "installation", "fixation" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0079] In the description of this specification, the description of the terms "one embodiment", "some embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0080] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A visual inspection method for can coding in a high-speed production line, characterized in that: The steps include: 1) Obtain an image containing coded characters and pre-process the image by using an adaptive denoising algorithm, edge enhancement technology and character segmentation; 2) Extraction of coding area; Mark a circular area in the image with the center of the inkjet character as the center and covering the inkjet character, and cut off the part of the image outside the circular area to obtain a cut image; Threshold processing is performed on the cropped image, and a grayscale threshold that is smaller than the coding character and larger than the rest of the area is preset, and the part of the cropped image that is higher than the grayscale threshold is taken as the effective area; then the effective area is closed and opened, and the part with the largest area of ​​the effective area in the cropped image is found as the coding area by segmenting the connected domain and selecting the eigenvalue area; the area, center position, length, width and rotation angle of the coding character in the coding area are calculated by obtaining the area, center and minimum enclosing rectangle of the area; 3) Determination of coding defects; Code size judgment: if the area, length or height of the code characters in the coding area does not meet the preset range, it will be marked as a defect; Missing character detection: if missing characters are detected, it will be marked as a defect; Rotation correction: determine the long side of the coding area and rotate the coding area to make it display in the positive direction; Character detection: find the coding characters in the coding area and calculate the width, height and number of coding characters based on the text model; 4) Character processing; Missing character supplement: if the number of inkjet characters is detected to be insufficient, the missed characters will be found and repaired; Character adhesion processing: if the coded characters are horizontally adhered, that is, the character spacing is too small, they will be split or merged; Draw all valid character frames, mark the character positions, and display them in the coding area; 5) Output detection information.

2. The visual inspection method for inkjet printing of cans in a high-speed production line according to claim 1, characterized in that: In the step 1), a ring light source is provided when acquiring the image.

3. The visual inspection method for can coding in a high-speed production line according to claim 2, characterized in that: In the step 5), the detection information includes the area, length and number of characters of the coded characters.

4. A detection system for the visual detection method of can coding in a high-speed production line according to any one of claims 1 to 3, characterized in that: include: A detection box (1) is provided with an inlet on one side and an outlet on the other side; A high-speed conveyor belt (2) is arranged through the inlet and the outlet; A photoelectric sensor module (3) is fixedly arranged in the detection box (1) and located on both sides above the high-speed conveyor belt (2); A visual inspection module (4) is arranged in the inspection box (1) and located above the high-speed conveyor belt (2), and is used to obtain an image of inkjet-coded characters; A PLC and integrated circuit module (5) is arranged in the detection box (1) and is electrically connected to the high-speed conveyor belt (2), the photoelectric sensor module (3) and the visual detection module (4) respectively; A rejecting device (6) is arranged on one side of the high-speed conveyor belt (2) close to the transmission end, is electrically connected to the PLC and the integrated circuit module (5), and is used to reject defective products.

5. The detection system according to claim 4, characterized in that: The visual inspection module (4) comprises a first bracket (41) fixedly arranged in the inspection box (1), an industrial camera (42) being arranged on the first bracket (41) above the high-speed conveyor belt (2), and an annular light source (43) being arranged on the first bracket (41) between the industrial camera (42) and the high-speed conveyor belt (2).

6. The detection system according to claim 4, characterized in that: The rejection device (6) comprises a second bracket (61) fixedly arranged on a side of the high-speed conveyor belt (2) close to the transmission end, a linear motor (62) being fixedly arranged on the second bracket (61), and an output end of the linear motor (62) being transmission-connected to a push rod (63).

7. The detection system according to claim 4, characterized in that: The PLC and integrated circuit module (5) are communicatively connected to a product tracing database.