Method and system for detecting plating layer of flexible die-cutting circuit board
By using the uniform grayscale value TLOET and the defect offset grayscale value KOT, the problem of identifying bright and dark defects in the defect detection of flexible circuit boards was solved, and high-precision defect area identification and differentiation was achieved.
Patent Information
- Application Number
- CN202511486810.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-13
AI Technical Summary
In existing technologies, it is difficult for flexible circuit board defect detection methods to simultaneously identify bright and dark defects, and the maximum variance threshold segmentation method cannot adapt to the problem of the bidirectional nature of grayscale features.
Using uniform grayscale value TLOET and defect offset grayscale value KOT, bright and dark defect grids are identified through image recognition and grid segmentation, and the real defect area is obtained by combining grayscale value comparison.
It improves the accuracy and reliability of defect detection in flexible circuit boards, effectively identifies different defects on grayscale images, avoids misidentification, and adapts to both bright and dark defects.
Smart Images

Figure CN121329928A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition, specifically relating to a method and system for detecting the coating of flexible die-cut circuit boards. Background Technology
[0002] In defect detection of flexible printed circuit boards, the grayscale characteristics of defect areas exhibit a bidirectional nature. This bidirectional nature manifests as bright and dark defects. Bright defects are mainly caused by increased reflectivity due to added material or changes in surface orientation, such as copper foil residue, protrusions, highly reflective foreign objects, and shallow scratches at specific angles, which appear as high grayscale values in the image. Dark defects, on the other hand, originate from material loss, contamination, or light absorption effects, such as open circuits, pits, dirt, oxidation, and deep scratches or solder bridges that create shadows, which appear as low grayscale value areas. Therefore, defect identification algorithms must be able to simultaneously capture both bright and dark deviations relative to the background to ensure comprehensive detection of various defects. However, the Chinese patent CN118552542B, "A Method for Quality Detection of Surface Coating of Flexible Circuit Board Based on Image Recognition," uses the maximum variance threshold segmentation method to obtain the defect area. However, the maximum variance threshold segmentation method ultimately yields a threshold. In the defect detection of flexible circuit boards, the grayscale features of the defect area are bidirectional, and a single threshold cannot simultaneously and correctly identify both bright and dark defects in the flexible circuit board coating. Summary of the Invention
[0003] The present invention aims to at least partially solve one of the technical problems in the related art. To this end, the first objective of the present invention is to propose a coating detection method for flexible die-cut circuit boards, which can avoid the problem that a single threshold is difficult to simultaneously adapt to bright and dark defects when the grayscale characteristics of surface defects of flexible circuit boards exhibit bidirectionality, and can effectively distinguish and identify different defects on the grayscale image through image detection; The second objective of this invention is to provide a coating inspection system for flexible die-cut circuit boards.
[0004] To achieve the above objectives, the first aspect of the present invention provides a method for detecting the plating layer of a flexible die-cut circuit board, the method comprising the following steps: S100: Acquire an image of the surface of the flexible circuit board to be inspected, and obtain an image of the plating layer of the flexible circuit board to be inspected through image recognition; S200: Perform grayscale processing on the coating image of the flexible circuit board to be inspected to obtain a grayscale image of the coating image of the flexible circuit board to be inspected. S300: The defect area is divided into meshes, and the uniform gray value of the defect area is calculated. S400 obtains dark and bright defect meshes by uniform grayscale values; S500 obtains the real defect area through dark defect mesh and bright defect mesh.
[0005] The detection method according to the embodiments of the present invention can avoid the problem that a single threshold is difficult to adapt to both bright and dark defects when the grayscale features of defects on the surface of flexible circuit boards are bidirectional. It can effectively distinguish and identify different defects on the grayscale image through image detection.
[0006] Furthermore, in step S100, acquiring an image of the surface of the flexible circuit board to be inspected, and obtaining an image of the plating layer of the flexible circuit board to be inspected through image recognition, includes: A high-resolution camera is used to image the flexible circuit board and capture its surface information; an edge detection algorithm is used to identify and segment the surface coating area and exclude irrelevant areas such as the base plate, circuits or background. Furthermore, in step S200, the grayscale processing of the coating image of the flexible circuit board to be inspected to obtain a grayscale image of the coating image of the flexible circuit board to be inspected includes: Each pixel of the coating image of the flexible circuit board to be inspected is converted to grayscale, thus transforming the coating image of the flexible circuit board into a grayscale image.
[0007] Furthermore, in step S300, the grayscale image is divided into grids, and the uniform grayscale value of the defect region is calculated, including: The grayscale image is divided into several 20-pixel × 20-pixel grids. Let Lt(i) represent the gray value of the i-th grid in the grayscale image, where the gray value of the grid is the average of the gray values of all pixels in the grid, and i is the grid number, i=0,1,2,…,t, where t is the number of grids. Create an empty sequence LTfe and import Lt(i) into the sequence LTfe as elements in ascending order. Obtain the first quartile, third quartile, and median of the sequence LTfe, where the first quartile is denoted as La, the third quartile as Lb, and the median as Lc.
[0008] The uniform grayscale value TLOET is calculated as follows: the average trapped grayscale value LaD and the complexity coefficient LOE are calculated, where LaD = La / 4 + Lb / 4 + Lc / 2, and the complexity coefficient LOE = 1 - α, where α is the range of complex distance offset, and α is the sum of [LaD-Lt(i)] from i=0 to i=t divided by (t×Lc); TLOET is calculated using the average trapped grayscale value LaD and the complexity coefficient LOE, where TLOET = LaD×LOE.
[0009] LaD is the weighted average of the grayscale grid values, which combines the grayscale statistics of the first quartile, the third quartile, and the median. The weighted average LaD can show the balanced influence of each statistic on the overall grayscale distribution of the grayscale image, and integrate the grayscale characteristics of these three factors into a single value. The complexity coefficient LOE is used to represent the complexity and anomaly of defective areas in the grayscale image. It is calculated by the deviation between the average trapped grayscale value and the grayscale values of each grid. The complexity coefficient LOE can reflect the complexity of grayscale values in the image. The larger the complexity coefficient LOE value, the greater the grayscale fluctuation or anomaly in the grayscale image.
[0010] Among them, the uniform grayscale value TLOET is a grayscale value used in defect detection to represent the grayscale characteristics of a defective region relative to a normal region. TLOET is calculated based on the relationship between the grayscale distribution of the defective region and the grayscale distribution of the healthy region. It obtains the ideal grayscale value of the normal region by combining the first quartile, third quartile, and median of grayscale statistics with a complexity coefficient. Compared to obtaining the ideal grayscale value of the normal region through average grayscale, TLOET has significant advantages. By comprehensively considering the first quartile, third quartile, and median, TLOET avoids the sensitivity of average grayscale values to abnormal grayscale values, providing a more balanced grayscale standard. Furthermore, TLOET can effectively adapt to the bidirectional grayscale characteristics of bright and dark defects, while average grayscale values struggle to handle both types of defects simultaneously. By introducing a complexity coefficient (LOE), TLOET improves the accuracy of defect detection, especially when the image grayscale distribution is uneven or noisy. In addition, TLOET can identify subtle defects, improving the detection capability of fine-grained defects.
[0011] In the defect detection of flexible printed circuit boards, the grayscale characteristics of the defect area exhibit a two-way relationship. Bright defects are mainly caused by the addition of material or changes in surface orientation, leading to enhanced reflectivity. Examples include copper foil residue, protrusions, highly reflective foreign objects, and shallow scratches at specific angles, which appear as high grayscale values in the image. Dark defects, on the other hand, originate from material loss, contamination, or light absorption effects, such as open circuits, pits, dirt, oxidation, and deep scratches or solder bridges that create shadows. These defects appear as low grayscale value areas. Therefore, the defect identification algorithm must be able to capture both the bright and dark deviations relative to the background to ensure comprehensive detection of various defects. However, the Chinese patent CN118552542B, "A Method for Quality Inspection of Surface Coating of Flexible Circuit Board Based on Image Recognition," uses the maximum variance threshold segmentation method to obtain the defect area. However, the maximum variance threshold segmentation method ultimately yields a threshold. In the defect detection of flexible circuit boards, the grayscale features of the defect area are bidirectional, and a single threshold cannot simultaneously and correctly identify both bright and dark defects in the flexible circuit board coating. To solve the above problems, this invention proposes step S400.
[0012] Furthermore, in step S400, obtaining the dark defect mesh and the bright defect mesh by uniformizing grayscale values includes: Obtain the grayscale values TA and TB of the bright trap; where TA = (TLOET + Lb) / 2; TB = (TLOET + La) / 2; and denote the meshes with grayscale values less than TA as dark defect meshes, and denote the meshes with grayscale values greater than TB as bright defect meshes. Bidirectional defect identification can be achieved using the brightness trap grayscale value TA and the darkness trap grayscale value TB, which can handle both bright and dark defects. However, it may not be sensitive enough to extremely small, low-contrast defects. For example, slight scratches or tiny surface defects may not show significant changes in grayscale values, making it impossible for TA and TB to accurately identify these minute defects. To solve the above problem, the present invention proposes the following preferred method: Preferably, the method for obtaining dark defect mesh and bright defect mesh by uniform gray value further includes: S401, calculating the gray value of the defect offset KOT=(Lb-Lc) / 2+(Lc-La) / 2; (Lb-Lc) / 2 is used to reflect the degree of offset of the bright defect portion of the gray value distribution; (Lc-La) / 2 is used to reflect the degree of offset of the dark defect portion of the gray value distribution.
[0013] By calculating the grayscale offset KOT, regions that deviate significantly from the grayscale distribution can be detected. For normal regions, the grayscale offset from the uniform grayscale value is small, while defective regions often cause significant grayscale changes due to material or processing issues, resulting in a larger offset from the average grayscale.
[0014] S402, Define an integer variable k, and set its initial value to 1; S403, create a blank sequence Drak, denoted as the dark defect mesh sequence, and create a blank sequence Light, denoted as the bright defect mesh sequence; S404, calculate the value of XTS, where the value of XTS is the absolute value of the difference between Lt(k) and the uniform gray value TLOET; compare XTS with KOT: if XTS is greater than KOT and Lt(k) is less than La, add the mesh corresponding to Lt(k) to the dark defect mesh sequence Drak; if XTS is greater than KOT and Lt(k) is greater than Lb, add the mesh corresponding to Lt(k) to the bright defect mesh sequence Light; Specifically, if XTS is greater than KOT and Lt(k) is less than La, the mesh is marked as a dark defect mesh and a Drak sequence is added. This condition indicates that the gray value of the mesh deviates from the healthy region and is too low, which is consistent with the characteristics of dark defects such as contamination and pits. If XTS is less than KOT and Lt(k) is greater than Lb, the mesh is marked as a bright defect mesh and a Light sequence is added. This condition indicates that the gray value of the mesh deviates from the healthy region and is too high, which is consistent with the characteristics of bright defects such as copper foil residue and enhanced reflection. S405, if the current variable k is less than the total number of grids t, then increment k by 1 and return to step S304; if k is greater than or equal to t, then jump to step S406; S406, denote the mesh corresponding to the element of the bright defect mesh sequence Drak as the dark defect mesh; denote the mesh corresponding to the element of the bright defect mesh sequence Light as the bright defect mesh; The beneficial effects of this step are as follows: Compared to the TA and TB methods, the preferred method provides a more accurate and flexible defect detection mechanism by introducing a defect offset grayscale measurement, which is more suitable for situations where the grayscale characteristics of surface defects on flexible circuit boards exhibit bidirectional characteristics. In defect detection on flexible circuit boards, bright defects are usually caused by increased reflectivity due to added material or changes in surface orientation, such as copper foil residue, protrusions, and shallow scratches, which are characterized by high grayscale values. Dark defects, on the other hand, originate from material loss or contamination, such as light absorption effects caused by open circuits, pits, and deep scratches, which are characterized by low grayscale value areas. TA and TB, however, only distinguish defect types by setting a simple grayscale threshold, which, compared to the preferred method, is more likely to result in misjudgments when the grayscale value is close to the threshold.
[0015] Furthermore, in step S500, obtaining the actual defect region through the dark defect mesh and the bright defect mesh includes: S501, extract the mesh corresponding to the dark defect mesh of the flexible circuit board to be inspected from the image of the flexible circuit board with no coating defects, and record it as the dark defect normal mesh; extract the mesh corresponding to the bright defect mesh of the flexible circuit board to be inspected, and record it as the bright defect normal mesh. S502, obtain the grayscale value of the normal mesh of dark defects, and compare the dark defect mesh with the corresponding normal mesh of dark defects one by one. Mark the dark defect mesh whose grayscale value is less than the grayscale value of its corresponding normal mesh of dark defects as the real dark defect mesh; obtain the grayscale value of the normal mesh of bright defects, and compare the bright defect mesh with the corresponding normal mesh of bright defects one by one; mark the bright defect mesh whose grayscale value is greater than the grayscale value of its corresponding normal mesh of bright defects as the real bright defect mesh; S503 defines the region that is a combination of all real dark defect meshes and real bright defect meshes as the real defect region.
[0016] Specifically, the real dark defect mesh is marked in red and the bright defect mesh is marked in purple. The output is a surface image of the flexible circuit board to be inspected with red and purple markings, indicating the location and type of the defect area in the image. The area that is a combination of all real dark defect meshes and real bright defect meshes is marked as the real defect area.
[0017] The beneficial effects of this step are as follows: By comparing the grayscale values of standard sample images, the true defect areas can be dynamically captured, avoiding misidentification caused by non-defect factors such as changes in lighting or surface reflection. Through rigorous grayscale value comparison and deviation analysis, defect areas can be accurately distinguished from normal areas, significantly improving the accuracy and reliability of defect detection in flexible printed circuit boards. This comparison-based method can not only identify obvious defects but also effectively eliminate possible false defects, ensuring that the identified defect areas are the true defect areas.
[0018] To achieve the above objectives, a second aspect of the present invention also provides a plating detection system for flexible die-cut circuit boards. The plating detection system for flexible die-cut circuit boards includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a plating detection method for flexible die-cut circuit boards. The plating detection system for flexible die-cut circuit boards runs on computing devices such as desktop computers, laptops, handheld computers, and cloud data centers.
[0019] By implementing a coating inspection system for flexible die-cut circuit boards, the coating inspection method for flexible die-cut circuit boards can avoid the problem of difficulty in simultaneously adapting to bright and dark defects when the grayscale characteristics of surface defects of flexible circuit boards are bidirectional. It can effectively distinguish and identify different defects on the grayscale image. Attached Figure Description
[0020] Figure 1 The diagram shows a flowchart of a coating detection method for flexible die-cut circuit boards. Figure 2 The diagram shows a structure of a coating inspection system for flexible die-cut circuit boards. Detailed Implementation
[0021] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0022] Figure 1 The diagram shows a flowchart of a coating detection method for flexible die-cut circuit boards.
[0023] Reference Figure 1 This invention proposes a method for detecting the coating of flexible die-cut circuit boards, the method comprising the following steps: S100: Acquire an image of the surface of the flexible circuit board to be inspected, and obtain an image of the plating layer of the flexible circuit board to be inspected through image recognition; S200: Perform grayscale processing on the coating image of the flexible circuit board to be inspected to obtain a grayscale image of the coating image of the flexible circuit board to be inspected. S300: The defect area is divided into meshes, and the uniform gray value of the defect area is calculated. S400 obtains dark and bright defect meshes by uniform grayscale values; S500 obtains the real defect area through dark defect mesh and bright defect mesh.
[0024] Furthermore, in step S100, acquiring an image of the surface of the flexible circuit board to be inspected, and obtaining an image of the plating layer of the flexible circuit board to be inspected through image recognition, includes: A high-resolution camera is used to image the flexible circuit board and capture its surface information; an edge detection algorithm is used to identify and segment the surface coating area and exclude irrelevant areas such as the base plate, circuits or background. Furthermore, in step S200, the grayscale processing of the coating image of the flexible circuit board to be inspected to obtain a grayscale image of the coating image of the flexible circuit board to be inspected includes: Each pixel of the coating image of the flexible circuit board to be inspected is converted to grayscale, thus transforming the coating image of the flexible circuit board into a grayscale image.
[0025] Furthermore, in step S300, the grayscale image is divided into grids, and the uniform grayscale value of the defect region is calculated, including: The grayscale image size is 640×480 pixels. The grayscale image is then divided into 768 grids of 20 pixels × 20 pixels. Let Lt(i) represent the gray value of the i-th grid in the grayscale image, where the gray value of the grid is the average of the gray values of all pixels in the grid, and i is the grid number, i=0,1,2,…,t, where t is the number of grids. Create an empty sequence LTfe and import Lt(i) into the sequence LTfe as elements in ascending order. Obtain the first quartile, third quartile, and median of the sequence LTfe, where the first quartile is denoted as La, the third quartile as Lb, and the median as Lc.
[0026] The uniform grayscale value (TLOET) is calculated as follows: The average grayscale value (LaD) and the complexity coefficient (LOE) are calculated, where LaD = La / 4 + Lb / 4 + Lc / 2, and the complexity coefficient (LOE) = 1 - α, where α is the range of complexity distance offset. TLOET is calculated using the average grayscale value LaD and the complexity coefficient LOE, where TLOET = LaD × LOE.
[0027] The uniform grayscale value TLOET is a grayscale value used in defect detection to represent the grayscale characteristics of a defective region relative to a normal region. TLOET is calculated based on the relationship between the grayscale distribution of the defective region and the grayscale distribution of the healthy region, and obtains the ideal grayscale value for the normal region by combining the first quartile, third quartile, and median of grayscale statistics with a complexity coefficient.
[0028] Furthermore, in step S400, obtaining the dark defect mesh and the bright defect mesh by uniformizing grayscale values includes: The method for obtaining dark and bright defect meshes by uniform gray values also includes: S401, calculating the gray value of the defect offset KOT=(Lb-Lc) / 2+(Lc-La) / 2; (Lb-Lc) / 2 is used to reflect the degree of offset of the bright defect portion of the gray value distribution; (Lc-La) / 2 is used to reflect the degree of offset of the dark defect portion of the gray value distribution.
[0029] By calculating the grayscale offset KOT, regions that deviate significantly from the grayscale distribution can be detected. For normal regions, the grayscale offset from the uniform grayscale value is small, while defective regions often cause significant grayscale changes due to material or processing issues, resulting in a larger offset from the average grayscale.
[0030] S402, Define an integer variable k, and set its initial value to 1; S403, create a blank sequence Drak, denoted as the dark defect mesh sequence, and create a blank sequence Light, denoted as the bright defect mesh sequence; S404, calculate the value of XTS, where the value of XTS is the absolute value of the difference between Lt(k) and the uniform gray value TLOET; compare XTS with KOT: if XTS is greater than KOT and Lt(k) is less than La, add the mesh corresponding to Lt(k) to the dark defect mesh sequence Drak; if XTS is greater than KOT and Lt(k) is greater than Lb, add the mesh corresponding to Lt(k) to the bright defect mesh sequence Light; Specifically, if XTS is greater than KOT and Lt(k) is less than La, the mesh is marked as a dark defect mesh and a Drak sequence is added. This condition indicates that the gray value of the mesh deviates from the healthy region and is too low, which is consistent with the characteristics of dark defects such as contamination and pits. If XTS is less than KOT and Lt(k) is greater than Lb, the mesh is marked as a bright defect mesh and a Light sequence is added. This condition indicates that the gray value of the mesh deviates from the healthy region and is too high, which is consistent with the characteristics of bright defects such as copper foil residue and enhanced reflection. S405, if the current variable k is less than the total number of grids t, then increment k by 1 and return to step S304; if k is greater than or equal to t, then jump to step S406; S406, denote the mesh corresponding to the element of the bright defect mesh sequence Drak as the dark defect mesh; denote the mesh corresponding to the element of the bright defect mesh sequence Light as the bright defect mesh; Furthermore, in step S500, obtaining the actual defect region through the dark defect mesh and the bright defect mesh includes: S501, extract the mesh corresponding to the dark defect mesh of the flexible circuit board to be inspected from the image of the flexible circuit board with no coating defects, and record it as the dark defect normal mesh; extract the mesh corresponding to the bright defect mesh of the flexible circuit board to be inspected, and record it as the bright defect normal mesh. S502, obtain the grayscale value of the normal mesh of dark defects, and compare the dark defect mesh with the corresponding normal mesh of dark defects one by one. Mark the dark defect mesh whose grayscale value is less than the grayscale value of its corresponding normal mesh of dark defects as the real dark defect mesh; obtain the grayscale value of the normal mesh of bright defects, and compare the bright defect mesh with the corresponding normal mesh of bright defects one by one; mark the bright defect mesh whose grayscale value is greater than the grayscale value of its corresponding normal mesh of bright defects as the real bright defect mesh; S503 defines the region that is a combination of all real dark defect meshes and real bright defect meshes as the real defect region.
[0031] Specifically, the real dark defect mesh is marked in red and the bright defect mesh is marked in purple. The output is a surface image of the flexible circuit board to be inspected with red and purple markings, indicating the location and type of the defect area in the image. The area that is a combination of all real dark defect meshes and real bright defect meshes is marked as the real defect area.
[0032] Figure 2 The diagram shows a structure of a coating inspection system for flexible die-cut circuit boards.
[0033] Reference Figure 2 The present invention also proposes a plating detection system 20 for flexible die-cut circuit boards. The plating detection system 20 for flexible die-cut circuit boards includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in a plating detection method for flexible die-cut circuit boards. The plating detection system 20 for flexible die-cut circuit boards runs on computing devices such as desktop computers, laptops, handheld computers, and cloud data centers.
[0034] The detection system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program within the following units of the detection system: The acquisition unit 21 is used to acquire the surface image of the flexible circuit board to be inspected and obtain the coating image of the flexible circuit board to be inspected through image recognition. The conversion unit 22 is used to perform grayscale processing on the coating image of the flexible circuit board to be inspected to obtain a grayscale image of the coating image of the flexible circuit board to be inspected. The calculation unit 23 is used to perform mesh segmentation on the defect area and calculate the uniform gray value of the defect area; Loading unit 24 is used to obtain dark defect mesh and bright defect mesh by uniform gray value; Display unit 25 is used to obtain the real defect area through dark defect mesh and bright defect mesh.
[0035] The coating inspection system for flexible die-cut circuit boards described above can run on computing devices such as desktop computers, laptops, handheld computers, and cloud servers. The operable inspection system for the coating of flexible die-cut circuit boards may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above example is merely an illustration of a coating inspection system 20 for flexible die-cut circuit boards and does not constitute a limitation on the coating inspection system 20 for flexible die-cut circuit boards. It may include more or fewer components, or combine certain components, or different components. For example, the coating inspection system for flexible die-cut circuit boards may also include input / output devices, network access devices, buses, etc.
[0036] By using a coating inspection system 20 for flexible die-cut circuit boards, the coating inspection method for flexible die-cut circuit boards can be implemented. This avoids the problem of difficulty in simultaneously adapting to bright and dark defects when the grayscale characteristics of surface defects on flexible circuit boards exhibit bidirectionality. It can effectively distinguish and identify different defects on the grayscale image.
[0037] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0038] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0039] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0040] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0041] Furthermore, the terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this invention can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this invention, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly specified in the embodiments.
[0042] In this invention, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific implementation.
[0043] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0044] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for detecting the coating of a flexible die-cut circuit board, characterized in that, The method includes the following steps: S100: Acquire an image of the surface of the flexible circuit board to be inspected, and obtain an image of the plating layer of the flexible circuit board to be inspected through image recognition; S200: Perform grayscale processing on the coating image of the flexible circuit board to be inspected to obtain a grayscale image of the coating image of the flexible circuit board to be inspected. S300: The defect area is divided into meshes, and the uniform gray value of the defect area is calculated. S400 obtains dark and bright defect meshes by uniform grayscale values; S500 obtains the real defect area through dark defect mesh and bright defect mesh.
2. The coating detection method for a flexible die-cut circuit board according to claim 1, characterized in that, Step S100 includes: using a high-resolution camera to image the flexible circuit board and capture its surface information; using an edge detection algorithm to identify and segment the surface coating area and exclude irrelevant areas such as the base plate, circuits, or background.
3. The coating detection method for a flexible die-cut circuit board according to claim 1, characterized in that, Step S200 includes: converting each pixel of the coating image of the flexible circuit board to be inspected into grayscale, thereby converting the coating image of the flexible circuit board into a grayscale image.
4. The coating detection method for a flexible die-cut circuit board according to claim 1, characterized in that, Step S300 includes: performing grid segmentation on the grayscale image, dividing the grayscale image into several 20-pixel × 20-pixel grids; Let Lt(i) represent the gray value of the i-th grid in the grayscale image, where the gray value of the grid is the average of the gray values of all pixels within the grid, and i is the grid number, i=0,1,2,…,t, where t is the number of grids. Create an empty sequence LTfe, and import Lt(i) into the sequence LTfe as elements in ascending order; obtain the first quartile, third quartile, and median of the sequence LTfe, where the first quartile is denoted as La, the third quartile as Lb, and the median as Lc. The uniform grayscale value (TLOET) is calculated as follows: The average grayscale value (LaD) and the complexity coefficient (LOE) are calculated, where LaD = La / 4 + Lb / 4 + Lc / 2, and the complexity coefficient (LOE) = 1 - α, where α is the range of complexity distance offset. TLOET is calculated using the average grayscale value LaD and the complexity coefficient LOE, where TLOET = LaD × LOE.
5. The coating detection method for a flexible die-cut circuit board according to claim 4, characterized in that, Step S400 includes: obtaining the grayscale value TA of the bright trap and the grayscale value TB of the dark trap; where TA = (TLOET + Lb) / 2; TB = (TLOET + La) / 2; and marking the mesh with a grayscale value less than TA as a dark defect mesh, and the mesh with a grayscale value greater than TB as a bright defect mesh.
6. The coating detection method for a flexible die-cut circuit board according to claim 4, characterized in that, Step S400 also includes: S401, calculate the grayscale value of the missing image offset KOT, where KOT=(Lb-Lc) / 2+(Lc-La) / 2; S402, Define an integer variable k, and set its initial value to 1; S403, create a blank sequence Drak, denoted as the dark defect mesh sequence, and create a blank sequence Light, denoted as the bright defect mesh sequence; S404, calculate the value of XTS, where the value of XTS is the absolute value of the difference between Lt(k) and the uniform gray value TLOET; compare XTS with KOT: if XTS is greater than KOT and Lt(k) is less than La, add the mesh corresponding to Lt(k) to the dark defect mesh sequence Drak; if XTS is greater than KOT and Lt(k) is greater than Lb, add the mesh corresponding to Lt(k) to the bright defect mesh sequence Light; S405, if the current variable k is less than the total number of grids t, then increment k by 1 and return to step S304; if k is greater than or equal to t, then jump to step S406; S406, denote the mesh corresponding to the element of the bright defect mesh sequence Drak as the dark defect mesh; denote the mesh corresponding to the element of the bright defect mesh sequence Light as the bright defect mesh.
7. The coating detection method for a flexible die-cut circuit board according to claim 1, characterized in that, Step S500 includes: S501, extract the mesh corresponding to the dark defect mesh of the flexible circuit board to be inspected from the image of the flexible circuit board with no coating defects, and record it as the dark defect normal mesh; extract the mesh corresponding to the bright defect mesh of the flexible circuit board to be inspected, and record it as the bright defect normal mesh. S502, obtain the grayscale value of the normal mesh of dark defects, and compare the dark defect mesh with the corresponding normal mesh of dark defects one by one. Mark the dark defect mesh whose grayscale value is less than the grayscale value of its corresponding normal mesh of dark defects as the real dark defect mesh; obtain the grayscale value of the normal mesh of bright defects, and compare the bright defect mesh with the corresponding normal mesh of bright defects one by one; mark the bright defect mesh whose grayscale value is greater than the grayscale value of its corresponding normal mesh of bright defects as the real bright defect mesh; S503 defines the region that is a combination of all real dark defect meshes and real bright defect meshes as the real defect region.
8. A coating inspection system for flexible die-cut circuit boards, characterized in that, The coating detection system for a flexible die-cut circuit board includes: a processor, a memory, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the coating detection method for a flexible die-cut circuit board according to any one of claims 1 to 7.
Citation Information
Patent Citations
A method for detecting the surface coating quality of flexible circuit boards based on image recognition
CN118552542B