A printed circuit board component detection method based on template matching infrared feature map

By using a template-based infrared feature map matching method and employing improved Laplace feature parameters and image enhancement algorithms, rapid and accurate detection of printed circuit board components was achieved, solving the problems of time-consuming and labor-intensive detection methods and difficulty in component positioning.

CN116416210BActive Publication Date: 2026-06-05WUHU STATE-OWNED FACTORY OF MACHINING

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHU STATE-OWNED FACTORY OF MACHINING
Filing Date
2023-02-08
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Traditional invasive printed circuit board inspection methods are time-consuming and labor-intensive, and there are difficulties in accurately locating components on infrared cloud images, especially in highly integrated circuits where components are small and densely arranged. Therefore, non-invasive, fast, and accurate fault detection methods are needed.

Method used

A detection method based on template matching infrared feature maps is adopted. Infrared cloud maps of printed circuit boards are obtained through infrared thermal imaging. By using improved Laplace feature parameters and image enhancement algorithms, combined with standard component templates, the component type and location are automatically identified.

Benefits of technology

It enables accurate identification of component type and location on infrared cloud images, improves detection efficiency, reduces dependence on imaging conditions such as light intensity, and reduces detection workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116416210B_ABST
    Figure CN116416210B_ABST
Patent Text Reader

Abstract

The present application relates to printed circuit board testing technical field, specifically to a kind of printed circuit board component detection method based on template matching infrared characteristic map, comprising: the infrared cloud picture of the detected printed circuit board is obtained, the infrared characteristic map of infrared cloud picture is calculated, infrared characteristic map is preprocessed, infrared characteristic map is matched with component standard template, the type and position of component on the detected printed circuit board are determined.This method is aimed at the infrared cloud picture of printed circuit board and is collected, processed, matched and analyzed, and detection result is obtained, and then the type and position of all components on printed circuit board can be determined, and it is suitable for the detection of complex printed circuit board with many components and high integration.The method does not need to use visible light image information, and printed circuit board component detection can be realized, and the influence of imaging angle and size of infrared cloud picture on detection result can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of printed circuit board testing technology, specifically to a method for detecting printed circuit board components based on template matching infrared feature maps. Background Technology

[0002] Printed circuit boards (PCBs) are critical components with complex functions and structures in various electronic products. Component-level fault detection of PCBs is crucial for improving the reliability of electronic products. Traditional invasive PCB testing methods require measuring electrical parameters such as voltage and current at critical locations in the circuit. Technicians then use their experience to determine the location and type of fault on the PCB based on the circuit diagram and the measured electrical parameters. The entire testing process relies on a thorough understanding of the PCB schematic and component locations, and consumes significant time and manpower. With increasing circuit integration, component sizes are becoming smaller and wiring layouts are becoming denser, creating an urgent need for non-invasive, accurate, and rapid fault detection methods.

[0003] Infrared thermal imaging technology obtains an object's temperature information by measuring its infrared radiation. Installing an infrared thermal imaging device near a printed circuit board (PCB) allows for the measurement of an infrared cloud map of the PCB surface, revealing the temperature field distribution. Locating various components within this temperature cloud map is fundamental for fault diagnosis. However, the large number of components on a PCB means that the imaging angle and size of the infrared cloud map are significantly affected by the measurement distance and viewing angle. Therefore, accurately locating components on the infrared cloud map presents a technical challenge. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes a method for detecting components on printed circuit boards based on template matching infrared feature maps. This method aims to accurately identify component types and locate component positions on infrared cloud images.

[0005] The technical problem to be solved by this invention is achieved by the following technical solution:

[0006] A method for detecting components on a printed circuit board based on template matching infrared feature maps includes the following steps:

[0007] Step (S101) Use an infrared thermal imaging device to acquire an infrared cloud image of the printed circuit board under test and correct the infrared cloud image;

[0008] Step (S102): Based on the measured infrared cloud image, calculate the infrared characteristic parameters of each location on the printed circuit board and establish an infrared characteristic map.

[0009] Step (S103) preprocesses the infrared feature map, extracts and enhances the component boundary region, and improves the accuracy and robustness of template matching;

[0010] Step (S104) Obtain the component standard template, and use the component outline in the template to match the infrared feature map;

[0011] Step (S105) determines the type and location of components on the printed circuit board being inspected based on the matching results.

[0012] Preferably, the acquisition and correction of the infrared cloud image in step (S101) includes:

[0013] The measured temperature values ​​at various locations on the printed circuit board under test are obtained to obtain an inclined infrared cloud map in three-dimensional coordinates.

[0014] The central projection transformation is used to correct the tilted image in three-dimensional coordinates into a planar image with the viewpoint perpendicular to the surface of the printed circuit board. The corrected infrared cloud image is then linearly interpolated to ensure that the resolution is consistent throughout the image.

[0015] Preferably, the infrared feature parameter mentioned in step (S102) is an improved Laplace feature parameter ω, calculated using the following formula:

[0016]

[0017] In the formula, θ represents the residual temperature at various locations on the printed circuit board, Δ represents the two-dimensional Laplace operator, and ω represents the improved Laplace feature.

[0018] Preferably, the preprocessed infrared feature map in step (S103) includes:

[0019] Threshold filtering of infrared feature maps can initially screen out regions that can characterize the boundaries of components.

[0020] The infrared feature map is converted to grayscale, and the improved Laplace feature values ​​are mapped to grayscale values ​​in the range of 0-255.

[0021] Image enhancement is performed on the infrared feature map using logarithmic transformation.

[0022] Preferably, the specific calculation formula for threshold filtering is as follows:

[0023]

[0024] In the formula, ω th This is the filtering threshold.

[0025] Preferably, the formula for calculating the mapping is as follows:

[0026]

[0027] In the formula, ω max This represents the maximum value of the characteristic parameter.

[0028] The preferred formula for the logarithmic transformation is as follows:

[0029]

[0030] In the formula, |ω| en The grayscale level of the enhanced image.

[0031] Preferably, the component matching in step (S104) includes:

[0032] Obtain the two-dimensional outline of the standard component from the standard component package library as a template, and then binarize the template;

[0033] The standard correlation coefficient matching algorithm is selected to match the template and feature parameter map. The formula for calculating the correlation coefficient is as follows:

[0034]

[0035] In the formula, T(x′, y′) is the template pixel value, and I(x′, y′) is the infrared feature map pixel value.

[0036] Preferably, the location corresponding to the maximum correlation coefficient in step (S105) is the location of the element to be identified, i.e., the coordinates of the detected element location. satisfy The type of the component to be identified is consistent with the component type of the template used.

[0037] The beneficial effects of this invention are:

[0038] This invention proposes an improved Laplace feature parameter that accurately reflects the edge information of components on a printed circuit board (PCB) based on the infrared cloud image obtained. An infrared feature map is obtained, and an image enhancement algorithm is designed. During inspection, a template matching method is used, employing the standard component package outline as a template. By matching this template with the infrared feature map, the positional information of various components is automatically and accurately extracted from the PCB infrared cloud image. This eliminates the need for prior knowledge of the PCB schematic diagram, using only the infrared cloud image as the single information source for inspection and automatically correcting the imaging angle. The inspection results are unaffected by imaging conditions such as light intensity, thus improving the quality and efficiency of PCB inspection. Attached Figure Description

[0039] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0040] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0041] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0042] like Figure 1 As shown, a method for detecting components on a printed circuit board based on template matching infrared feature maps includes the following steps:

[0043] Step (S101) Obtain the infrared cloud image of the printed circuit board being inspected.

[0044] Infrared thermal imaging equipment is used to collect the surface temperature distribution of the printed circuit board being inspected, and an infrared cloud map is obtained. Usually, the outer boundary of the printed circuit board is rectangular. Due to the influence of imaging distance and angle, the temperature cloud map obtained by the infrared thermal imager is a quadrilateral of arbitrary shape.

[0045] Central projection transformation can correct tilted images in three-dimensional coordinates. The transformation method is as follows: Let (u, v) be the imaging coordinates of the infrared thermal imager, and (x', y') be the coordinates after the central projection transformation. The corrected infrared cloud image size is H×W, satisfying:

[0046]

[0047]

[0048]

[0049] In the formula, (x, y, z) are the transformed three-dimensional coordinates. For the affine transformation parameters, (a 31 a 32 ) represents the projection transformation parameters, (a 13 a 23 ) T Let a be the translation transformation parameter. 33 Let a be the scaling factor, and under normalization conditions, let a be the scaling factor. 33 =1.

[0050] The coordinates of the four imaging vertices (u) of the infrared thermal imager i v i Substituting the coordinates of the four vertices (0, 0), (0, W), (H, 0), and (H, W) of the given values ​​i = 1, 2, 3, 4, and the boundary coordinates, we can uniquely solve for the eight unknown parameters. Linear interpolation of the corrected infrared cloud image ensures consistent resolution throughout the image.

[0051] Step (S102) Calculate the infrared feature map of the infrared cloud image.

[0052] According to the heat conduction model of the circuit board, the residual temperature in the conductor region Ω1 satisfies θ = const, while in the printed circuit board region Ω2, the residual temperature satisfies Δθ = λ.2 θ, where λ 2 It is a constant.

[0053] Define improved Laplace feature parameters

[0054] According to the heat conduction model of the printed circuit board, ω = 0 in the conductor region Ω1, and ω = λ in the printed circuit board region Ω2. 2 =const, and at the boundary between the conductor and the printed circuit board, i.e., the component boundary, ω≠0 or λ. 2 Therefore, it is reasonable to select the improved Laplace feature parameters as the feature parameters for extracting element boundaries.

[0055] By calculating the infrared characteristic parameter values ​​for all measurement points in the infrared cloud image, an infrared characteristic map can be obtained.

[0056] Step (S103) Preprocess the infrared feature map.

[0057] Before component matching, the infrared feature map is preprocessed. The preprocessing process includes three steps: threshold filtering, grayscale conversion, and image enhancement.

[0058] First, the infrared feature map threshold filtering is calculated using the following formula:

[0059]

[0060] In the formula, ω th This is the filtering threshold.

[0061] Secondly, the filtered image is converted into a grayscale image. The formula for calculating the grayscale value is:

[0062]

[0063] In the formula, ω max This represents the maximum value of the characteristic parameter.

[0064] In grayscale conversion, the grayscale image is inverted to highlight the extracted boundaries. At this point, the grayscale level of most pixels in the image is close to 255, and the boundaries are not clear enough. Therefore, image enhancement is needed. The enhancement calculation formula is as follows:

[0065]

[0066] In the formula, |ω| en The grayscale level of the enhanced image.

[0067] After image enhancement, the boundaries that need to be extracted have a more significant contrast with the background.

[0068] Step (S104) Match the infrared feature map with the component standard template.

[0069] Two-dimensional outlines of standard components are obtained from the standard component package library and used as templates for detecting components in printed circuit boards. The templates are then binarized.

[0070] The standard correlation coefficient matching algorithm is selected to match the template and feature parameter map. The formula for calculating the correlation coefficient is:

[0071]

[0072] In the formula, T(x′, y′) is the template pixel value, and I(x′, y′) is the infrared feature map pixel value.

[0073] Step (S105) determines the type and location of components on the printed circuit board being inspected based on the matching results.

[0074] The location corresponding to the maximum similarity score is the location of the element to be identified, i.e., the coordinates of the detected element. satisfy The type of the component to be identified is consistent with the component type of the template used.

[0075] The printed circuit board inspection method provided by this invention can accurately and quickly obtain the type and location information of all components from the infrared cloud image of the printed circuit board. Compared with the existing image fusion-based inspection method, it does not require the acquisition of optical images, reducing the workload of inspection, and overcomes the drawback that the imaging quality of optical images depends on the imaging conditions.

[0076] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely prisms of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A method for detecting components on a printed circuit board based on template matching infrared feature maps, characterized in that: Includes the following steps: Step S101: Use an infrared thermal imaging device to acquire an infrared cloud image of the printed circuit board under test and correct the infrared cloud image. The acquisition and correction of the infrared cloud image in step S101 includes: The measured temperature values ​​at various locations on the printed circuit board under test are obtained to obtain an inclined infrared cloud map in three-dimensional coordinates. The central projection transformation is used to correct the tilted image in three-dimensional coordinates into a planar image with the viewpoint perpendicular to the surface of the printed circuit board. The corrected infrared cloud image is then linearly interpolated to ensure that the resolution is consistent throughout the image. Step S102: Based on the measured infrared cloud image, calculate the infrared feature parameters of each location on the printed circuit board and establish an infrared feature map. The infrared feature parameter mentioned in step S102 is the improved Laplace feature parameter ω, and the calculation formula is as follows: ; In the formula, θ is the residual temperature at various locations on the printed circuit board, Δ is the two-dimensional Laplace operator, and ω is the improved Laplace feature. Step S103 preprocesses the infrared feature map, extracts and enhances the component boundary region, and improves the accuracy and robustness of template matching; The preprocessed infrared feature map in step S103 includes: Threshold filtering is applied to the infrared feature map to initially screen out regions that can characterize the component boundaries. The infrared feature map is converted to grayscale, and the improved Laplace feature values ​​are mapped to grayscale values ​​in the range of 0-255. Image enhancement is performed on the infrared feature map using logarithmic transformation; Step S104: Obtain a standard template for the component and use the component outline in the template to match the component with the infrared feature map; Step S105 determines the type and location of components on the printed circuit board being inspected based on the matching results.

2. The printed circuit board component detection method based on template matching infrared feature map according to claim 1, characterized in that: The specific calculation formula for threshold filtering is as follows: ; In the formula, ω th This is the filtering threshold.

3. The printed circuit board component detection method based on template matching infrared feature map according to claim 2, characterized in that: The formula for calculating the mapping is as follows: ; In the formula, ω max This represents the maximum value of the characteristic parameter.

4. The printed circuit board component detection method based on template matching infrared feature map according to claim 3, characterized in that: The formula for the logarithmic transformation is as follows: ; In the formula, The grayscale level of the enhanced image.

5. The printed circuit board component detection method based on template matching infrared feature map according to claim 1, characterized in that: The component matching in step S104 includes: Obtain the two-dimensional outline of the standard component from the standard component package library as a template, and then binarize the template; The standard correlation coefficient matching algorithm is selected to match the template and feature parameter map. The formula for calculating the correlation coefficient is as follows: ; In the formula, Template pixel values, These are the pixel values ​​of the infrared feature map.

6. The printed circuit board component detection method based on template matching infrared feature map according to claim 5, characterized in that: The location corresponding to the maximum correlation coefficient in step S105 is the location of the element to be identified, i.e., the coordinates of the detected element location. satisfy The type of the component to be identified is consistent with the component type of the template used.