A defect detection method for flexible die-cut circuit board (FDC)
Through grayscale momentum improvement analysis, the identification of oxidation areas of flexible die-cut circuit boards (FDC) is optimized, and the oxygen-visible grayscale value and the grayscale value of adjacent grids are dynamically calculated. This solves the problem of inaccurate oxidation area detection in existing technologies and achieves higher-precision oxidation area identification.
Patent Information
- Application Number
- CN202510016220.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-01-06
AI Technical Summary
In the existing technology, the method of judging the oxidation area by color components and fixed thresholds is difficult to accurately distinguish the oxidation area under different lighting conditions and color characteristics, resulting in inaccurate detection results, especially when the degree of oxidation is mild or the color change is not significant, which is prone to misjudgment.
Grayscale momentum boosting analysis is adopted to optimize the oxidation area identification process through grid division and dynamic calculation of oxygen grayscale value. Combined with the grayscale value analysis of adjacent grids, the judgment criteria are dynamically adjusted to accurately extract the oxidation core area.
It improves the accuracy of oxidation area detection, reduces the impact of external conditions on the detection results, avoids misjudgment due to color similarity, can more accurately identify the transition zone between oxidation and non-oxidation areas, and improves the ability to extract subtle features.
Smart Images

Figure CN119941675B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of precision electronic manufacturing detection, and in particular relates to a defect detection method for a flexible die-cut circuit board (FDC). Background Art
[0002] Since the patent number CN107367465A, entitled "A method for detecting oxidation of copper foil of FPC flexible board", relies on color components (especially red R components) to extract oxidation areas and judges the degree of oxidation by simple grayscale difference, this method has the problem of different color saturation or copper oxide and other factors (such as solder resist, copper foil itself, etc.) are similar, it is difficult to accurately distinguish the oxidation area. Moreover, the threshold (128) set in this method is fixed, which is not applicable to all cases. Different oxidation degrees, ambient light conditions or color characteristics of the substrate may lead to inaccurate detection results. Moreover, since this method judges the oxidation area by grayscale difference, the difference between the oxidized copper foil and the unoxidized part is not always significant. Especially in the case of light oxidation or small color change, the fixed threshold judgment will miss small or complex oxidation features and texture interference, leading to misjudgment. Summary of the Invention
[0003] The present invention aims to at least partially address one of the technical problems in the related art. To this end, a first object of the present invention is to provide a defect detection method for flexible die-cut circuit boards (FDCs). This method can further optimize the identification process of oxidized regions through grayscale momentum boosting analysis, enabling more accurate identification of transition areas between oxidized and non-oxidized regions. This avoids the limitations of static threshold judgment and improves the accuracy of oxidized region detection.
[0004] To achieve the above-mentioned object, a first embodiment of the present invention provides a method for detecting defects in a flexible die-cut circuit board (FDC), the method comprising the following steps:
[0005] S100, obtaining an image of the FDC circuit board to be inspected;
[0006] S200, segmenting the FDC circuit board image to be inspected, identifying the copper foil area image, and extracting the copper foil area image;
[0007] S300, graying the copper foil area image to obtain a copper foil area grayscale image;
[0008] S400, calculating the oxygen grayscale value of the grayscale image of the copper foil area, and obtaining the oxidized area according to the oxygen grayscale value;
[0009] S500: performing grayscale momentum boost analysis on the oxidized area, and obtaining the oxidized core area of the copper foil according to the grayscale momentum boost analysis result.
[0010] According to the defect detection method of an embodiment of the present invention, the identification process of the oxidation area can be further optimized through grayscale momentum enhancement analysis, so that the transition area between the oxidation area and the non-oxidation area can be identified more accurately, avoiding the limitations of static threshold judgment and improving the accuracy of oxidation area detection.
[0011] Furthermore, acquiring an image of the FDC circuit board to be inspected in step S100 includes: placing the FDC circuit board to be inspected in a fixed position, adjusting the intensity of a white ring-shaped cold light source, and capturing a color image of the FDC circuit board to be inspected using a high-resolution camera. Since copper foil absorbs light with wavelengths less than 580nm very well and has a reflectivity of up to 90% for light greater than 580nm, it appears reddish-orange. Copper oxide absorbs light with wavelengths between 400-780nm very well, resulting in a black appearance. The solder resist coating the circuits on the copper foil absorbs light with wavelengths between 620-760nm at 70%, resulting in a brown appearance. Using a white ring-shaped light for illumination provides high contrast between the three.
[0012] Furthermore, in step S200, the FDC circuit board image to be inspected is segmented to identify the copper foil area image. Extracting the copper foil area image includes:
[0013] The boundary is determined by the algorithm of interest, the FDC circuit board image to be inspected is segmented, and the copper foil area image is extracted.
[0014] Furthermore, in step S300, grayscale is performed on the copper foil area image. Obtaining the copper foil area grayscale image includes:
[0015] The copper foil region image is grayscaled, and the copper foil region image after grayscaled is referred to as the copper foil region grayscale image.
[0016] Patent No. CN107367465A, entitled "A Method for Detecting Oxidation of Copper Foil on Flexible Circuit Boards," relies on color components (particularly the red R component) to extract oxidized areas and uses simple grayscale differences to determine the degree of oxidation. This method has problems with varying color saturation or when copper oxide is similar to other factors (such as solder resist or copper foil itself), making it difficult to accurately distinguish oxidized areas. To address these issues, the present invention proposes step S400.
[0017] Furthermore, in step S400, calculating the oxygen grayscale value of the grayscale image of the copper foil area, and obtaining the oxidized area through the oxygen grayscale value includes:
[0018] Use a gridding algorithm to divide the copper foil area grayscale image into K grids, where the grid size is 1 / 1000 of the copper foil area grayscale image. S(i) represents the grayscale value of the i-th grid in the copper foil area grayscale image, where i is [1, K] and K is the number of grids in the copper foil area grayscale image. Obtain the median of the grayscale values in each grid in s(i) and record it as ZD. Obtain the mean of the grayscale values in each grid in s(i) and record it as ZM.
[0019] The oxygen grayscale value ZP is calculated by the first equation; wherein the oxygen grayscale value is a grayscale value for judging whether it is oxidation coloration in the grayscale difference caused by the brightness difference between the oxidized copper foil area and the normal area under the lighting unit based on the white ring cold light source.
[0020] Among them, the method for calculating the oxygen gray value ZP in the first equation is:
[0021] Calculate the oxygen gray value ZP: subtract the absolute value of the gray range momentum from (ZM / 2), where the gray range momentum is the product of ZD and the gray momentum ratio, where the gray momentum ratio is and the ratio of (K×(ZD+ZM) / 2).
[0022] Because the grayscale value difference between the oxidized and normal areas is generally less than half of ZM, the grayscale range momentum uses ZM / 2 as the base grayscale, where ZD is the median grayscale value of the copper foil area. The oxygen-visible grayscale value ZP is calculated by subtracting the calculated grayscale of each grid and the difference between ZD and ZM from the base grayscale ZM / 2. This grayscale range momentum effectively reduces the grayscale value impact caused by localized light or dark spots. The grayscale momentum ratio uses (K×(ZD+ZM) / 2) as the denominator, which reflects the momentum change of the center value of the grayscale distribution within the area. Larger values indicate more concentrated grayscale in the area and a more pronounced contrast between the oxidized and normal areas. Smaller values indicate a more uniform grayscale distribution, requiring a stricter oxygen-visible grayscale value to distinguish oxidized areas.
[0023] The grids in s(i) whose grayscale values are less than the oxygen-displaying grayscale value ZP are recorded as oxidized grids, and the area consisting of all oxidized grids in the copper foil area image is recorded as the oxidized area.
[0024] The beneficial effects of this step are as follows: Dynamic adjustment of the oxygen grayscale value (ZP) is introduced, significantly improving the sensitivity and accuracy of oxidized areas through dynamic calculation of the oxygen grayscale value. This allows the detection of oxidized areas to adapt to varying lighting conditions and color saturation variations, reducing the impact of external conditions on detection results. It refines the criteria for distinguishing between oxidized and non-oxidized areas, overcoming misjudgments due to color similarity. It also avoids the loss of detection accuracy caused by variations in color component characteristics (such as inconsistent saturation), improves the ability to extract subtle features of oxidized areas, and overcomes the confusion caused by similar colors between copper oxide and solder resist or copper foil itself.
[0025] Furthermore, in step S500, grayscale momentum boost analysis is performed on the oxidized area, and obtaining the oxidized core area of the copper foil according to the grayscale momentum boost analysis result includes:
[0026] S501, use ZOF(j) to represent the grayscale value of the grid of the j-th oxidation region, the value range of the serial number j is [1, G], where G is the number of grids in the oxidation region; ZOG(j) represents the average grayscale value of the grids adjacent to the j-th oxidation region grid.
[0027] Furthermore, the adjacent grid refers to the grid that shares a boundary with the current grid, where the grayscale value of the grid is the average grayscale value of all pixels in the grid, and the average grayscale value of the adjacent grids of the j-th oxidation area grid is the sum of the grayscale values of all adjacent grids of the grid where ZOG(j) is located and divided by the number of adjacent grids; the grid with the largest grayscale value in the oxidation area is recorded as the boundary oxygen-displaying grid ZML, and the average grayscale value of the adjacent grids of ZML is recorded as ZOGs;
[0028] S502, define an integer variable k, set its initial value to 1, create two variables ZPa and ZPb with initial value of zero, and create two blank sequences Z1 and Z2 for subsequent calculations and comparisons;
[0029] S503, performing grayscale momentum boost analysis on the temperature value of the circuit where the arc sensor is located, wherein the grayscale momentum boost analysis is as follows: calculating the values of ZPa and ZPb, wherein: setting the value of ZPa to the absolute value of the difference between ZOG(k) and ZOF(k), setting the value of ZPb to the absolute value of the difference between ZOG(k) and ZOGs; comparing the values of ZPa and ZPb: if ZPa is greater than ZPb, adding ZOF(k) to sequence Z1; if ZPa is less than or equal to ZPb, adding ZOF(k) to sequence Z2;
[0030] S504, calculate the average value ZPT of all elements in the current sequence Z2, and when ZPT is less than ZP / 2, add the smallest element in sequence Z2 to sequence Z1;
[0031] S505: Determine whether the grayscale momentum improvement analysis is complete. The specific determination method is as follows: if the current variable k is less than G, then increase k by 1 and return to step S503 to continue the grayscale momentum improvement analysis; if the current variable k is equal to G, then the grayscale momentum improvement analysis is complete and the process goes to step S506;
[0032] S506 , recording the grids corresponding to all elements in the sequence Z1 as real oxidation grids, and recording the area consisting of all the real oxidation grids and the grids adjacent to the real oxidation grids as the copper foil oxidation core area.
[0033] Among them, the real oxidation grid refers to the grid formed on the surface of the copper foil due to the oxidation process, and the grayscale value is significantly lower than the normal area. They represent the most serious and significant parts of the copper foil oxidation. Compared with other grids, these grids show obvious grayscale differences and represent areas with more serious oxidation.
[0034] Among them, the copper foil oxidation core area is the most severely oxidized area accurately extracted through advanced image analysis and grayscale momentum enhancement technology, combined with the analysis of the real oxidation grid and the adjacent grid. The copper foil oxidation core area is the most critical part of oxidation detection; in production, the oxidation problem of copper foil will directly affect the performance and quality of the circuit board. Therefore, accurately identifying and locating this core area is crucial for subsequent maintenance, quality control, production optimization, etc. After identifying the copper foil oxidation core area, further analysis can be carried out, such as oxidation degree assessment, corrosion prediction or guidance for production process adjustment. At the same time, the detection of the oxidation core area can also serve as the basis for subsequent quality inspection and repair.
[0035] Furthermore, in the image, the oxidized core area of the copper foil usually appears as a dark or black area with a grayscale or color difference that is significantly different from the surrounding area.
[0036] The beneficial effect of this step is that by analyzing the grayscale value ZOF(j) of the oxidized area grid and the average grayscale value ZOG(j) of the adjacent grids, two core variables, ZPa and ZPb, are established. These two variables reflect the difference in grayscale characteristics between the oxidized grid and its surroundings, dividing the oxidized area into two sequences, Z1 and Z2, corresponding to the significantly oxidized area and the area awaiting further analysis, respectively. ZPa measures the overall grayscale difference between the current grid and the surrounding grids. ZPb measures the grayscale consistency between the current grid and the surrounding grids with significant oxidation. By comparing ZPa and ZPb, grids with larger differences are preferentially classified as true oxidation grids, and other grids are temporarily stored in Z2; by dynamically adjusting the sequence Z2 to further screen abnormal grids, the smallest element in the sequence is added to Z1. This dynamic adjustment mechanism can effectively reduce the interference of local abnormalities on the analysis results. Finally, the analysis of all grids is completed, and the grids corresponding to the grayscale values in the sequence Z1 are identified as true oxidation grids; by comparing ZPa and ZPb, the judgment criteria are dynamically adjusted to avoid judgment deviations caused by local characteristic abnormalities, and grayscale momentum lifting analysis is used to extract the true oxidation features from the overall and local grayscale distributions, solving the problem in patent number CN107367465A entitled "A method for detecting oxidation of copper foil of FPC flexible board", that when the oxidized part of the copper foil is close to the solder resist area and the color change is not obvious, the fixed threshold judgment will miss small or complex oxidation features and texture interference, leading to misjudgment.
[0037] The beneficial effects of the present invention are: the identification process of the oxidized area is further optimized through grayscale momentum boost analysis, so that the transition area between the oxidized area and the non-oxidized area can be identified more accurately, avoiding the limitations of static threshold judgment and improving the accuracy of oxidized area detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Shown is a flow chart of a defect detection method for a flexible die-cut circuit board (FDC). DETAILED DESCRIPTION
[0039] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.
[0040] Figure 1 Shown is a flow chart of a defect detection method for a flexible die-cut circuit board (FDC).
[0041] Reference Figure 1 The present invention provides a defect detection method for a flexible die-cut circuit board (FDC), the method comprising the following steps:
[0042] S100, obtaining an image of the FDC circuit board to be inspected;
[0043] S200, segmenting the FDC circuit board image to be inspected, identifying the copper foil area image, and extracting the copper foil area image;
[0044] S300, graying the copper foil area image to obtain a copper foil area grayscale image;
[0045] S400, calculating the oxygen grayscale value of the grayscale image of the copper foil area, and obtaining the oxidized area according to the oxygen grayscale value;
[0046] S500: performing grayscale momentum boost analysis on the oxidized area, and obtaining the oxidized core area of the copper foil according to the grayscale momentum boost analysis result.
[0047] According to the defect detection method of an embodiment of the present invention, the identification process of the oxidation area can be further optimized through grayscale momentum enhancement analysis, so that the transition area between the oxidation area and the non-oxidation area can be identified more accurately, avoiding the limitations of static threshold judgment and improving the accuracy of oxidation area detection.
[0048] Furthermore, acquiring an image of the FDC circuit board to be inspected in step S100 includes: placing the FDC circuit board to be inspected in a fixed position, adjusting the intensity of a white ring-shaped cold light source, and capturing a color image of the FDC circuit board to be inspected using a high-resolution camera. Since copper foil absorbs light with wavelengths less than 580nm very well and has a reflectivity of up to 90% for light greater than 580nm, it appears reddish-orange. Copper oxide absorbs light with wavelengths between 400-780nm very well, resulting in a black appearance. The solder resist coating the circuits on the copper foil absorbs light with wavelengths between 620-760nm at 70%, resulting in a brown appearance. Using a white ring-shaped light for illumination provides high contrast between the three.
[0049] Furthermore, in step S200, the image is segmented to identify the copper foil area image. Extracting the copper foil area image includes:
[0050] The boundary is determined by the algorithm of interest, the FDC circuit board image to be inspected is segmented, and the copper foil area image is extracted.
[0051] Furthermore, in step S300, grayscale is performed on the copper foil area image. Obtaining the copper foil area grayscale image includes:
[0052] The copper foil region image is grayscaled, and the copper foil region image after grayscaled is referred to as the copper foil region grayscale image.
[0053] Patent No. CN107367465A, entitled "A Method for Detecting Oxidation of Copper Foil on Flexible Circuit Boards," relies on color components (particularly the red R component) to extract oxidized areas and uses simple grayscale differences to determine the degree of oxidation. This method has problems with varying color saturation or when copper oxide is similar to other factors (such as solder resist or copper foil itself), making it difficult to accurately distinguish oxidized areas. To address these issues, the present invention proposes step S400.
[0054] Furthermore, in step S400, calculating the oxygen grayscale value of the grayscale image of the copper foil area, and obtaining the oxidized area through the oxygen grayscale value includes:
[0055] The copper foil region grayscale image is gridded using a gridding algorithm. The grid size is 1 / 1000 of the copper foil region grayscale image. The copper foil region grayscale image is divided into K grids, where K = 1000. s(i) represents the grayscale value of the i-th grid in the copper foil region grayscale image, where i is [1, K] and K is the number of grids in the copper foil region grayscale image. The median of the grayscale values in each grid in s(i) is obtained and recorded as ZD, and the mean of the grayscale values in each grid in s(i) is obtained and recorded as ZM. The oxygen-displaying grayscale value ZP is calculated using the first equation. The oxygen-displaying grayscale value is the grayscale value used to determine whether the copper foil region is oxidized and colored, based on the grayscale difference caused by the brightness difference between the oxidized and normal areas of the copper foil region under a white ring-shaped cold light source.
[0056] Among them, the method for calculating the oxygen gray value ZP in the first equation is:
[0057] Calculate the oxygen gray value ZP: subtract the absolute value of the gray range momentum from (ZM / 2), where the gray range momentum is the product of ZD and the gray momentum ratio, where the gray momentum ratio is and the ratio of (K×(ZD+ZM) / 2).
[0058] Because the grayscale value difference between the oxidized and normal areas is generally less than half of ZM, the grayscale range momentum uses ZM / 2 as the base grayscale, where ZD is the median grayscale value of the copper foil area. The oxygen-visible grayscale value ZP is calculated by subtracting the calculated grayscale of each grid and the difference between ZD and ZM from the base grayscale ZM / 2. This grayscale range momentum effectively reduces the grayscale value impact caused by localized light or dark spots. The grayscale momentum ratio uses (K×(ZD+ZM) / 2) as the denominator, which reflects the momentum change of the center value of the grayscale distribution within the area. Larger values indicate more concentrated grayscale in the area and a more pronounced contrast between the oxidized and normal areas. Smaller values indicate a more uniform grayscale distribution, requiring a stricter oxygen-visible grayscale value to distinguish oxidized areas.
[0059] The grids in s(i) whose grayscale values are less than the oxygen-displaying grayscale value ZP are recorded as oxidized grids, and the area consisting of all oxidized grids in the copper foil area image is recorded as the oxidized area.
[0060] The beneficial effects of this step are as follows: Dynamic adjustment of the oxygen grayscale value (ZP) is introduced, significantly improving the sensitivity and accuracy of oxidized areas through dynamic calculation of the oxygen grayscale value. This allows the detection of oxidized areas to adapt to varying lighting conditions and color saturation variations, reducing the impact of external conditions on detection results. It refines the criteria for distinguishing between oxidized and non-oxidized areas, overcoming misjudgments due to color similarity. It also avoids the loss of detection accuracy caused by variations in color component characteristics (such as inconsistent saturation), improves the ability to extract subtle features of oxidized areas, and overcomes the confusion caused by similar colors between copper oxide and solder resist or copper foil itself.
[0061] Furthermore, in step S500, grayscale momentum boost analysis is performed on the oxidized area, and obtaining the oxidized core area of the copper foil according to the grayscale momentum boost analysis result includes:
[0062] S501, use ZOF(j) to represent the grayscale value of the grid of the j-th oxidation region, the value range of the serial number j is [1, G], where G is the number of grids in the oxidation region; ZOG(j) represents the average grayscale value of the grids adjacent to the j-th oxidation region grid.
[0063] Furthermore, the adjacent grid refers to the grid that shares a boundary with the current grid, where the grayscale value of the grid is the average grayscale value of all pixels in the grid, and the average grayscale value of the adjacent grids of the j-th oxidation area grid is the sum of the grayscale values of all adjacent grids of the grid where ZOG(j) is located and divided by the number of adjacent grids; the grid with the largest grayscale value in the oxidation area is recorded as the boundary oxygen-displaying grid ZML, and the average grayscale value of the adjacent grids of ZML is recorded as ZOGs;
[0064] S502, define an integer variable k, set its initial value to 1, create two variables ZPa and ZPb with initial value of zero, and create two blank sequences Z1 and Z2 for subsequent calculations and comparisons;
[0065] S503, performing grayscale momentum boost analysis on the temperature value of the circuit where the arc sensor is located, wherein the grayscale momentum boost analysis is as follows: calculating the values of ZPa and ZPb, wherein: the value of ZPa is set to the absolute value of the difference between ZOG(k) and ZOF(k), and the value of ZPb is set to the absolute value of the difference between ZOG(k) and ZOGs;
[0066] Compare the values of ZPa and ZPb: if ZPa is greater than ZPb, add ZOF(k) to sequence Z1; if ZPa is less than or equal to ZPb, add ZOF(k) to sequence Z2;
[0067] S504, calculate the average value ZPT of all elements in the current sequence Z2, and when ZPT is less than ZP / 2, add the smallest element in sequence Z2 to sequence Z1;
[0068] S505: Determine whether the grayscale momentum improvement analysis is complete. The specific determination method is as follows: if the current variable k is less than G, then increase k by 1 and return to step S503 to continue the grayscale momentum improvement analysis; if the current variable k is equal to G, then the grayscale momentum improvement analysis is complete and the process goes to step S506;
[0069] S506 , recording the grids corresponding to all elements in the sequence Z1 as real oxidation grids, and recording the area consisting of all the real oxidation grids and the grids adjacent to the real oxidation grids as the copper foil oxidation core area.
[0070] Among them, the real oxidation grid refers to the grid formed on the surface of the copper foil due to the oxidation process, and the grayscale value is significantly lower than the normal area. They represent the most serious and significant parts of the copper foil oxidation. Compared with other grids, these grids show obvious grayscale differences and represent areas with more serious oxidation.
[0071] Among them, the copper foil oxidation core area is the most severely oxidized area accurately extracted through advanced image analysis and grayscale momentum enhancement technology, combined with the analysis of the real oxidation grid and the adjacent grid. The copper foil oxidation core area is the most critical part of oxidation detection; in production, the oxidation problem of copper foil will directly affect the performance and quality of the circuit board. Therefore, accurately identifying and locating this core area is crucial for subsequent maintenance, quality control, production optimization, etc. After identifying the copper foil oxidation core area, further analysis can be carried out, such as oxidation degree assessment, corrosion prediction or guidance for production process adjustment. At the same time, the detection of the oxidation core area can also serve as the basis for subsequent quality inspection and repair.
[0072] Furthermore, in the image, the oxidized core area of the copper foil usually appears as a dark or black area with a grayscale or color difference that is significantly different from the surrounding area.
[0073] The beneficial effect of this step is that by analyzing the grayscale value ZOF(j) of the oxidized area grid and the average grayscale value ZOG(j) of the adjacent grids, two core variables, ZPa and ZPb, are established. These two variables reflect the difference in grayscale characteristics between the oxidized grid and its surroundings, dividing the oxidized area into two sequences, Z1 and Z2, corresponding to the significantly oxidized area and the area awaiting further analysis, respectively. ZPa measures the overall grayscale difference between the current grid and the surrounding grids. ZPb measures the grayscale consistency between the current grid and the surrounding grids with significant oxidation. By comparing ZPa and ZPb, meshes with larger differences are preferentially classified as true oxidation meshes, while other meshes are temporarily stored in Z2. Abnormal meshes are further screened by dynamically adjusting sequence Z2, and the smallest element in the sequence is added to Z1. This dynamic adjustment mechanism can effectively reduce the interference of local anomalies on the analysis results. Finally, the analysis of all meshes is completed, and the mesh corresponding to the grayscale value in sequence Z1 is identified as the true oxidation mesh. By comparing ZPa and ZPb, the judgment standard is dynamically adjusted to avoid judgment bias caused by local characteristic anomalies. Grayscale momentum lifting analysis is used to extract the true oxidation characteristics from the overall and local grayscale distributions. This solves the problem in patent number CN107367465A, entitled "A Method for Detecting Oxidation of Copper Foil on Flexible Circuit Boards", that when the oxidized portion of the copper foil is close to the solder resist area and the color change is not obvious, the fixed threshold judgment will miss small or complex oxidation features and texture interference, leading to misjudgment. Through grid analysis, combined with a dynamic screening mechanism, the oxidation core area is gradually extracted, and the oxidized portion is accurately separated from the larger oxidation area, which can achieve a higher level of regional refinement.
[0074] The beneficial effects of the present invention are: the identification process of the oxidized area is further optimized through grayscale momentum boost analysis, so that the transition area between the oxidized area and the non-oxidized area can be identified more accurately, avoiding the limitations of static threshold judgment and improving the accuracy of oxidized area detection.
[0075] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0076] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0077] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations 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 any one or more embodiments or examples.
[0078] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like to indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0079] In addition, the terms "first" and "second" used in the embodiments of the present invention are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in this embodiment. Therefore, the features defined by the terms "first" and "second" in the embodiments of the present invention can explicitly or implicitly indicate that the embodiment includes at least one of such features. In the description of the present invention, the word "plurality" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.
[0080] In the present invention, unless otherwise clearly specified or limited in the embodiments, the terms "installed," "connected," "connect," and "fixed" appearing in the embodiments should be understood in a broad sense. For example, the connection may be a fixed connection, a detachable connection, or an integral connection. 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 internal communication between two elements, or an interaction between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood based on the specific implementation.
[0081] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediary. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or diagonally above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or diagonally below the second feature, or simply means that the first feature is at a lower level than the second feature.
[0082] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A defect detection method for a flexible die-cut circuit board (FDC), characterized in that: The method comprises the following steps: S100, obtaining an image of the FDC circuit board to be inspected; S200, segmenting the FDC circuit board image to be inspected, identifying the copper foil area image, and extracting the copper foil area image; S300, graying the copper foil area image to obtain a copper foil area grayscale image; S400, calculating the oxygen grayscale value of the grayscale image of the copper foil area, and obtaining the oxidized area according to the oxygen grayscale value; S500, performing grayscale momentum boost analysis on the oxidation area, and obtaining the oxidation core area of the copper foil according to the grayscale momentum boost analysis result; wherein, step S500 includes: S501, using ZOF(j) to represent the grayscale value of the grid of the j-th oxidation area, the value range of the serial number j is [1, G], where G is the number of grids in the oxidation area; ZOG(j) represents the average value of the grayscale values of the adjacent grids of the j-th oxidation area grid; the adjacent grid refers to the grid that shares a boundary with the current grid, wherein the grayscale value of the grid is the average value of the grayscale values of all pixels in the grid, wherein the average value of the grayscale values of the adjacent grids of the j-th oxidation area grid is the sum of the grayscale values of all adjacent grids of the grid where ZOG(j) is located and divided by the number of adjacent grids; the grid with the largest grayscale value in the oxidation area is recorded as the boundary oxygen-displaying grid ZML, and the average value of the grayscale values of the adjacent grids of ZML is recorded as ZOGs; S502, define an integer variable k, set its initial value to 1, create two variables ZPa and ZPb with initial value of zero, and create two blank sequences Z1 and Z2 for subsequent calculations and comparisons; S503, performing grayscale momentum boost analysis on the temperature value of the circuit where the arc sensor is located, wherein the grayscale momentum boost analysis is as follows: calculating the values of ZPa and ZPb, wherein: setting the value of ZPa to be the absolute value of the difference between ZOG(k) and ZOF(k), setting the value of ZPb to be the absolute value of the difference between ZOG(k) and ZOGs; comparing the values of ZPa and ZPb: if ZPa is greater than ZPb, then adding ZOF(k) to sequence Z1; if ZPa is less than or equal to ZPb, then adding ZOF(k) to sequence Z2. S504, calculate the average value ZPT of all elements in the current sequence Z2, and when ZPT is less than ZP / 2, add the smallest element in sequence Z2 to sequence Z1; S505: Determine whether the grayscale momentum improvement analysis is complete. The specific determination method is as follows: if the current variable k is less than G, then increase k by 1 and return to step S503 to continue the grayscale momentum improvement analysis; if the current variable k is equal to G, then the grayscale momentum improvement analysis is complete and the process goes to step S506; S506 , recording the grids corresponding to all elements in the sequence Z1 as real oxidation grids, and recording the area consisting of all the real oxidation grids and the grids adjacent to the real oxidation grids as the copper foil oxidation core area.
2. A defect detection method for a flexible die-cut circuit board (FDC) according to claim 1, characterized in that: In step S200, the image is segmented to identify the copper foil area image. Extracting the copper foil area image includes: The boundary is determined by the algorithm of interest, the FDC circuit board image to be inspected is segmented, and the copper foil area image is extracted.
3. The defect detection method for a flexible die-cut circuit board (FDC) according to claim 1, characterized in that: In step S300, grayscale is performed on the copper foil area image. Obtaining the copper foil area grayscale image includes: The copper foil region image is grayscaled, and the copper foil region image after grayscaled is referred to as the copper foil region grayscale image.
4. A defect detection method for a flexible die-cut circuit board (FDC) according to claim 3, characterized in that: In step S400, calculating the oxygen grayscale value of the grayscale image of the copper foil area, and obtaining the oxidized area through the oxygen grayscale value includes: The grayscale image of the copper foil area is divided into K grids using a grid division algorithm, where the grid size is one-tenth of the grayscale image of the copper foil area, and the grayscale image of the copper foil area is divided into K grids, where K=1000, and s(i) represents the grayscale value of the i-th grid of the grayscale image of the copper foil area, where the value of i is [1, K], and K is the number of grids after the grayscale image of the copper foil area is divided; the median of the grayscale values in each grid in s(i) is obtained and recorded as ZD, and the average of the grayscale values in each grid in s(i) is obtained and recorded as ZM; The oxygen grayscale value ZP is calculated by the first equation; wherein the oxygen grayscale value is the grayscale value for determining whether oxidation coloration occurs in the grayscale difference caused by the brightness difference between the oxidized copper foil area and the normal area under the lighting unit based on the white ring cold light source; The first equation is used to calculate the oxygen gray value ZP: Calculate the oxygen gray value ZP by subtracting the absolute value of the gray range momentum from (ZM / 2), where the gray range momentum is the product of ZD and the gray momentum ratio; The grids in s(i) whose grayscale values are less than the oxygen-displaying grayscale value ZP are recorded as oxidized grids, and the area consisting of all oxidized grids in the copper foil area image is recorded as the oxidized area.
5. A defect detection system for flexible die-cut circuit boards (FDC), characterized in that: The defect detection system for a flexible die-cut circuit board (FDC) 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, the steps of the defect detection method for a flexible die-cut circuit board (FDC) described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
FPC flexible plate copper foil oxidation detection method
CN107367465A
Aluminum composite plate defect detection method and system based on artificial intelligence
CN117611583A