Image detection method and system for flexible circuit board

By establishing an optical model of the flexible circuit board and multi-modal image fusion technology, the problem of the impact of material properties and design complexity in traditional detection methods has been solved, the accuracy and robustness of detection have been improved, and the false detection rate has been reduced.

CN118628494BActive Publication Date: 2024-10-22SHENZHEN CHANGFENG LASER SWORD MOULD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411103972.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-10-22
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Traditional flexible circuit board image detection methods cannot effectively overcome the difficulty of image detection and reduced accuracy caused by material characteristics and design complexity.

Method used

By establishing an optical model of the flexible circuit board, simulating the light propagation process, obtaining material optical response data, performing image correction and defect detection, the detection threshold is adaptively adjusted based on the design complexity index, and multi-modal image fusion technology is adopted.

Benefits of technology

It improves the accuracy and reliability of defect detection, reduces the rate of false detection and missed detection, enhances the robustness and adaptability of detection, and improves the uniformity and clarity of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628494B_ABST
    Figure CN118628494B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of flexible circuit board detection technology, and in particular to an image detection method and system for a flexible circuit board. The method comprises the following steps: acquiring detection light source data through a detection light source system to obtain detection light source data; acquiring flexible circuit board design file data; extracting material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; constructing a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extracting material optical response data according to the flexible circuit board optical model to obtain material optical response data. The present invention effectively reduces the false detection rate and missed detection rate by overcoming the influence of material characteristics and circuit complexity, and effectively improves the accuracy, robustness and adaptability of defect detection in combination with an adaptive threshold determination method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flexible circuit board detection, and in particular to an image detection method and system for a flexible circuit board. Background Art

[0002] Flexible printed circuits (FPCs) are increasingly used in electronic products due to their bendability, lightness, and thinness. The material properties of FPCs, such as reflectivity, transparency, and color, affect the contrast and detectability of images. The design of FPCs, including the complexity and density of circuits, also affects the difficulty and accuracy of detection. However, traditional image detection methods for flexible printed circuits have failed to overcome the image detection effects caused by the materials and design of FPCs.

[0003] The impact of FPC material properties on imaging quality: It usually relies on fixed image features and is difficult to adapt to changes brought about by FPC material properties, resulting in reduced detection accuracy.

[0004] The impact of FPC circuit complexity on image feature extraction: It is difficult to extract effective features of complex circuits, and false detection and missed detection are prone to occur. Summary of the invention

[0005] Based on this, it is necessary to provide an image detection method and system for a flexible circuit board to solve at least one of the above technical problems.

[0006] To achieve the above object, a method for image detection of a flexible circuit board comprises the following steps:

[0007] Step S1: acquiring detection light source data through a detection light source system to obtain detection light source data; acquiring flexible circuit board design file data; extracting material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; constructing a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extracting material optical response data according to the flexible circuit board optical model to obtain material optical response data;

[0008] Step S2: extracting design data according to the flexible circuit board design file data to obtain design data; binarizing the design features according to the design data to obtain binary image data; quantifying the design complexity according to the binary image data to obtain a design complexity index;

[0009] Step S3: performing multimodal image preprocessing on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image preprocessing data; performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; performing complexity index feature weighting based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal fusion image generation according to the feature map weighted data to obtain a multimodal fusion image;

[0010] Step S4: Perform regional appearance normal mode learning based on the multimodal fusion image and design data to obtain the regional appearance normal mode model; determine the adaptive defect detection threshold based on the regional appearance normal mode model to obtain adaptive defect detection threshold data; generate a defect area mask based on the adaptive defect detection threshold data and the multimodal fusion image to obtain defect area mask data; superimpose the defect area mask data on the multimodal fusion image to visualize the defect detection results to realize flexible circuit board defect detection.

[0011] The present invention can accurately predict the optical response characteristics of different materials and defect types by establishing an optical model of a flexible circuit board and simulating the propagation process of light in the model, providing a theoretical basis for subsequent image correction and defect detection, and improving the accuracy and reliability of defect detection. By quantifying the complexity of the design of the flexible circuit board, a reference can be provided for subsequent defect detection, for example, the sensitivity of defect detection can be adaptively adjusted according to the design complexity index to improve the defect detection rate in complex areas. Through multimodal image fusion, the information of multiple imaging methods can be comprehensively utilized to overcome the limitations of a single imaging method, and the image quality and reliability of defect detection can be improved. At the same time, image correction based on material optical response data can eliminate the influence of material properties on image imaging quality, and further improve the accuracy of defect detection. By learning the normal mode model of regional appearance and combining with the abnormal response library, the defect detection threshold can be adaptively determined to improve the robustness and adaptability of defect detection. At the same time, the defect area mask is superimposed on the original image for visualization, which can more intuitively display the defect detection results, facilitate manual re-inspection and analysis, and improve the efficiency of defect detection. Therefore, the present invention provides an image detection method for a flexible circuit board, which is an optimization process for a traditional image detection method for a flexible circuit board. It solves the problem that the traditional image detection method for a flexible circuit board cannot overcome the image detection influence caused by the material and design of the FPC, improves the uniformity and clarity of the image, improves the accuracy of feature extraction, and effectively reduces the false detection rate and missed detection rate by overcoming the influence of material properties and circuit complexity. Combined with an adaptive threshold determination method, it can adapt to different detection environments and defect types, thereby effectively improving the accuracy, robustness and adaptability of defect detection.

[0012] Preferably, step S1 comprises the following steps:

[0013] Step S11: Analyze the material properties of the flexible circuit board and establish a material property database to obtain a material property database;

[0014] Step S12: obtaining flexible circuit board design file data; defining a layer structure according to the flexible circuit board design file data to obtain layer structure data; obtaining detection light source data through a detection light source system to obtain detection light source data;

[0015] Step S13: extracting material optical parameters from the material property database according to the detection light source data and the layer structure data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters;

[0016] Step S14: constructing an optical model of the flexible circuit board using optical simulation software according to the layer structure data and the interpolated optical parameters to obtain the optical model of the flexible circuit board; defining the light source according to the detected light source data to obtain the light source parameters;

[0017] Step S15: performing ray tracing simulation according to the optical model of the flexible circuit board and the light source parameters to obtain ray tracing data; solving the radiation transmission equation according to the optical model of the flexible circuit board and the light source parameters to obtain radiation transmission data;

[0018] Step S16: generating surface optical response data according to the ray tracing data and the radiation transmission data to obtain the surface optical response data;

[0019] Step S17: performing internal defect introduction processing on the optical model of the flexible circuit board to obtain a defect optical model; performing internal defect optical simulation on the defect optical model to obtain defect optical response data;

[0020] Step S18: performing optical response data fusion on the surface optical response data and the defect optical response data to obtain material optical response data.

[0021] The present invention can conveniently obtain optical characteristic parameters of different materials by establishing a material property database, provide basic data for subsequent optical simulation and image correction, and improve the versatility and scalability of the defect detection system. By obtaining the design file data of the flexible circuit board and defining the layer structure, the structural information of the flexible circuit board can be accurately described, providing a basis for the subsequent optical model construction, and improving the accuracy of the optical simulation. The optical parameters of the material are extracted according to the detection light source data and the layer structure data, and interpolation processing is performed to obtain a continuous optical parameter function, which more accurately describes the optical properties of the material and improves the accuracy of the optical simulation. By using optical simulation software to construct an optical model of the flexible circuit board, and defining the light source parameters according to the detection light source data, a real optical imaging environment can be simulated, and a platform for subsequent ray tracing and radiation transmission simulation is provided. By performing ray tracing simulation and solving the radiation transmission equation, the propagation process of light inside the flexible circuit board can be deeply understood, and the reflection, refraction and transmission information of light at the interface of different materials can be obtained, providing basic data for the subsequent generation of surface optical response data. Generating surface optical response data based on ray tracing data and radiation transmission data can accurately describe the propagation characteristics of light at different positions and angles on the surface of the flexible circuit board, provide a basis for subsequent image correction, and improve the uniformity and clarity of the image. By introducing internal defects into the optical model of the flexible circuit board and performing internal defect optical simulation, the optical response data of the defect area can be obtained for subsequent defect detection and identification. By fusing the surface optical response data and the defect optical response data, the complete material optical response data including normal areas and defect areas can be obtained, providing more comprehensive data support for subsequent image correction and defect detection, and improving the accuracy and reliability of defect detection.

[0022] Preferably, step S13 comprises the following steps:

[0023] Step S131: Extract the light source spectrum distribution data according to the detected light source data to obtain the light source spectrum distribution data

[0024] Step S132: extracting material optical parameters from the material property database according to the light source spectrum distribution data and the layer structure data to obtain the material optical parameters;

[0025] Step S133: determining the interpolation wavelength range according to the light source spectrum distribution data to obtain interpolation wavelength range data;

[0026] Step S134: performing cubic spline interpolation calculation on the optical parameters of the material according to the material property database and performing wavelength range restriction processing according to the interpolation wavelength range data to obtain an interpolation optical parameter function;

[0027] Step S135: Calculate the optical parameter value according to the interpolation optical parameter function and the light source spectrum distribution data to obtain the interpolation optical parameter.

[0028] The present invention can accurately understand the luminous intensity distribution of the light source at different wavelengths by extracting the light source spectrum distribution data, provide a basis for the subsequent extraction of material optical parameters and optical parameter interpolation, and improve the accuracy of optical simulation. According to the light source spectrum distribution data and layer structure data, the material optical parameters that are consistent with the actual lighting conditions can be extracted from the material property database, which improves the authenticity and reliability of the optical simulation. According to the light source spectrum distribution data, the interpolation wavelength range can be determined, and the interpolation calculation can be concentrated on the band where the light source energy is relatively concentrated, which improves the accuracy and efficiency of the interpolation and avoids unnecessary calculations. The material optical parameters are interpolated by using the cubic spline interpolation algorithm, and are restricted according to the interpolation wavelength range data, so that a smooth and continuous optical parameter function can be obtained, which more accurately describes the optical properties of the material within the light source band range, and improves the accuracy and reliability of the optical simulation. According to the interpolation optical parameter function and the light source spectrum distribution data, the interpolation optical parameters are calculated, and the discrete material optical parameters can be converted into continuous optical parameters corresponding to the light source spectrum distribution, which improves the accuracy of the optical simulation and provides more accurate input parameters for subsequent optical simulation.

[0029] Preferably, step S2 comprises the following steps:

[0030] Step S21: extracting design data according to the flexible circuit board design file data to obtain design data; extracting wire features from the design data to obtain wire feature data; extracting pad and via features from the design data to obtain pad and via feature data;

[0031] Step S22: performing inter-layer alignment analysis according to the wire feature data and the pad and via feature data to obtain inter-layer alignment data;

[0032] Step S23: dividing the design area of ​​the flexible circuit board according to the design data and performing local density calculation to obtain local density data;

[0033] Step S24: binarizing the design data according to the wire feature data and the pad and via feature data to obtain binary image data;

[0034] Step S25: performing fractal dimension calculation based on the binary image data to obtain fractal dimension data; performing topological complexity calculation based on the inter-layer alignment data to obtain topological complexity data;

[0035] Step S26: normalizing the wire feature data, pad and via feature data, local density data, fractal dimension data, and topology complexity data, and fusing the design complexity index to obtain the design complexity index.

[0036] The present invention can comprehensively describe the design information of the flexible circuit board by extracting the feature data of design elements such as wires, pads and vias, and provide basic data for subsequent interlayer alignment analysis, design complexity quantification, etc. Interlayer alignment analysis can be performed to evaluate the alignment accuracy of corresponding elements between different design layers, and provide a reference for subsequent defect detection, such as identifying defects such as dislocation and distortion. By dividing the design area of ​​the flexible circuit board and calculating the local density, the design-intensive area can be identified to provide guidance for subsequent defect detection, such as improving the detection sensitivity in the dense area. Converting the design data into binary image data can simplify subsequent image processing and analysis operations and improve computational efficiency. Calculating indicators such as fractal dimension and topological complexity can quantify the complexity of the flexible circuit board design and provide a reference for subsequent defect detection, such as adjusting the detection algorithm parameters according to the design complexity. By standardizing each feature data and fusing the design complexity index, a comprehensive index can be obtained to characterize the overall complexity of the flexible circuit board design, and provide more comprehensive reference information for subsequent defect detection, such as adaptively adjusting the sensitivity of defect detection according to the design complexity index.

[0037] Preferably, step S3 comprises the following steps:

[0038] Step S31: performing multimodal image acquisition on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image data; performing multimodal image preprocessing on the multimodal image data to obtain multimodal image preprocessing data;

[0039] Step S32: performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data;

[0040] Step S33: extracting image features from the material optical response correction image data to obtain correction image feature data;

[0041] Step S34: performing complexity index feature weighting on the corrected image feature data based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal image registration according to the feature map weighted data to obtain multimodal registered image data;

[0042] Step S35: performing multi-scale feature fusion on the feature map weighted data to obtain multi-scale fusion feature data; performing decision layer fusion on the multi-modal registration image data to obtain decision layer fusion data;

[0043] Step S36: generating a multimodal fusion image according to the multi-scale fusion feature data and the decision layer fusion data to obtain a multimodal fusion image.

[0044] The present invention can obtain multi-angle and multi-spectral flexible circuit board image information and improve image quality through multi-modal image acquisition and preprocessing, laying a foundation for subsequent image analysis and defect detection. Optical response image correction based on material optical response data can effectively eliminate the influence of material characteristics on image imaging quality, improve image uniformity and clarity, and facilitate subsequent feature extraction and defect detection. Feature extraction can be performed on the corrected image to extract feature data that can characterize image information, providing a basis for subsequent defect detection. Weighting the corrected image feature data according to the design complexity index can highlight the feature information of complex areas and improve the sensitivity of defect detection in complex areas. At the same time, multi-modal image registration can eliminate image dislocation caused by different viewing angles and imaging distances, and provide more accurate image data for subsequent image fusion. Multi-scale feature fusion can integrate feature information at different scales, improve the robustness of feature expression, and facilitate a more comprehensive description of defect features. Decision layer fusion can integrate information from different modal images to improve the accuracy and reliability of defect detection. By fusing multi-scale features and decision-level information to generate a multimodal fusion image, multimodal information can be comprehensively utilized to improve the accuracy and reliability of defect detection and provide richer information for subsequent defect identification and classification.

[0045] Preferably, step S32 includes the following steps:

[0046] Step S321: extracting pixel-level optical response data from the material optical response data according to the multimodal image preprocessing data to obtain pixel-level optical response data;

[0047] Step S322: performing image channel separation on the multimodal image preprocessing data to obtain image channel data;

[0048] Step S323: performing channel response correction on the image channel data according to the pixel-level optical response data to obtain image channel correction data;

[0049] Step S324: reorganizing the image channel correction data to obtain reorganized image data;

[0050] Step S325: performing image detail enhancement on the reconstructed image data to obtain material optical response correction image data.

[0051] The present invention can obtain the material optical property information corresponding to each pixel by extracting pixel-level optical response data, provide refined data support for subsequent channel response correction, and improve the accuracy of correction. The multimodal image preprocessing data is subjected to image channel separation, and the information of different color channels can be separated and corrected separately, thereby improving the pertinence and effectiveness of the correction. Channel response correction of image channel data according to pixel-level optical response data can effectively eliminate the influence of material optical properties on the imaging quality of different color channels, and improve the color authenticity and accuracy of the image. The corrected image channel data is recombined into multi-channel image data to restore the color information of the image, providing a basis for subsequent image processing and analysis. Image detail enhancement of the recombined image data can further improve the clarity and contrast of the image, highlight the detail information in the image, provide a clearer image basis for subsequent defect detection, and improve the sensitivity of defect detection.

[0052] Preferably, step S34 includes the following steps:

[0053] Step S341: mapping the design complexity index to a pixel local index according to the multimodal image preprocessing data to obtain pixel-level complexity map data;

[0054] Step S342: generating a feature map for the corrected image feature data to obtain feature map data;

[0055] Step S343: Calculate weighted coefficients according to the pixel-level complexity map data to obtain weighted coefficient map data;

[0056] Step S344: performing feature map weighting processing on the feature map data according to the weighting coefficient map data to obtain feature map weighted data.

[0057] The present invention maps the design complexity index to the pixel level to obtain pixel-level complexity map data, which can more finely describe the design complexity of different areas in the image and provide more accurate spatial information for subsequent feature weighting processing. Converting the corrected image feature data into a feature map can more intuitively represent the feature information of the image, facilitating subsequent weighted processing and visualization. By calculating the weighting coefficient based on the pixel-level complexity map data, different weights can be assigned to the features of different areas according to the design complexity, increasing the feature weights of complex areas and reducing the feature weights of simple areas, thereby improving the sensitivity of defect detection in complex areas. By weighting the feature map data according to the weighting coefficient map data, the feature information of complex areas can be highlighted and the feature information of simple areas can be suppressed, so that the defect detection algorithm pays more attention to complex areas, thereby improving the accuracy and efficiency of defect detection.

[0058] Preferably, step S4 comprises the following steps:

[0059] Step S41: performing image region segmentation on the multimodal fusion image to obtain image region segmentation data; performing regional feature extraction on the image region segmentation data to obtain regional feature data;

[0060] Step S42: performing regional appearance normal mode learning according to the regional feature data and the design data to obtain a regional appearance normal mode model;

[0061] Step S43: performing abnormal response simulation according to the material optical response data and a preset defect model library to obtain an abnormal response library;

[0062] Step S44: determining an adaptive defect detection threshold according to the regional appearance normal mode model and the abnormal response library to obtain adaptive defect detection threshold data;

[0063] Step S45: generating a defect area mask according to the adaptive defect detection threshold data and the multimodal fusion image to obtain defect area mask data;

[0064] Step S46: superimpose the defect area mask data onto the multimodal fusion image to visualize the defect detection results, so as to realize flexible circuit board defect detection.

[0065] The present invention can decompose the image into different regions and extract the feature information of each region by performing regional segmentation and feature extraction on the multimodal fusion image, so as to provide a more refined analysis basis for subsequent defect detection. By learning the normal mode model of regional appearance, the characteristic distribution law of the flexible circuit board in the normal state can be mastered, and a reference benchmark can be provided for subsequent defect detection, thereby improving the accuracy of defect recognition. By simulating the abnormal responses of different defect types, an abnormal response library can be constructed to provide a reference basis for subsequent defect detection and improve the reliability of defect recognition. According to the normal mode model and the abnormal response library, the adaptive defect detection threshold is determined, and the detection sensitivity can be adaptively adjusted according to different regions and defect types, thereby improving the accuracy and robustness of defect detection. According to the adaptive defect detection threshold, a defect area mask is generated, and the position and range of the defect area can be accurately marked, thereby providing intuitive image information for subsequent defect analysis. The defect area mask is superimposed on the original image for visualization, so that the defect detection results can be more intuitively displayed, which is convenient for manual re-inspection and analysis, and improves the efficiency of defect detection.

[0066] Preferably, step S45 includes the following steps:

[0067] Step S451: using the adaptive defect detection threshold data to perform defect candidate area detection on the multimodal fusion image to obtain defect candidate area data;

[0068] Step S452: performing false detection and elimination on the defect candidate area data according to the design data to obtain optimized defect candidate area data;

[0069] Step S453: extract multi-scale features from the defect candidate area optimization data to obtain multi-scale feature data; classify defects based on the multi-scale feature data to obtain defect classification result data;

[0070] Step S454: Generate a defect area mask according to the defect classification result data to obtain defect area mask data.

[0071] The present invention uses an adaptive defect detection threshold to detect defect candidate areas, and can adaptively adjust the detection sensitivity according to different areas and defect types, preliminarily screen out potential defect areas, and improve the efficiency of defect detection. False detection and elimination of defect candidate areas based on design data can exclude normal areas within the design tolerance range, reduce the false detection rate, and improve the accuracy of defect detection. Multi-scale feature extraction and defect classification of defect candidate areas can more comprehensively describe defect characteristics and identify different types of defects, providing more detailed information for subsequent defect analysis. Defect area masks are generated based on defect classification results, and different types of defect areas can be marked separately to facilitate manual re-inspection and analysis, thereby improving the efficiency and accuracy of defect detection.

[0072] Preferably, the present invention further provides an image detection system for a flexible circuit board, which is used to perform the image detection method for a flexible circuit board as described above, and the image detection system for a flexible circuit board comprises:

[0073] The material optical modeling module is used to acquire detection light source data through the detection light source system to obtain detection light source data; acquire flexible circuit board design file data; extract material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; perform optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; construct a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extract material optical response data according to the flexible circuit board optical model to obtain material optical response data;

[0074] The design complexity quantification module is used to extract design data according to the flexible circuit board design file data to obtain design data; perform design feature binarization processing according to the design data to obtain binary image data; perform design complexity quantification according to the binary image data to obtain a design complexity index;

[0075] The multimodal image fusion module is used to perform multimodal image preprocessing on the flexible circuit board to be detected according to the detection light source data to obtain multimodal image preprocessing data; perform optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; perform complexity index feature weighting based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; generate a multimodal fusion image according to the feature map weighted data to obtain a multimodal fusion image;

[0076] The adaptive defect detection module is used to learn the normal mode of regional appearance based on the multimodal fusion image and design data to obtain the normal mode model of regional appearance; determine the adaptive defect detection threshold based on the normal mode model of regional appearance to obtain adaptive defect detection threshold data; generate the defect area mask based on the adaptive defect detection threshold data and the multimodal fusion image to obtain the defect area mask data; superimpose the defect area mask data on the multimodal fusion image to visualize the defect detection results, so as to realize the defect detection of flexible circuit boards.

[0077] The present invention can accurately predict the optical response characteristics of different materials and defect types by establishing an optical model of a flexible circuit board and simulating the propagation process of light in the model, providing a theoretical basis for subsequent image correction and defect detection, and improving the accuracy and reliability of defect detection. By quantifying the complexity of the design of the flexible circuit board, a reference can be provided for subsequent defect detection, for example, the sensitivity of defect detection can be adaptively adjusted according to the design complexity index to improve the defect detection rate in complex areas. Through multimodal image fusion, the information of multiple imaging methods can be comprehensively utilized to overcome the limitations of a single imaging method, and the image quality and reliability of defect detection can be improved. At the same time, image correction based on material optical response data can eliminate the influence of material properties on image imaging quality, and further improve the accuracy of defect detection. By learning the normal mode model of regional appearance and combining with the abnormal response library, the defect detection threshold can be adaptively determined to improve the robustness and adaptability of defect detection. At the same time, the defect area mask is superimposed on the original image for visualization, which can more intuitively display the defect detection results, facilitate manual re-inspection and analysis, and improve the efficiency of defect detection. Therefore, the present invention provides an image detection method for a flexible circuit board, which is an optimization process for a traditional image detection method for a flexible circuit board. It solves the problem that the traditional image detection method for a flexible circuit board cannot overcome the image detection influence caused by the material and design of the FPC, improves the uniformity and clarity of the image, improves the accuracy of feature extraction, and effectively reduces the false detection rate and missed detection rate by overcoming the influence of material properties and circuit complexity. Combined with an adaptive threshold determination method, it can adapt to different detection environments and defect types, thereby effectively improving the accuracy, robustness and adaptability of defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A schematic diagram of the steps of the image detection method for a flexible circuit board;

[0079] Figure 2 for Figure 1 Detailed implementation steps of step S1 in FIG.

[0080] Figure 3 for Figure 1 Detailed implementation steps of step S3 in FIG.

[0081] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0082] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0083] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0084] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0085] To achieve this, please refer to Figures 1 to 3 , an image detection method for a flexible circuit board, comprising the following steps:

[0086] Step S1: acquiring detection light source data through a detection light source system to obtain detection light source data; acquiring flexible circuit board design file data; extracting material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; constructing a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extracting material optical response data according to the flexible circuit board optical model to obtain material optical response data;

[0087] Step S2: extracting design data according to the flexible circuit board design file data to obtain design data; binarizing the design features according to the design data to obtain binary image data; quantifying the design complexity according to the binary image data to obtain a design complexity index;

[0088] Step S3: performing multimodal image preprocessing on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image preprocessing data; performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; performing complexity index feature weighting based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal fusion image generation according to the feature map weighted data to obtain a multimodal fusion image;

[0089] Step S4: Perform regional appearance normal mode learning based on the multimodal fusion image and design data to obtain the regional appearance normal mode model; determine the adaptive defect detection threshold based on the regional appearance normal mode model to obtain adaptive defect detection threshold data; generate a defect area mask based on the adaptive defect detection threshold data and the multimodal fusion image to obtain defect area mask data; superimpose the defect area mask data on the multimodal fusion image to visualize the defect detection results to realize flexible circuit board defect detection.

[0090] The present invention can accurately predict the optical response characteristics of different materials and defect types by establishing an optical model of a flexible circuit board and simulating the propagation process of light in the model, providing a theoretical basis for subsequent image correction and defect detection, and improving the accuracy and reliability of defect detection. By quantifying the complexity of the design of the flexible circuit board, a reference can be provided for subsequent defect detection, for example, the sensitivity of defect detection can be adaptively adjusted according to the design complexity index to improve the defect detection rate in complex areas. Through multimodal image fusion, the information of multiple imaging methods can be comprehensively utilized to overcome the limitations of a single imaging method, and the image quality and reliability of defect detection can be improved. At the same time, image correction based on material optical response data can eliminate the influence of material properties on image imaging quality, and further improve the accuracy of defect detection. By learning the normal mode model of regional appearance and combining with the abnormal response library, the defect detection threshold can be adaptively determined to improve the robustness and adaptability of defect detection. At the same time, the defect area mask is superimposed on the original image for visualization, which can more intuitively display the defect detection results, facilitate manual re-inspection and analysis, and improve the efficiency of defect detection. Therefore, the present invention provides an image detection method for a flexible circuit board, which is an optimization process for a traditional image detection method for a flexible circuit board. It solves the problem that the traditional image detection method for a flexible circuit board cannot overcome the image detection influence caused by the material and design of the FPC, improves the uniformity and clarity of the image, improves the accuracy of feature extraction, and effectively reduces the false detection rate and missed detection rate by overcoming the influence of material properties and circuit complexity. Combined with an adaptive threshold determination method, it can adapt to different detection environments and defect types, thereby effectively improving the accuracy, robustness and adaptability of defect detection.

[0091] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of the image detection method of the flexible circuit board of the present invention. In this example, the image detection method of the flexible circuit board includes the following steps:

[0092] Step S1: acquiring detection light source data through a detection light source system to obtain detection light source data; acquiring flexible circuit board design file data; extracting material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; constructing a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extracting material optical response data according to the flexible circuit board optical model to obtain material optical response data;

[0093] In an embodiment of the present invention, first, a spectrometer is used to measure the spectral distribution data of the detection light source as the detection light source data. Then, the design file (such as a Gerber file) of the flexible circuit board is read to extract information such as the material type, thickness, line shape and position of each layer of the circuit. According to the detection light source data, material information and layer structure information, the optical parameters of the corresponding material in the main light-emitting band of the light source are retrieved from a pre-established material property database. Since the optical parameters stored in the database are discrete, it is necessary to use algorithms such as cubic spline interpolation to interpolate the material optical parameters to obtain a continuous optical parameter function. Finally, an optical model of the flexible circuit board is constructed based on the layer structure data and the interpolated optical parameters using optical simulation software, and the propagation process of light in the model is simulated to obtain the material optical response data.

[0094] Step S2: extracting design data according to the flexible circuit board design file data to obtain design data; binarizing the design features according to the design data to obtain binary image data; quantifying the design complexity according to the binary image data to obtain a design complexity index;

[0095] In an embodiment of the present invention, the flexible circuit board design file is read to extract the information of all design elements, including wires, pads, vias, etc., to form complete design data. Then, the design data is converted into binary image data, in which the pixel value of the line area is 1 and the pixel value of the background area is 0. Based on the binary image data, indicators such as fractal dimension and topological complexity are calculated to characterize the complexity of the flexible circuit board design. Finally, the extracted feature data are standardized and fused into a comprehensive indicator, namely the design complexity indicator, using a suitable indicator fusion method.

[0096] Step S3: performing multimodal image preprocessing on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image preprocessing data; performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; performing complexity index feature weighting based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal fusion image generation according to the feature map weighted data to obtain a multimodal fusion image;

[0097] In an embodiment of the present invention, a multimodal imaging system, such as a system including a visible light camera, an infrared camera, and an X-ray imaging module, is used to perform multi-angle and multi-spectral image acquisition on a flexible circuit board to obtain multimodal image data. The acquired multimodal image data is preprocessed to improve the image quality. Then, based on the optical response data of the material obtained in step S1, the preprocessed multimodal image data is optically corrected to eliminate the influence of material properties on the image quality. Next, image features are extracted from the corrected multimodal image data. According to the design complexity index of the flexible circuit board calculated in step S2 and the multimodal image preprocessing data, the extracted corrected image feature data is weighted. Finally, multimodal image registration is performed based on the weighted feature map data, and the multi-scale features and decision layer information are fused to generate the final multimodal fusion image.

[0098] Step S4: performing regional appearance normal mode learning according to the multimodal fusion image and the design data to obtain a regional appearance normal mode model; determining an adaptive defect detection threshold according to the regional appearance normal mode model to obtain adaptive defect detection threshold data; generating a defect region mask according to the adaptive defect detection threshold data and the multimodal fusion image to obtain defect region mask data; superimposing the defect region mask data onto the multimodal fusion image to visualize the defect detection results, so as to realize flexible circuit board defect detection;

[0099] In an embodiment of the present invention, an image segmentation algorithm is used to segment a multimodal fusion image, and feature information is extracted from each segmented region to form regional feature data. A machine learning algorithm is used to train the regional feature data and design data, learn the feature distribution law of each region of the flexible circuit board under normal conditions, and construct a normal mode model of the regional appearance. At the same time, based on the material optical response data and the pre-established defect model library, the optical response characteristics of different defects under different materials and imaging conditions are simulated to construct an abnormal response library. Then, based on the regional appearance normal mode model and the abnormal response library, an adaptive defect detection threshold is determined. Finally, defect detection is performed on the multimodal fusion image according to the adaptive defect detection threshold, defect area mask data is generated, and the mask data is superimposed on the original image to achieve visualization of the defect detection results.

[0100] Preferably, step S1 comprises the following steps:

[0101] Step S11: Analyze the material properties of the flexible circuit board and establish a material property database to obtain a material property database;

[0102] Step S12: obtaining flexible circuit board design file data; defining a layer structure according to the flexible circuit board design file data to obtain layer structure data; obtaining detection light source data through a detection light source system to obtain detection light source data;

[0103] Step S13: extracting material optical parameters from the material property database according to the detection light source data and the layer structure data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters;

[0104] Step S14: constructing an optical model of the flexible circuit board using optical simulation software according to the layer structure data and the interpolated optical parameters to obtain the optical model of the flexible circuit board; defining the light source according to the detected light source data to obtain the light source parameters;

[0105] Step S15: performing ray tracing simulation according to the optical model of the flexible circuit board and the light source parameters to obtain ray tracing data; solving the radiation transmission equation according to the optical model of the flexible circuit board and the light source parameters to obtain radiation transmission data;

[0106] Step S16: generating surface optical response data according to the ray tracing data and the radiation transmission data to obtain the surface optical response data;

[0107] Step S17: performing internal defect introduction processing on the optical model of the flexible circuit board to obtain a defect optical model; performing internal defect optical simulation on the defect optical model to obtain defect optical response data;

[0108] Step S18: performing optical response data fusion on the surface optical response data and the defect optical response data to obtain material optical response data.

[0109] The present invention can conveniently obtain optical characteristic parameters of different materials by establishing a material property database, provide basic data for subsequent optical simulation and image correction, and improve the versatility and scalability of the defect detection system. By obtaining the design file data of the flexible circuit board and defining the layer structure, the structural information of the flexible circuit board can be accurately described, providing a basis for the subsequent optical model construction, and improving the accuracy of the optical simulation. The optical parameters of the material are extracted according to the detection light source data and the layer structure data, and interpolation processing is performed to obtain a continuous optical parameter function, which more accurately describes the optical properties of the material and improves the accuracy of the optical simulation. By using optical simulation software to construct an optical model of the flexible circuit board, and defining the light source parameters according to the detection light source data, a real optical imaging environment can be simulated, and a platform for subsequent ray tracing and radiation transmission simulation is provided. By performing ray tracing simulation and solving the radiation transmission equation, the propagation process of light inside the flexible circuit board can be deeply understood, and the reflection, refraction and transmission information of light at the interface of different materials can be obtained, providing basic data for the subsequent generation of surface optical response data. Generating surface optical response data based on ray tracing data and radiation transmission data can accurately describe the propagation characteristics of light at different positions and angles on the surface of the flexible circuit board, provide a basis for subsequent image correction, and improve the uniformity and clarity of the image. By introducing internal defects into the optical model of the flexible circuit board and performing internal defect optical simulation, the optical response data of the defect area can be obtained for subsequent defect detection and identification. By fusing the surface optical response data and the defect optical response data, the complete material optical response data including normal areas and defect areas can be obtained, providing more comprehensive data support for subsequent image correction and defect detection, and improving the accuracy and reliability of defect detection.

[0110] As an example of the present invention, refer to Figure 2 As shown, in this example, step S1 includes:

[0111] Step S11: Analyze the material properties of the flexible circuit board and establish a material property database to obtain a material property database;

[0112] In the embodiment of the present invention, first, samples of commonly used materials for flexible printed circuits (FPCs), such as substrates, copper foils, and covering layers, are collected. Optical characteristic parameters such as reflectivity, transmittance, and absorptivity of the materials under different wavelengths of light are measured using equipment such as a spectrometer. The measured optical characteristic parameters are stored in a database together with information such as the type and thickness of the corresponding material to construct a material characteristic database.

[0113] Step S12: obtaining flexible circuit board design file data; defining a layer structure according to the flexible circuit board design file data to obtain layer structure data; obtaining detection light source data through a detection light source system to obtain detection light source data;

[0114] In an embodiment of the present invention, a design file of a flexible circuit board, such as a Gerber file, is obtained. The design file is parsed to extract information such as the material type, thickness, line shape, and position of each layer of the circuit. Based on this information, layer structure data of the flexible circuit board is defined, such as the material and thickness of each layer and the arrangement order between layers. At the same time, the spectral distribution data of the detection light source is measured by a spectrometer as the detection light source data.

[0115] Step S13: extracting material optical parameters from the material property database according to the detection light source data and the layer structure data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters;

[0116] In the embodiment of the present invention, the wavelength range for extracting the optical parameters of the material is determined based on the detected light source data. According to the type and thickness of each layer of material in the layer structure data, the optical parameters of the corresponding material within the wavelength range are retrieved from the material property database. Since the optical parameters stored in the material property database are discrete, it is necessary to perform optical parameter interpolation processing, such as using cubic spline interpolation, to obtain a continuous optical parameter function for subsequent calculations.

[0117] Step S14: constructing an optical model of the flexible circuit board using optical simulation software according to the layer structure data and the interpolated optical parameters to obtain the optical model of the flexible circuit board; defining the light source according to the detected light source data to obtain the light source parameters;

[0118] In the embodiment of the present invention, an optical model of a flexible circuit board is constructed based on layer structure data and interpolated optical parameters using optical simulation software (e.g., Zemax, TracePro, Lumerical, etc.). The model should include the optical properties and geometric shape of each layer of material. At the same time, based on the detection light source data, the light source is defined in the optical simulation software, and parameters such as the light source type, spectral distribution, and irradiation angle are set.

[0119] Step S15: performing ray tracing simulation according to the optical model of the flexible circuit board and the light source parameters to obtain ray tracing data; solving the radiation transmission equation according to the optical model of the flexible circuit board and the light source parameters to obtain radiation transmission data;

[0120] In the embodiment of the present invention, optical simulation software is used to perform ray tracing simulation on the established flexible circuit board optical model. The reflection, refraction and transmission of light at the interfaces of different materials are simulated to obtain the propagation path and energy distribution of light inside the flexible circuit board, i.e., ray tracing data. At the same time, based on the radiation transmission equation, the propagation process of light inside the flexible circuit board is simulated and calculated to obtain the spatial distribution of physical quantities such as light intensity and phase, i.e., radiation transmission data.

[0121] Step S16: generating surface optical response data according to the ray tracing data and the radiation transmission data to obtain the surface optical response data;

[0122] In the embodiment of the present invention, the reflection, refraction and scattering of light on the surface of the flexible circuit board are calculated based on the ray tracing data and the radiation transmission data to generate surface optical response data. The data reflects the propagation characteristics of light at different positions and angles on the surface of the flexible circuit board.

[0123] Step S17: performing internal defect introduction processing on the optical model of the flexible circuit board to obtain a defect optical model; performing internal defect optical simulation on the defect optical model to obtain defect optical response data;

[0124] In the embodiment of the present invention, in the optical model of the flexible circuit board, internal defects such as open circuit, short circuit, bubble, etc. are introduced according to the type and size of the actual defects to construct a defect optical model. The defect optical model is optically simulated to obtain optical response data of the defect area.

[0125] Step S18: performing optical response data fusion on the surface optical response data and the defect optical response data to obtain material optical response data;

[0126] In the embodiment of the present invention, the surface optical response data and the defect optical response data are fused to obtain the material optical response data including the normal area and the defect area, which will be used for subsequent image correction and defect detection.

[0127] Preferably, step S13 comprises the following steps:

[0128] Step S131: Extract the light source spectrum distribution data according to the detected light source data to obtain the light source spectrum distribution data

[0129] Step S132: extracting material optical parameters from the material property database according to the light source spectrum distribution data and the layer structure data to obtain the material optical parameters;

[0130] Step S133: determining the interpolation wavelength range according to the light source spectrum distribution data to obtain interpolation wavelength range data;

[0131] Step S134: performing cubic spline interpolation calculation on the optical parameters of the material according to the material property database and performing wavelength range restriction processing according to the interpolation wavelength range data to obtain an interpolation optical parameter function;

[0132] Step S135: Calculate the optical parameter value according to the interpolation optical parameter function and the light source spectrum distribution data to obtain the interpolation optical parameter.

[0133] The present invention can accurately understand the luminous intensity distribution of the light source at different wavelengths by extracting the light source spectrum distribution data, provide a basis for the subsequent extraction of material optical parameters and optical parameter interpolation, and improve the accuracy of optical simulation. According to the light source spectrum distribution data and layer structure data, the material optical parameters that are consistent with the actual lighting conditions can be extracted from the material property database, which improves the authenticity and reliability of the optical simulation. According to the light source spectrum distribution data, the interpolation wavelength range can be determined, and the interpolation calculation can be concentrated on the band where the light source energy is relatively concentrated, which improves the accuracy and efficiency of the interpolation and avoids unnecessary calculations. The material optical parameters are interpolated by using the cubic spline interpolation algorithm, and are restricted according to the interpolation wavelength range data, so that a smooth and continuous optical parameter function can be obtained, which more accurately describes the optical properties of the material within the light source band range, and improves the accuracy and reliability of the optical simulation. According to the interpolation optical parameter function and the light source spectrum distribution data, the interpolation optical parameters are calculated, and the discrete material optical parameters can be converted into continuous optical parameters corresponding to the light source spectrum distribution, which improves the accuracy of the optical simulation and provides more accurate input parameters for subsequent optical simulation.

[0134] In the embodiment of the present invention, first, the detection light source is measured by a spectrometer to obtain its light intensity data at different wavelengths. Then, the measured light intensity data is normalized to obtain the relative intensity distribution of the light source at each wavelength, that is, the light source spectrum distribution data. According to the light source spectrum distribution data, the main light-emitting band of the light source is determined. Then, according to the type and thickness of each layer of material in the layer structure data, the optical parameters of the corresponding material in the main light-emitting band, such as refractive index, extinction coefficient, etc., are retrieved from the material property database. The light source spectrum distribution data is analyzed to determine the wavelength range that needs to be interpolated. For example, a band range where the energy of the light source is relatively concentrated can be selected as the interpolation wavelength range to improve the interpolation accuracy. For the material optical parameters extracted in step S132, the cubic spline interpolation algorithm is used to perform interpolation calculations on each material within the interpolation wavelength range. After the interpolation calculation is completed, a continuous function of the optical parameters of each material changing with the wavelength is obtained, that is, the interpolation optical parameter function. According to the light source spectrum distribution data, the weight coefficient corresponding to each wavelength is determined. Then, the interpolation optical parameter function is used to calculate the interpolation optical parameter value of each material at each wavelength. Finally, according to the weight coefficient corresponding to each wavelength, the interpolation optical parameter values ​​at each wavelength are weighted averaged to obtain the final interpolation optical parameter.

[0135] Preferably, step S2 comprises the following steps:

[0136] Step S21: extracting design data according to the flexible circuit board design file data to obtain design data; extracting wire features from the design data to obtain wire feature data; extracting pad and via features from the design data to obtain pad and via feature data;

[0137] Step S22: performing inter-layer alignment analysis according to the wire feature data and the pad and via feature data to obtain inter-layer alignment data;

[0138] Step S23: dividing the design area of ​​the flexible circuit board according to the design data and performing local density calculation to obtain local density data;

[0139] Step S24: binarizing the design data according to the wire feature data and the pad and via feature data to obtain binary image data;

[0140] Step S25: performing fractal dimension calculation based on the binary image data to obtain fractal dimension data; performing topological complexity calculation based on the inter-layer alignment data to obtain topological complexity data;

[0141] Step S26: normalizing the wire feature data, pad and via feature data, local density data, fractal dimension data, and topology complexity data, and fusing the design complexity index to obtain the design complexity index.

[0142] The present invention can comprehensively describe the design information of the flexible circuit board by extracting the feature data of design elements such as wires, pads and vias, and provide basic data for subsequent interlayer alignment analysis, design complexity quantification, etc. Interlayer alignment analysis can be performed to evaluate the alignment accuracy of corresponding elements between different design layers, and provide a reference for subsequent defect detection, such as identifying defects such as dislocation and distortion. By dividing the design area of ​​the flexible circuit board and calculating the local density, the design-intensive area can be identified to provide guidance for subsequent defect detection, such as improving the detection sensitivity in the dense area. Converting the design data into binary image data can simplify subsequent image processing and analysis operations and improve computational efficiency. Calculating indicators such as fractal dimension and topological complexity can quantify the complexity of the flexible circuit board design and provide a reference for subsequent defect detection, such as adjusting the detection algorithm parameters according to the design complexity. By standardizing each feature data and fusing the design complexity index, a comprehensive index can be obtained to characterize the overall complexity of the flexible circuit board design, and provide more comprehensive reference information for subsequent defect detection, such as adaptively adjusting the sensitivity of defect detection according to the design complexity index.

[0143] In an embodiment of the present invention, first, a flexible circuit board design file (such as a Gerber file) is read, the file content is parsed, and the information of all design elements is extracted, including but not limited to wires, pads, vias, copper plating, etc., to form complete design data. Then, the design data is processed separately to extract characteristic data such as the width, length, spacing, bending degree of the wire, and characteristic data such as the size, shape, and position of the pads and vias. Based on the extracted characteristic data of the wires, pads, and vias, the position deviation of the corresponding elements between different design layers is analyzed, for example, the offset of the inter-layer alignment is calculated using an image registration algorithm, and finally the inter-layer alignment data is obtained, which is used to characterize the alignment accuracy of the design elements between different layers. According to the distribution of each element in the design data, the design area of ​​the flexible circuit board is divided into several sub-areas, for example, it can be divided according to grid division or cluster analysis based on the design elements. Then, the density of the design elements in each sub-area is calculated separately, such as the proportion of the wire length to the area, the proportion of the number of pads and vias to the area, etc., to obtain local density data. According to the extracted characteristic data of the wires, pads, and vias, the design data is converted into binary image data. In the binary image, the pixel value of the wire, pad and via area is 1, indicating the line area, while the pixel value of other areas is 0, indicating the background area. Based on the binary image data, the fractal dimension is calculated using an image processing algorithm, such as the box dimension method, to characterize the complexity and space filling characteristics of the flexible circuit board design pattern. At the same time, according to the inter-layer alignment data, the connection relationship between the design elements of different layers is analyzed, such as calculating the number of cross-layer connections of wires, the inter-layer connection relationship of pads and vias, etc., and finally the topological complexity data is obtained. The various feature data extracted in steps S21 to S25 are standardized, such as normalized to between 0 and 1, to eliminate the influence of the dimensional difference between different feature data. Finally, according to the actual application requirements, a suitable index fusion method is selected, such as the linear weighted method, the principal component analysis method, etc., to fuse the standardized feature data into a comprehensive index, namely the design complexity index, which is used to characterize the overall complexity of the flexible circuit board design.

[0144] Preferably, step S3 comprises the following steps:

[0145] Step S31: performing multimodal image acquisition on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image data; performing multimodal image preprocessing on the multimodal image data to obtain multimodal image preprocessing data;

[0146] Step S32: performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data;

[0147] Step S33: extracting image features from the material optical response correction image data to obtain correction image feature data;

[0148] Step S34: performing complexity index feature weighting on the corrected image feature data based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal image registration according to the feature map weighted data to obtain multimodal registered image data;

[0149] Step S35: performing multi-scale feature fusion on the feature map weighted data to obtain multi-scale fusion feature data; performing decision layer fusion on the multi-modal registration image data to obtain decision layer fusion data;

[0150] Step S36: generating a multimodal fusion image according to the multi-scale fusion feature data and the decision layer fusion data to obtain a multimodal fusion image.

[0151] The present invention can obtain multi-angle and multi-spectral flexible circuit board image information and improve image quality through multi-modal image acquisition and preprocessing, laying a foundation for subsequent image analysis and defect detection. Optical response image correction based on material optical response data can effectively eliminate the influence of material characteristics on image imaging quality, improve image uniformity and clarity, and facilitate subsequent feature extraction and defect detection. Feature extraction can be performed on the corrected image to extract feature data that can characterize image information, providing a basis for subsequent defect detection. Weighting the corrected image feature data according to the design complexity index can highlight the feature information of complex areas and improve the sensitivity of defect detection in complex areas. At the same time, multi-modal image registration can eliminate image dislocation caused by different viewing angles and imaging distances, and provide more accurate image data for subsequent image fusion. Multi-scale feature fusion can integrate feature information at different scales, improve the robustness of feature expression, and facilitate a more comprehensive description of defect features. Decision layer fusion can integrate information from different modal images to improve the accuracy and reliability of defect detection. By fusing multi-scale features and decision-level information to generate a multimodal fusion image, multimodal information can be comprehensively utilized to improve the accuracy and reliability of defect detection and provide richer information for subsequent defect identification and classification.

[0152] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes:

[0153] Step S31: performing multimodal image acquisition on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image data; performing multimodal image preprocessing on the multimodal image data to obtain multimodal image preprocessing data;

[0154] In an embodiment of the present invention, a multimodal imaging system equipped with different types of sensors, such as a system including a visible light camera, an infrared camera, and an X-ray imaging module, is used to perform multi-angle and multi-spectral image acquisition on a flexible circuit board to obtain multimodal image data. Then, the acquired multimodal image data is preprocessed, such as image denoising, image enhancement, geometric correction, etc., to improve image quality and prepare for subsequent processing.

[0155] Step S32: performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data;

[0156] In the embodiment of the present invention, based on the material optical response data obtained in step S1, optical response correction is performed on the multimodal image data preprocessed in step S31. For example, according to the absorption and reflection characteristics of different materials to light of different wavelengths, pixel-level brightness and color correction is performed on the image to eliminate the influence of material characteristics on image quality and improve the uniformity and clarity of the image.

[0157] Step S33: extracting image features from the material optical response correction image data to obtain correction image feature data;

[0158] In an embodiment of the present invention, image feature extraction is performed on the corrected multimodal image data, for example, using edge detection, texture analysis, morphological operations and other methods to extract features that can characterize the image information, such as feature data such as the edge, texture, shape and the like of the image.

[0159] Step S34: performing complexity index feature weighting on the corrected image feature data based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal image registration according to the feature map weighted data to obtain multimodal registered image data;

[0160] In the embodiment of the present invention, the corrected image feature data extracted in step S33 is weighted according to the flexible circuit board design complexity index calculated in step S2 and the multimodal image preprocessing data in step S31. For example, higher weights are assigned to areas with higher design complexity to highlight the feature information of these areas, thereby improving the sensitivity of defect detection. Based on the weighted feature map data, an image registration algorithm, such as a registration method based on feature points, is used to register the multimodal images, eliminate image misalignment caused by factors such as viewing angle and imaging distance, and obtain multimodal registered image data.

[0161] Step S35: performing multi-scale feature fusion on the feature map weighted data to obtain multi-scale fusion feature data; performing decision layer fusion on the multi-modal registration image data to obtain decision layer fusion data;

[0162] In the embodiment of the present invention, multi-scale feature fusion is performed on the weighted data of the feature map obtained in step S34, for example, a pyramid feature fusion method is used to integrate feature information at different scales to improve the robustness of feature expression. At the same time, decision-level fusion is performed on the multi-modal registration image data obtained in step S34, for example, a voting mechanism or Dempster-Shafer evidence theory is used to fuse information of images of different modalities to improve the accuracy of defect detection.

[0163] Step S36: generating a multimodal fusion image according to the multi-scale fusion feature data and the decision layer fusion data to obtain a multimodal fusion image;

[0164] In the embodiment of the present invention, the final multimodal fusion image is generated according to the multi-scale fusion feature data and the decision layer fusion data obtained in step S35. For example, the weighted average method can be used to fuse the information of different modalities into one image, or the feature information of different modalities can be visualized by superimposing feature maps. The multimodal fusion image finally obtained can comprehensively utilize multimodal information to improve the accuracy and reliability of defect detection.

[0165] Preferably, step S32 includes the following steps:

[0166] Step S321: extracting pixel-level optical response data from the material optical response data according to the multimodal image preprocessing data to obtain pixel-level optical response data;

[0167] Step S322: performing image channel separation on the multimodal image preprocessing data to obtain image channel data;

[0168] Step S323: performing channel response correction on the image channel data according to the pixel-level optical response data to obtain image channel correction data;

[0169] Step S324: reorganizing the image channel correction data to obtain reorganized image data;

[0170] Step S325: performing image detail enhancement on the reconstructed image data to obtain material optical response correction image data.

[0171] The present invention can obtain the material optical property information corresponding to each pixel by extracting pixel-level optical response data, provide refined data support for subsequent channel response correction, and improve the accuracy of correction. The multimodal image preprocessing data is subjected to image channel separation, and the information of different color channels can be separated and corrected separately, thereby improving the pertinence and effectiveness of the correction. Channel response correction of image channel data according to pixel-level optical response data can effectively eliminate the influence of material optical properties on the imaging quality of different color channels, and improve the color authenticity and accuracy of the image. The corrected image channel data is recombined into multi-channel image data to restore the color information of the image, providing a basis for subsequent image processing and analysis. Image detail enhancement of the recombined image data can further improve the clarity and contrast of the image, highlight the detail information in the image, provide a clearer image basis for subsequent defect detection, and improve the sensitivity of defect detection.

[0172] In an embodiment of the present invention, first, according to the coordinate information of each pixel in the multimodal image preprocessing data, the optical response information of the corresponding pixel position is found in the material optical response data. Then, the optical response parameters of the position, such as reflectivity, transmittance, absorptivity, etc., are extracted as the pixel-level optical response data of the pixel. The multimodal image preprocessing data is separated according to the color channel, for example, the RGB image is separated into three independent channel data of R, G, and B. Each channel data is a single-channel grayscale image, which represents the brightness information of the image under the color channel. According to the pixel-level optical response data extracted in step S321, the image channel data separated in step S322 is subjected to channel response correction. For example, the reflectivity information of the corresponding color channel in the pixel-level optical response data can be used to perform pixel-by-pixel brightness correction on the image data of the channel to eliminate the influence of the optical properties of the material on the imaging quality of different color channels. The corrected color channel data in step S323 are recombined into multi-channel image data. For example, the corrected three channel data of R, G, and B are recombined into an RGB color image. The image data reorganized in step S324 is subjected to image detail enhancement processing, such as using algorithms such as image sharpening and contrast enhancement, to further improve the clarity and contrast of the image and highlight the detail information in the image.

[0173] Preferably, step S34 includes the following steps:

[0174] Step S341: mapping the design complexity index to a pixel local index according to the multimodal image preprocessing data to obtain pixel-level complexity map data;

[0175] Step S342: generating a feature map for the corrected image feature data to obtain feature map data;

[0176] Step S343: Calculate weighted coefficients according to the pixel-level complexity map data to obtain weighted coefficient map data;

[0177] Step S344: performing feature map weighting processing on the feature map data according to the weighting coefficient map data to obtain feature map weighted data.

[0178] The present invention maps the design complexity index to the pixel level to obtain pixel-level complexity map data, which can more finely describe the design complexity of different areas in the image and provide more accurate spatial information for subsequent feature weighting processing. Converting the corrected image feature data into a feature map can more intuitively represent the feature information of the image, facilitating subsequent weighted processing and visualization. By calculating the weighting coefficient based on the pixel-level complexity map data, different weights can be assigned to the features of different areas according to the design complexity, increasing the feature weights of complex areas and reducing the feature weights of simple areas, thereby improving the sensitivity of defect detection in complex areas. By weighting the feature map data according to the weighting coefficient map data, the feature information of complex areas can be highlighted and the feature information of simple areas can be suppressed, so that the defect detection algorithm pays more attention to complex areas, thereby improving the accuracy and efficiency of defect detection.

[0179] In an embodiment of the present invention, first, according to the size of the multimodal image preprocessing data, the design complexity index is mapped to a spatial grid of the same size as the image. Then, according to the position of each pixel in the spatial grid, the design complexity index value corresponding to the grid unit to which it belongs is found. The index value is assigned to the pixel to generate pixel-level complexity map data, wherein the grayscale value of each pixel represents the design complexity of the position. The corrected image feature data extracted in step S33 is converted into an image form, for example, edge features are converted into edge images, texture features are converted into texture images, etc. Finally, feature map data containing multiple feature channels is obtained, and each channel represents an image feature. According to the pixel-level complexity map data obtained in step S341, the weight coefficient corresponding to each pixel is calculated. For example, a threshold can be set, and the weight coefficient of the pixel with a complexity higher than the threshold is set to a larger value, and the weight coefficient of the pixel with a complexity lower than the threshold is set to a smaller value. Finally, weight coefficient map data with the same size as the image is obtained, wherein the grayscale value of each pixel represents the weight coefficient of the position. The weighted coefficient map data obtained in step S343 is multiplied pixel by pixel with the feature map data obtained in step S342 to achieve weighted processing of the feature map. In this way, the feature information of the area with higher complexity will be amplified, while the feature information of the area with lower complexity will be suppressed, thereby improving the sensitivity of defect detection in complex areas. Finally, the feature map weighted data is obtained for subsequent multimodal image registration and fusion.

[0180] Preferably, step S4 comprises the following steps:

[0181] Step S41: performing image region segmentation on the multimodal fusion image to obtain image region segmentation data; performing regional feature extraction on the image region segmentation data to obtain regional feature data;

[0182] Step S42: performing regional appearance normal mode learning according to the regional feature data and the design data to obtain a regional appearance normal mode model;

[0183] Step S43: performing abnormal response simulation according to the material optical response data and a preset defect model library to obtain an abnormal response library;

[0184] Step S44: determining an adaptive defect detection threshold according to the regional appearance normal mode model and the abnormal response library to obtain adaptive defect detection threshold data;

[0185] Step S45: generating a defect area mask according to the adaptive defect detection threshold data and the multimodal fusion image to obtain defect area mask data;

[0186] Step S46: superimpose the defect area mask data onto the multimodal fusion image to visualize the defect detection results, so as to realize flexible circuit board defect detection.

[0187] The present invention can decompose the image into different regions and extract the feature information of each region by performing regional segmentation and feature extraction on the multimodal fusion image, so as to provide a more refined analysis basis for subsequent defect detection. By learning the normal mode model of regional appearance, the characteristic distribution law of the flexible circuit board in the normal state can be mastered, and a reference benchmark can be provided for subsequent defect detection, thereby improving the accuracy of defect recognition. By simulating the abnormal responses of different defect types, an abnormal response library can be constructed to provide a reference basis for subsequent defect detection and improve the reliability of defect recognition. According to the normal mode model and the abnormal response library, the adaptive defect detection threshold is determined, and the detection sensitivity can be adaptively adjusted according to different regions and defect types, thereby improving the accuracy and robustness of defect detection. According to the adaptive defect detection threshold, a defect area mask is generated, and the position and range of the defect area can be accurately marked, thereby providing intuitive image information for subsequent defect analysis. The defect area mask is superimposed on the original image for visualization, so that the defect detection results can be more intuitively displayed, which is convenient for manual re-inspection and analysis, and improves the efficiency of defect detection.

[0188] In an embodiment of the present invention, an image segmentation algorithm is used, such as edge detection, threshold segmentation, region growth, etc., to segment the multimodal fusion image, and the image is divided into different regions, such as a wire region, a pad region, a substrate region, etc., to obtain image region segmentation data. Then, for each segmented region, its feature information, such as the shape, size, color, texture, etc. of the region, is extracted to form regional feature data. A machine learning algorithm, such as a support vector machine, deep learning, etc., is used to train the regional feature data and design data extracted in step S41, learn the feature distribution law of each region of the flexible circuit board under normal conditions, and construct a normal mode model of the regional appearance. The model can describe the feature distribution range of the normal region. According to the material optical response data obtained in step S1, and a pre-established defect model library containing various defect types (such as open circuit, short circuit, bubble, etc.), optical simulation software is used to simulate the optical response characteristics of different defects under different materials and imaging conditions, and an abnormal response library is constructed. The library contains optical response feature information corresponding to various defect types. According to the normal mode model of regional appearance learned in step S42 and the abnormal response library constructed in step S43, an adaptive defect detection threshold is determined. For example, a confidence interval can be set according to the feature distribution range of the normal mode model, and the features falling outside the confidence interval are regarded as abnormal features, and the sensitivity of defect detection is adaptively adjusted according to the degree of difference between the defect features and the normal features in the abnormal response library. According to the adaptive defect detection threshold determined in step S44, defect detection is performed on the multimodal fusion image. The area in the image where the feature value exceeds the threshold is marked as a defect candidate area, and defect area mask data is generated. In the mask data, the pixel value of the defect area is 1, and the pixel value of the non-defect area is 0. The defect area mask data generated in step S45 is superimposed on the original multimodal fusion image to highlight the defect area. For example, different colors or transparency can be used to distinguish between defect areas and non-defect areas, so as to realize the visualization of defect detection results.

[0189] Preferably, step S45 includes the following steps:

[0190] Step S451: using the adaptive defect detection threshold data to perform defect candidate area detection on the multimodal fusion image to obtain defect candidate area data;

[0191] Step S452: performing false detection and elimination on the defect candidate area data according to the design data to obtain optimized defect candidate area data;

[0192] Step S453: extract multi-scale features from the defect candidate area optimization data to obtain multi-scale feature data; classify defects based on the multi-scale feature data to obtain defect classification result data;

[0193] Step S454: Generate a defect area mask according to the defect classification result data to obtain defect area mask data.

[0194] The present invention uses an adaptive defect detection threshold to detect defect candidate areas, and can adaptively adjust the detection sensitivity according to different areas and defect types, preliminarily screen out potential defect areas, and improve the efficiency of defect detection. False detection and elimination of defect candidate areas based on design data can exclude normal areas within the design tolerance range, reduce the false detection rate, and improve the accuracy of defect detection. Multi-scale feature extraction and defect classification of defect candidate areas can more comprehensively describe defect characteristics and identify different types of defects, providing more detailed information for subsequent defect analysis. Defect area masks are generated based on defect classification results, and different types of defect areas can be marked separately to facilitate manual re-inspection and analysis, thereby improving the efficiency and accuracy of defect detection.

[0195] In the embodiment of the present invention, the adaptive defect detection threshold calculated in step S44 is applied to the multimodal fusion image, and the pixels or regions whose characteristic values ​​exceed the threshold are marked as defect candidate regions, and their position, size, characteristic value and other information are recorded to form defect candidate region data. According to the preset allowable deviation range in the design data, such as the tolerance range of wire width, spacing, pad size, etc., the defect candidate regions detected in step S451 are screened. The candidate regions falling within the allowable deviation range are regarded as false detections, and are removed from the defect candidate region data to obtain more accurate defect candidate region optimization data. Multi-scale feature extraction is performed on the defect candidate region optimization data obtained in step S452, such as using sliding windows of different sizes to extract texture features, shape features, etc. of each region. Then, a machine learning algorithm, such as a support vector machine, deep learning, etc., is used to classify the defect candidate regions according to the extracted multi-scale feature data, identify different types of defects, such as open circuits, short circuits, bubbles, etc., and obtain defect classification result data. According to the defect classification result data obtained in step S453, the final defect region mask data is generated. For example, a color can be preset for each defect type, and different types of defect areas can be marked with different colors according to the defect classification results, thereby generating a mask image containing defect location and type information.

[0196] Preferably, the present invention further provides an image detection system for a flexible circuit board, which is used to perform the image detection method for a flexible circuit board as described above, and the image detection system for a flexible circuit board comprises:

[0197] The material optical modeling module is used to acquire detection light source data through the detection light source system to obtain detection light source data; acquire flexible circuit board design file data; extract material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; perform optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; construct a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extract material optical response data according to the flexible circuit board optical model to obtain material optical response data;

[0198] The design complexity quantification module is used to extract design data according to the flexible circuit board design file data to obtain design data; perform design feature binarization processing according to the design data to obtain binary image data; perform design complexity quantification according to the binary image data to obtain a design complexity index;

[0199] The multimodal image fusion module is used to perform multimodal image preprocessing on the flexible circuit board to be detected according to the detection light source data to obtain multimodal image preprocessing data; perform optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; perform complexity index feature weighting based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; generate a multimodal fusion image according to the feature map weighted data to obtain a multimodal fusion image;

[0200] The adaptive defect detection module is used to learn the normal mode of regional appearance based on the multimodal fusion image and design data to obtain the normal mode model of regional appearance; determine the adaptive defect detection threshold based on the normal mode model of regional appearance to obtain adaptive defect detection threshold data; generate the defect area mask based on the adaptive defect detection threshold data and the multimodal fusion image to obtain the defect area mask data; superimpose the defect area mask data on the multimodal fusion image to visualize the defect detection results, so as to realize the defect detection of flexible circuit boards.

[0201] The present invention can accurately predict the optical response characteristics of different materials and defect types by establishing an optical model of a flexible circuit board and simulating the propagation process of light in the model, providing a theoretical basis for subsequent image correction and defect detection, and improving the accuracy and reliability of defect detection. By quantifying the complexity of the design of the flexible circuit board, a reference can be provided for subsequent defect detection, for example, the sensitivity of defect detection can be adaptively adjusted according to the design complexity index to improve the defect detection rate in complex areas. Through multimodal image fusion, the information of multiple imaging methods can be comprehensively utilized to overcome the limitations of a single imaging method, and the image quality and reliability of defect detection can be improved. At the same time, image correction based on material optical response data can eliminate the influence of material properties on image imaging quality, and further improve the accuracy of defect detection. By learning the normal mode model of regional appearance and combining with the abnormal response library, the defect detection threshold can be adaptively determined to improve the robustness and adaptability of defect detection. At the same time, the defect area mask is superimposed on the original image for visualization, which can more intuitively display the defect detection results, facilitate manual re-inspection and analysis, and improve the efficiency of defect detection. Therefore, the present invention provides an image detection method for a flexible circuit board, which is an optimization process for a traditional image detection method for a flexible circuit board. It solves the problem that the traditional image detection method for a flexible circuit board cannot overcome the image detection influence caused by the material and design of the FPC, improves the uniformity and clarity of the image, improves the accuracy of feature extraction, and effectively reduces the false detection rate and missed detection rate by overcoming the influence of material properties and circuit complexity. Combined with an adaptive threshold determination method, it can adapt to different detection environments and defect types, thereby effectively improving the accuracy, robustness and adaptability of defect detection.

[0202] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0203] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for image detection of a flexible circuit board, characterized in that: The following steps are involved: Step S1: acquiring detection light source data through a detection light source system to obtain detection light source data; Obtain flexible circuit board design file data; Extract material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; perform optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; construct a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extract material optical response data according to the flexible circuit board optical model to obtain material optical response data, wherein step S1 is specifically as follows: Step S11: Analyze the material properties of the flexible circuit board and establish a material property database to obtain a material property database; Step S12: Acquire flexible circuit board design file data; Define the layer structure according to the flexible circuit board design file data to obtain the layer structure data; obtain the detection light source data through the detection light source system to obtain the detection light source data; Step S13: extracting material optical parameters from the material property database according to the detection light source data and the layer structure data to obtain material optical parameters; performing optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; Step S14: constructing an optical model of the flexible circuit board using optical simulation software according to the layer structure data and the interpolated optical parameters to obtain the optical model of the flexible circuit board; defining the light source according to the detected light source data to obtain the light source parameters; Step S15: performing ray tracing simulation according to the optical model of the flexible circuit board and the light source parameters to obtain ray tracing data; Solve the radiation transfer equation according to the optical model of the flexible circuit board and the light source parameters to obtain the radiation transfer data; Step S16: generating surface optical response data according to the ray tracing data and the radiation transmission data to obtain the surface optical response data; Step S17: performing internal defect introduction processing on the optical model of the flexible circuit board to obtain a defect optical model; Performing internal defect optical simulation on the defect optical model to obtain defect optical response data; Step S18: performing optical response data fusion on the surface optical response data and the defect optical response data to obtain material optical response data; Step S2: extracting design data according to the flexible circuit board design file data to obtain design data; Performing binarization processing on design features according to the design data to obtain binarized image data; quantifying design complexity according to the binarized image data to obtain a design complexity index; Step S3: performing multimodal image preprocessing on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image preprocessing data; Based on the material optical response data, optical response image correction is performed on the multimodal image preprocessing data to obtain material optical response correction image data; based on the design complexity index and the multimodal image preprocessing data, complexity index feature weighting is performed to obtain feature map weighted data; based on the feature map weighted data, multimodal fusion image generation is performed to obtain a multimodal fusion image; Step S4: performing regional appearance normal mode learning according to the multimodal fusion image and the design data to obtain a regional appearance normal mode model; performing adaptive defect detection threshold determination according to the regional appearance normal mode model to obtain adaptive defect detection threshold data; Generate defect area mask according to adaptive defect detection threshold data and multimodal fusion image to obtain defect area mask data; The defect area mask data is superimposed on the multimodal fusion image to visualize the defect detection results, thereby realizing flexible circuit board defect detection.

2. The image detection method of the flexible circuit board according to claim 1, characterized in that: Step S13 includes the following steps: Step S131: extracting light source spectrum distribution data according to the detected light source data to obtain light source spectrum distribution data; Step S132: extracting material optical parameters from the material property database according to the light source spectrum distribution data and the layer structure data to obtain the material optical parameters; Step S133: determining the interpolation wavelength range according to the light source spectrum distribution data to obtain interpolation wavelength range data; Step S134: performing cubic spline interpolation calculation on the optical parameters of the material according to the material property database and performing wavelength range restriction processing according to the interpolation wavelength range data to obtain an interpolation optical parameter function; Step S135: Calculate the optical parameter value according to the interpolation optical parameter function and the light source spectrum distribution data to obtain the interpolation optical parameter.

3. The image detection method of the flexible circuit board according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: extracting design data according to the flexible circuit board design file data to obtain design data; extracting wire features from the design data to obtain wire feature data; extracting pad and via features from the design data to obtain pad and via feature data; Step S22: performing inter-layer alignment analysis according to the wire feature data and the pad and via feature data to obtain inter-layer alignment data; Step S23: dividing the design area of ​​the flexible circuit board according to the design data and performing local density calculation to obtain local density data; Step S24: binarizing the design data according to the wire feature data and the pad and via feature data to obtain binary image data; Step S25: performing fractal dimension calculation based on the binary image data to obtain fractal dimension data; performing topological complexity calculation based on the inter-layer alignment data to obtain topological complexity data; Step S26: normalizing the wire feature data, pad and via feature data, local density data, fractal dimension data, and topology complexity data, and fusing the design complexity index to obtain the design complexity index.

4. The image detection method of the flexible circuit board according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: performing multimodal image acquisition on the flexible circuit board to be inspected according to the detection light source data to obtain multimodal image data; performing multimodal image preprocessing on the multimodal image data to obtain multimodal image preprocessing data; Step S32: performing optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; Step S33: extracting image features from the material optical response correction image data to obtain correction image feature data; Step S34: performing complexity index feature weighting on the corrected image feature data based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; performing multimodal image registration according to the feature map weighted data to obtain multimodal registered image data; Step S35: performing multi-scale feature fusion on the feature map weighted data to obtain multi-scale fusion feature data; performing decision layer fusion on the multi-modal registration image data to obtain decision layer fusion data; Step S36: generating a multimodal fusion image according to the multi-scale fusion feature data and the decision layer fusion data to obtain a multimodal fusion image.

5. The image detection method of the flexible circuit board according to claim 4, characterized in that: Step S32 includes the following steps: Step S321: extracting pixel-level optical response data from the material optical response data according to the multimodal image preprocessing data to obtain pixel-level optical response data; Step S322: performing image channel separation on the multimodal image preprocessing data to obtain image channel data; Step S323: performing channel response correction on the image channel data according to the pixel-level optical response data to obtain image channel correction data; Step S324: reorganizing the image channel correction data to obtain reorganized image data; Step S325: performing image detail enhancement on the reconstructed image data to obtain material optical response correction image data.

6. The image detection method of the flexible circuit board according to claim 4, characterized in that: Step S34 includes the following steps: Step S341: mapping the design complexity index to a pixel local index according to the multimodal image preprocessing data to obtain pixel-level complexity map data; Step S342: generating a feature map for the corrected image feature data to obtain feature map data; Step S343: Calculate weighted coefficients according to the pixel-level complexity map data to obtain weighted coefficient map data; Step S344: performing feature map weighting processing on the feature map data according to the weighting coefficient map data to obtain feature map weighted data.

7. The image detection method of a flexible circuit board according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: performing image region segmentation on the multimodal fusion image to obtain image region segmentation data; performing regional feature extraction on the image region segmentation data to obtain regional feature data; Step S42: performing regional appearance normal mode learning according to the regional feature data and the design data to obtain a regional appearance normal mode model; Step S43: performing abnormal response simulation according to the material optical response data and a preset defect model library to obtain an abnormal response library; Step S44: determining an adaptive defect detection threshold according to the regional appearance normal mode model and the abnormal response library to obtain adaptive defect detection threshold data; Step S45: generating a defect area mask according to the adaptive defect detection threshold data and the multimodal fusion image to obtain defect area mask data; Step S46: superimpose the defect area mask data onto the multimodal fusion image to visualize the defect detection results, so as to realize flexible circuit board defect detection.

8. The image detection method of the flexible circuit board according to claim 7, characterized in that: Step S45 includes the following steps: Step S451: using the adaptive defect detection threshold data to perform defect candidate area detection on the multimodal fusion image to obtain defect candidate area data; Step S452: performing false detection and elimination on the defect candidate area data according to the design data to obtain optimized defect candidate area data; Step S453: extract multi-scale features from the defect candidate area optimization data to obtain multi-scale feature data; classify defects based on the multi-scale feature data to obtain defect classification result data; Step S454: Generate a defect area mask according to the defect classification result data to obtain defect area mask data.

9. An image detection system for a flexible circuit board, characterized in that: Used to perform the image detection method of the flexible circuit board as claimed in claim 1, the image detection method system of the flexible circuit board comprises: The material optical modeling module is used to acquire detection light source data through the detection light source system to obtain detection light source data; acquire flexible circuit board design file data; extract material optical parameters according to the detection light source data and the flexible circuit board design file data to obtain material optical parameters; perform optical parameter interpolation processing according to the material optical parameters to obtain interpolated optical parameters; construct a flexible circuit board optical model according to the interpolated optical parameters to obtain a flexible circuit board optical model; extract material optical response data according to the flexible circuit board optical model to obtain material optical response data; The design complexity quantification module is used to extract design data according to the flexible circuit board design file data to obtain design data; perform design feature binarization processing according to the design data to obtain binary image data; perform design complexity quantification according to the binary image data to obtain a design complexity index; The multimodal image fusion module is used to perform multimodal image preprocessing on the flexible circuit board to be detected according to the detection light source data to obtain multimodal image preprocessing data; perform optical response image correction on the multimodal image preprocessing data based on the material optical response data to obtain material optical response correction image data; perform complexity index feature weighting based on the design complexity index and the multimodal image preprocessing data to obtain feature map weighted data; generate a multimodal fusion image according to the feature map weighted data to obtain a multimodal fusion image; The adaptive defect detection module is used to learn the normal mode of regional appearance based on the multimodal fusion image and design data to obtain the normal mode model of regional appearance; determine the adaptive defect detection threshold based on the normal mode model of regional appearance to obtain adaptive defect detection threshold data; generate the defect area mask based on the adaptive defect detection threshold data and the multimodal fusion image to obtain the defect area mask data; superimpose the defect area mask data on the multimodal fusion image to visualize the defect detection results, so as to realize the defect detection of flexible circuit boards.