A method for detecting appearance defects of flexible printed circuit boards

By combining high-density photography and the SwinIR super-resolution algorithm with LBP feature extraction and multimodal image processing, the problem of imaging blur caused by bending of flexible printed circuit boards is solved, achieving efficient and accurate defect detection.

CN116883371BActive Publication Date: 2025-10-03SUZHOU WEIDAZHI ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310885202.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2025-10-03
Estimated Expiration
2043-07-19

AI Technical Summary

Technical Problem

In the existing technology of flexible printed circuit board (FPC) defect detection, the imaging blur caused by its bendable nature affects the detection accuracy, especially the problem of the difference in image position before and after focusing, which is difficult to be effectively solved by existing methods.

Method used

High-density camera imaging and SwinIR super-resolution algorithm are used for preprocessing, combined with LBP feature extraction and affine transformation, and multimodal image similarity calculation and differential comparison, using weight coefficients and weighted average to identify defects.

Benefits of technology

It improves image clarity and resolution, enhances the pertinence and accuracy of defect detection, reduces false detection and missed detection, and realizes automated and intelligent detection of FPC.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116883371B_ABST
    Figure CN116883371B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting appearance defects of a flexible printed circuit board, comprising obtaining a standard imaging image of a qualified flexible printed circuit board, and preprocessing the image to obtain an optimized image; performing LBP feature extraction on the optimized image to obtain LBP feature maps of different modes, and obtaining a database corresponding to the different modes; obtaining an image of a circuit board to be inspected, performing affine transformation on the image, expanding the number of modal maps to correspond one-to-one with the modalities in a qualified product data set, extracting a feature map of the circuit board to be inspected, performing similarity calculation on the feature map of the circuit board to be inspected and the LBP feature maps of different modes, obtaining attention weights of images of different modes, and finally performing weighted differential comparison on all images to obtain a differential result; judging whether the differential result is greater than a preset threshold; if greater than, judging that the corresponding circuit board to be inspected has a defect; if less than or equal to, judging that the circuit board to be inspected is a qualified product. The present application improves detection efficiency and reduces production cost and time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect detection, and more particularly to a method for detecting appearance defects of a flexible printed circuit board. Background Art

[0002] With the advancement of modern electronic technology, flexible printed circuits (FPCs) are widely used in various electronic devices due to their lightweight, thin, and bendable properties. However, during the FPC production process, the inherent bendability of the FPC can cause the workpiece to naturally bend and deform. This can cause image blur when used for defect detection due to the difference in the position of the front and back images, seriously affecting the accuracy of defect detection.

[0003] FPC defect detection technology is primarily based on traditional image processing methods or deep learning approaches, such as threshold segmentation, edge detection, and U-Net deep network segmentation. Traditional methods primarily preprocess the image, perform binarization or edge detection, and then determine the presence of defects by identifying specific patterns in the binarized or edge images. Existing technologies are unable to effectively address the positional discrepancy between the front- and back-of-focus images caused by bending and deformation, resulting in blurred images and impacting defect detection accuracy. Summary of the Invention

[0004] In order to solve at least one of the above technical problems, the present invention provides a method for detecting appearance defects of a flexible printed circuit board.

[0005] A first aspect of the present invention provides a method for detecting appearance defects of a flexible printed circuit board, comprising:

[0006] Obtaining a standard imaging image of a good flexible printed circuit board and preprocessing the image to obtain an optimized image;

[0007] Perform LBP feature extraction on the optimized image to obtain LBP feature maps of different modalities, obtain databases corresponding to different modalities, and create a good product library. Create a good product library for each modality and mark them with serial numbers according to the shooting angle. The good product library stores N LBP feature maps under the corresponding modality;

[0008] Obtain an image of the circuit board to be inspected, perform an affine transformation on the image, expand the number of modal graphs to correspond one-to-one with the modal graphs in the good product dataset, and extract the feature graph of the circuit board to be inspected. Randomly select n good product modal feature graphs for each modality, where n ≤ N.

[0009] Calculate the similarity between the different modes of the feature map of the circuit board to be inspected and its corresponding n LBP feature maps under the same mode, obtain the m×n modal image similarity weight coefficients, perform weighted differential comparison on all images, and obtain the differential results;

[0010] Determining whether the difference result is greater than a preset threshold;

[0011] If it is greater than, it is determined that the corresponding circuit board to be inspected has defects;

[0012] If it is less than or equal to, the circuit board to be inspected is determined to be a good product. In a preferred embodiment of the present invention, a standard imaging image of a good flexible printed circuit board is obtained, specifically:

[0013] A camera is used to capture images of good flexible printed circuit boards at different resolutions, lens angles, lighting angles, and lighting colors. The feature map of each image, processed by the LBP algorithm, represents an image of a domain, resulting in a multimodal dataset.

[0014] The resolution includes global and local magnification, the lens angle includes directly above and sideways, and the lighting color includes red, green, blue and white light.

[0015] In a preferred embodiment of the present invention, the method of obtaining a standard imaging image of a good flexible printed circuit board and preprocessing the image to obtain an optimized image is as follows:

[0016] Standard imaging images are obtained by taking pictures in three directions of the flexible printed circuit board using three high-resolution industrial cameras; the three directions are a camera directly above, a camera at a right angle, and a camera at a low angle on the left. The camera directly above is equipped with a white light source, the camera at a right angle is horizontally offset by 30-45 degrees, the camera at a right angle is equipped with a red light source, and the camera at a low angle on the left is equipped with a ring light source.

[0017] In a preferred embodiment of the present invention, a standard imaging image of a good flexible printed circuit board is obtained, and the image is preprocessed to obtain an optimized image, including:

[0018] Three industrial cameras are used to take pictures from different angles and lighting conditions to obtain multimodal images;

[0019] The multi-model images are input into the SwinIR super-resolution algorithm in the order of shooting for denoising and super-resolution preprocessing to obtain optimized images.

[0020] In a preferred embodiment of the present invention, after obtaining the image of the circuit board to be inspected, the method further includes:

[0021] Obtain images of the circuit board to be inspected taken at a fixed angle, and obtain a full-angle atlas through spatial affine transformation;

[0022] The full-angle atlas is denoised and super-resolution preprocessed using the SwinIR super-resolution algorithm, and image reconstruction is performed to obtain a high-definition image of the circuit board to be inspected.

[0023] In a preferred embodiment of the present invention, the difference calculation obtains m×n thresholded difference images;

[0024] Based on the shooting angle, n modal images at the corresponding shooting angle are randomly selected from the good product library and differentially compared with the feature image of the product to be tested;

[0025] The number of images selected in each mode cannot exceed N.

[0026] In a preferred embodiment of the present invention, if , ...

[0027] Obtain a feature map of the circuit board to be inspected, perform differential comparison between the feature map of the circuit board to be inspected and the LBP feature maps of different modes to obtain a differential map, and generate a defect feature map;

[0028] The difference map is weighted averaged to obtain the defect segmentation map.

[0029] The above technical solution of the present invention has the following advantages over the prior art:

[0030] High-density imaging and SwinIR super-resolution algorithm preprocessing effectively improve the clarity and resolution of the image, making defect detection more accurate. The LBP feature extraction algorithm effectively extracts the texture features of the image, making defect detection more targeted. Setting thresholds for differential comparison can accurately identify defective areas. Combined with weight coefficients and weighted averages, defect detection results are more accurate, effectively reducing false detections and missed detections.

[0031] This application realizes the automated and intelligent detection of FPC flexible cables, which not only improves the detection efficiency, but also improves the detection accuracy, greatly reducing the production cost and time caused by defective products. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific embodiments or the description of the prior art. Obviously, some of the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0033] Figure 1 This is a flow chart of a method for detecting appearance defects of a flexible printed circuit board according to an embodiment of the present invention;

[0034] Figure 2 This is a flow chart of establishing a good product library according to an embodiment of the present invention;

[0035] Figure 3 It is a flow chart of a method for obtaining a defect segmentation map according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0038] Example 1

[0039] See also Figure 1-3 As shown, the present invention proposes a method for detecting appearance defects of a flexible printed circuit board, comprising:

[0040] S1, obtaining a standard imaging image of a good flexible printed circuit board and preprocessing the image to obtain an optimized image;

[0041] S2, perform LBP feature extraction on the optimized image to obtain LBP feature maps of different modalities and obtain databases corresponding to different modalities;

[0042] S3, obtaining an image of the circuit board to be inspected, performing an affine transformation on the image, expanding the number of modal graphs to correspond one-to-one with the modal graphs in the good product dataset, and extracting a feature graph of the circuit board to be inspected;

[0043] S4: Calculate the similarity between the feature map of the circuit board to be inspected and the LBP feature maps of different modalities, obtain the attention weights of the images of different modalities, perform weighted differential comparison on all images, and obtain the differential results;

[0044] S5, determining whether the differential result is greater than a preset threshold; if greater than, determining that the corresponding circuit board to be inspected has a defect; if less than or equal to, determining that the circuit board to be inspected is a good product.

[0045] According to an embodiment of the present invention, a standard imaging image of a good flexible printed circuit board is obtained, specifically:

[0046] A camera is used to capture images of good flexible printed circuit boards at different resolutions, lens angles, lighting angles, and lighting colors. The feature map of each image, processed by the LBP algorithm, represents an image of a domain, resulting in a multimodal dataset.

[0047] The resolution includes global and local magnification, the lens angle includes directly above and sideways, and the lighting color includes red, green, blue and white light.

[0048] According to an embodiment of the present invention, a standard imaging image of a good flexible printed circuit board is obtained, and the image is preprocessed to obtain an optimized image, specifically:

[0049] Standard imaging images are obtained by taking pictures in three directions of the flexible printed circuit board using three high-resolution industrial cameras; the three directions are the camera directly above, the camera at a right angle, and the camera at a low angle on the left. The camera directly above is equipped with a white light source, the camera at a right angle is offset 30-45 degrees horizontally, the camera at a right angle is equipped with a red light source, and the camera at a low angle on the left is equipped with a ring light source.

[0050] According to an embodiment of the present invention, obtaining a standard imaging image of a good flexible printed circuit board and preprocessing the image to obtain an optimized image include:

[0051] Three industrial cameras are used to take pictures from different angles and lighting conditions to obtain multimodal images;

[0052] The multi-model images are input into the SwinIR super-resolution algorithm in the order of shooting for denoising and super-resolution preprocessing to obtain optimized images with increased image clarity and resolution.

[0053] According to an embodiment of the present invention, LBP feature extraction is performed on the optimized image to obtain LBP feature maps of different modalities, obtain databases corresponding to different modalities, and create a good product library. A good product library is created for each modality and serial numbers are marked according to the shooting angle. The good product library stores N LBP feature maps under the corresponding modality.

[0054] According to an embodiment of the present invention, after acquiring the image of the circuit board to be inspected, the method further includes:

[0055] Obtain images of the circuit board to be inspected taken at a fixed angle, and obtain a full-angle atlas through spatial affine transformation;

[0056] The full-angle atlas is denoised and super-resolution preprocessed using the SwinIR super-resolution algorithm, and image reconstruction is performed to obtain a high-definition image of the circuit board to be inspected.

[0057] It's important to note that SwinIR consists of three parts: shallow feature extraction, deep feature extraction, and high-quality image reconstruction. When an FPC product to be inspected enters the system, due to limited production line conditions, only a few fixed camera angles are used, while other conditions remain unchanged. Therefore, a spatial affine transformation is performed on the image until all camera angles appearing in the good product library are captured.

[0058] According to an embodiment of the present invention, an image of a circuit board to be inspected is obtained, and a feature map of the circuit board to be inspected is extracted. For each modality, n (n≤N) good quality modal feature maps are randomly selected. Similarity calculation is performed between different modalities of the feature map of the circuit board to be inspected and its corresponding n LBP feature maps under the same modality to obtain m×n modal image similarity weight coefficients. Simultaneously, a difference calculation is performed to obtain m×n thresholded difference images.

[0059] Based on the shooting angle, n modal images at the corresponding shooting angle are randomly selected from the good product library and differentially compared with the feature image of the product to be tested;

[0060] The number of images selected in each mode cannot exceed N.

[0061] According to an embodiment of the present invention, if the value is greater than , then after determining that the corresponding circuit board to be inspected has a defect, the method further includes:

[0062] Obtain the feature map of the circuit board to be inspected, perform differential comparison and thresholding on the feature map of the circuit board to be inspected and the LBP feature maps of different modes to obtain the differential result and generate N×n differential maps;

[0063] Perform similarity judgment between the feature map to be tested and the modal feature map;

[0064] Generate corresponding weight coefficients according to similarity;

[0065] The difference map is weighted averaged according to the weight coefficient to obtain N defect segmentation maps.

[0066] It should be noted that the higher the similarity, the larger the weight coefficient is set. The defect segmentation map can be obtained by calculating the weighted map. The weight coefficient and weighted average can make the defect detection results more accurate, effectively reducing false detections and missed detections.

[0067] In summary, high-density photography and SwinIR super-resolution algorithm preprocessing effectively improve the clarity and resolution of the image, making defect detection more accurate. The LBP feature extraction algorithm effectively extracts the texture features of the image, making defect detection more targeted. Setting the threshold for differential comparison can accurately identify defective areas. Combined with the weight coefficient and weighted average, the defect detection results are more accurate, effectively reducing false detections and missed detections.

[0068] This application realizes the automated and intelligent detection of FPC flexible cables, which not only improves the detection efficiency, but also improves the detection accuracy, greatly reducing the production cost and time caused by defective products.

[0069] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0070] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to the above embodiments will be readily 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 is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

[0071] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for detecting appearance defects of a flexible printed circuit board, characterized in that: include: Obtaining a standard imaging image of a good flexible printed circuit board and preprocessing the image to obtain an optimized image; Perform LBP feature extraction on the optimized image to obtain LBP feature maps of different modalities, obtain databases corresponding to different modalities, and create a good product library. Create a good product library for each modality and mark them with serial numbers according to the shooting angle. The good product library stores N LBP feature maps under the corresponding modality; Obtain an image of the circuit board to be inspected, perform an affine transformation on the image, expand the number of modal graphs to correspond one-to-one with the modal graphs in the good product dataset, and extract the feature graph of the circuit board to be inspected. Randomly select n good product modal feature graphs for each modality, where n ≤ N. Calculate the similarity between the different modes of the feature map of the circuit board to be inspected and its corresponding n LBP feature maps under the same mode, obtain the m×n modal image similarity weight coefficients, perform weighted differential comparison on all images, and obtain the differential results; Determining whether the difference result is greater than a preset threshold; If it is greater than, it is determined that the corresponding circuit board to be inspected has defects; If it is less than or equal to, the circuit board to be inspected is determined to be a good product.

2. The method for detecting appearance defects of a flexible printed circuit board according to claim 1, wherein: Obtain standard imaging images of good flexible printed circuit boards, specifically: A camera is used to capture images of good flexible printed circuit boards at different resolutions, lens angles, lighting angles, and lighting colors. The feature map of each image, processed by the LBP algorithm, represents an image of a domain, resulting in a multimodal dataset. The resolution includes global and local magnification, the lens angle includes directly above and sideways, and the lighting color includes red, green, blue and white light.

3. The method for detecting appearance defects of a flexible printed circuit board according to claim 1, characterized in that The method of obtaining a standard imaging image of a good flexible printed circuit board and preprocessing the image to obtain an optimized image is as follows: Standard imaging images are obtained by taking pictures in three directions of the flexible printed circuit board using three high-resolution industrial cameras; the three directions are a camera directly above, a camera at a right angle, and a camera at a low angle on the left. The camera directly above is equipped with a white light source, the camera at a right angle is horizontally offset by 30-45 degrees, the camera at a right angle is equipped with a red light source, and the camera at a low angle on the left is equipped with a ring light source.

4. The method for detecting appearance defects of a flexible printed circuit board according to claim 3, wherein: Obtain standard imaging images of qualified flexible printed circuit boards and preprocess the images to obtain optimized images, including: Three industrial cameras are used to take pictures from different angles and lighting conditions to obtain multimodal images; The multi-model images are input into the SwinIR super-resolution algorithm in the order of shooting for denoising and super-resolution preprocessing to obtain optimized images.

5. The method for detecting appearance defects of a flexible printed circuit board according to claim 1, wherein: After acquiring the image of the circuit board to be inspected, the following steps are also included: Obtain images of the circuit board to be inspected taken at a fixed angle, and obtain a full-angle atlas through spatial affine transformation; The full-angle atlas is denoised and super-resolution preprocessed using the SwinIR super-resolution algorithm, and image reconstruction is performed to obtain a high-definition image of the circuit board to be inspected.

6. The method for detecting appearance defects of a flexible printed circuit board according to claim 5, wherein: Obtain m×n thresholded difference images through differential calculation; Based on the shooting angle, n modal images at the corresponding shooting angle are randomly selected from the good product library and differentially compared with the feature image of the product to be tested; The number of images selected in each mode cannot exceed N.

7. The method for detecting appearance defects of a flexible printed circuit board according to claim 6, wherein: If it is greater than, it is determined that the corresponding circuit board to be inspected has defects, and the following steps are also included: Obtain a feature map of the circuit board to be inspected, perform differential comparison between the feature map of the circuit board to be inspected and the LBP feature maps of different modes to obtain a differential map, and generate a defect feature map; The difference map is weighted averaged to obtain the defect segmentation map.

Citation Information

Patent Citations

  • A digital PCR (Polymerase Chain Reaction) liquid drop detection method based on an LBP-Adaboost algorithm

    CN109903296A

  • FPC defect detection method based on improved MASK RCNN

    CN113256623A