A ceramic substrate pcb blue film contour registration method and system
By employing a contour registration method for blue film on ceramic substrate PCBs and utilizing affine transformation matrix and sliding window correction techniques, the problem of distinguishing between overall offset and local defects in edge detection of blue film on ceramic substrate PCBs was solved, achieving high-precision and high-stability defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG XIEHE UNIV
- Filing Date
- 2026-05-29
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, edge detection of blue film on ceramic substrate PCBs is difficult to distinguish between overall process offset and local defects, resulting in insufficient detection accuracy.
The blue film contour registration method for ceramic substrate PCB is adopted. By acquiring the reference design image and the image to be inspected, the affine transformation matrix is calculated to generate the first, second and third contours, the detection area is determined, and the directional distance is corrected by using a sliding window to determine defects.
It improves the accuracy and stability of blue film edge defect detection, effectively identifies large protrusions and large damage defects, and also takes into account the detection of small defects, while reducing background interference and computational load.
Smart Images

Figure CN122492671A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision inspection technology for printed circuit boards, and in particular to a method and system for blue film contour registration on ceramic substrate PCBs. Background Technology
[0002] Ceramic substrate printed circuit boards (PCBs) are widely used in power device packaging, automotive electronics, and high-reliability power electronic devices. To ensure proper etching of circuit patterns, a blue protective film, known as the blue film, is typically applied to designated areas of the PCB. During etching, the copper areas covered by the blue film are retained to form the circuitry, while the uncovered areas are etched away. The integrity, straightness, and consistency with the design outline of the blue film edges directly affect the yield of subsequent etching. Defects such as protrusions, breaks, or lifting at the edges of the blue film can easily lead to poor circuit corrosion, uneven plating, or poor soldering.
[0003] In existing technologies, the detection of blue film edges mostly relies on manual visual inspection or image detection methods based on simple thresholds. Manual inspection is inefficient, depends on operator experience, and is difficult to adapt to mass production. Image detection methods based on fixed thresholds usually use the design boundary as a reference and directly calculate the distance from the actual contour point to the design contour. When there is an overall positional offset or local process offset during the application of blue film to the ceramic substrate printed circuit board, the distance value includes both the overall error caused by the offset and the local anomaly caused by the actual defect. The two are superimposed, which can easily cause minor defects to be misjudged as normal offsets, or normal offsets to be misjudged as defects, resulting in insufficient accuracy in detecting defects at the edges of the blue film on ceramic substrate printed circuit boards. Summary of the Invention
[0004] The purpose of this invention is to solve the problem of difficulty in distinguishing between overall process offset and local defects in the edge detection of blue film on ceramic substrate PCB in the prior art, and to propose a contour registration method and system for blue film on ceramic substrate PCB.
[0005] To address the problems existing in the prior art, the present invention adopts the following technical solution: A method for contour registration of blue film on a ceramic substrate PCB includes: S1. Obtain the reference design image and the image to be inspected of the ceramic substrate PCB. Extract the reference marker point set and the blue film standard outline from the reference design image. Extract the actual marker point set from the image to be inspected. S2. Calculate the affine transformation matrix based on the reference set of marker points and the actual set of marker points; S3. Map the blue film standard contour of the reference design image according to the affine transformation matrix to obtain the first contour. Generate the second and third contours based on the first contour and determine the detection area. S4. Extract the actual blue film edge contour of the image to be detected within the detection area, and generate defect markers based on the intersection points of the blue film edge contour with the second and third contours. S5. When the blue film edge contour has no intersection with the second contour and the third contour, calculate the directional distance from each contour point of the blue film edge contour to the first contour, correct the directional distance through a sliding window, and determine the defect based on the corrected directional distance.
[0006] Preferably, a reference design image and an image to be inspected are acquired; a set of reference marker points and a standard blue film contour are extracted from the reference design image; and a set of actual marker points is extracted from the image to be inspected, including: An image of the ceramic substrate PCB to be inspected is acquired by an imaging device to obtain the image to be inspected; Obtain a reference design image of the model corresponding to the image to be tested from the process database, and adjust the size of the reference design image; In the reference design image, reference markers are extracted according to the preset marker point positions to form a reference marker point set; In the reference design image, the boundary of the blue film region is extracted to obtain the standard blue film contour of the reference design image; In the image to be detected, extract the set of actual marker points that correspond to the set of reference marker points.
[0007] Preferably, the affine transformation matrix is calculated based on the reference set of marker points and the actual set of marker points, including: Based on the pairing relationship between the reference marker set and the actual marker set, a marker pairing set is formed; A two-dimensional affine transformation relationship from the reference design image to the image to be detected is established based on the pairing set of marker points, and the two-dimensional affine transformation relationship is solved to obtain the affine transformation matrix.
[0008] Preferably, the blue film standard contour of the reference design image is mapped according to the affine transformation matrix to obtain a first contour, and a second contour and a third contour are generated based on the first contour to determine the detection region, including: The blue film standard contour of the reference design image is mapped to the image to be detected based on the affine transformation matrix to obtain the mapped contour points, and the mapped contour points are connected to form the first contour. The first contour is scaled to obtain the second and third contours; The area between the second and third contours is used as the detection area.
[0009] Preferably, extracting the actual blue film edge contour of the image to be detected within the detection area includes: Edge extraction is performed on the image to be detected within the detection area to obtain a set of edge pixels; Contour tracing is performed on the edge pixel set to obtain the actual blue film edge contour.
[0010] Preferably, a defect marker is generated based on the intersection of the blue film edge contour with the second and third contours, including: Determine whether the actual blue film edge contour and the second contour overlap or intersect. If they do, generate a large raised mark. Determine whether the actual blue film edge contour and the third contour overlap or intersect. If so, generate a large damage marker.
[0011] Preferably, when the blue film edge contour has no intersection with either the second or third contour, the directional distance from each contour point of the blue film edge contour to the first contour is calculated, the directional distance is corrected using a sliding window, and a defect determination is made based on the corrected directional distance, including: When both the second and third contour intersection point sets are empty, calculate the shortest distance from each contour point in the actual blue film edge contour to the first contour. If the contour point is located within the first contour area, assign a positive sign to the shortest distance; otherwise, assign a negative sign to the shortest distance to obtain the directional distance. Set the width of the sliding window and construct the sliding window along the point sequence of the actual blue film edge contour; Calculate the median and average of the directional distances within the sliding window; The local offset distance is obtained by weighting and summing the median and average directional distances within the sliding window based on the preset first and second weights. The corrected directional distance is obtained by calculating the difference between the directional distance and the local offset distance. When the corrected directional distance is greater than the preset defect threshold, a tiny raised mark is generated; When the corrected directional distance is less than the negative of the preset defect threshold, a minor damage marker is generated.
[0012] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention generates a second and a third contour based on a first contour, and defines the area between the two as the detection area. On the one hand, it limits the spatial range of blue film edge detection, reduces background interference and computational load. On the other hand, by using the intersection of the second and third contours with the actual blue film edge contour, it can directly identify large protrusion defects and large breakage defects at the edge of the blue film, thereby improving the detection efficiency and reliability of obvious defects.
[0013] 2. In the case where the actual blue film edge contour has no intersection with the second and third contours, this invention introduces a directional distance and sliding window correction mechanism. By statistically calculating the directional distance within the sliding window, the local offset distance is obtained, and a corrected directional distance is constructed accordingly. This effectively eliminates the background influence caused by overall process offset and slow geometric offset, making small protrusion defects and small breakage defects prominently expressed in the corrected directional distance. Thus, it takes into account the detection capability of both large and small defects, and significantly improves the accuracy and stability of blue film edge defect detection on ceramic substrate printed circuit boards. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a schematic flowchart of a method for registering blue film outlines on a ceramic substrate PCB according to the present invention. Figure 2 This is a functional block diagram of a blue film contour registration system for ceramic substrate PCB according to the present invention; Figure 3 This is a schematic diagram of the three-contour construction, detection area definition, and defects of the present invention; Figure 4 This is a schematic diagram of the sliding window correction and defect determination of directional distance according to the present invention. Detailed Implementation
[0015] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0016] Example: This example provides a method for blue film contour registration on a ceramic substrate PCB. See [link to example]. Figure 1 Specifically, including: S1. Obtain the reference design image and the image to be inspected of the ceramic substrate PCB. Extract the reference marker point set and the blue film standard outline from the reference design image. Extract the actual marker point set from the image to be inspected. Production line and imaging device layout; Specifically, an inspection station is set up after the blue film lamination process in the ceramic substrate printed circuit board production line. An industrial camera is fixedly installed above the inspection station. The industrial camera has an effective pixel count of no less than 2 million pixels and an imaging resolution of, for example, 1920 x 1080. A 50mm fixed-focus lens is installed at the front of the industrial camera, and the lens aperture is set to a medium aperture value to improve the depth of field. A ring or strip-shaped white LED light source is set above the inspection station. The brightness and angle of the light source are adjusted to ensure that the illumination on the surface of the ceramic substrate printed circuit board is basically uniform, avoiding obvious shadows and highlights.
[0017] Image acquisition; Specifically, when the ceramic substrate printed circuit board is transported to the inspection station, the control unit triggers the industrial camera to take a picture, obtaining an image of the area to be inspected that covers the entire blue film area. The image to be inspected is stored in grayscale format, with each pixel having a grayscale value, for example, ranging from 0 to 255.
[0018] Reference design images were obtained and their dimensions were standardized; Specifically, reference design files corresponding to the model of the ceramic substrate printed circuit board are pre-stored in the process database. These reference design files can be graphic files generated by printed circuit board design software. In this embodiment, the reference design file is converted into a two-dimensional image as a reference design image. Based on the actual size of the ceramic substrate printed circuit board and the resolution of the image to be inspected, the reference design image is scaled and cropped proportionally to ensure that the pixel size of the blue film area in the reference design image is consistent with the actual size in the image to be inspected.
[0019] Reference marker set extraction; Specifically, in the reference design image, according to a predefined marker layout, several reference markers are set at the four corners or specific process alignment positions of the ceramic substrate printed circuit board. In this embodiment, the four corners are used as marker positions. The reference markers have explicit coordinates in the design file. By reading the design file or performing template matching in the reference design image, the pixel coordinates of the four reference markers in the reference design image can be obtained, forming a set of reference markers.
[0020] Blue membrane standard contour extraction; Specifically, the blue film coverage area in the reference design image is typically represented by solid fills or outlines. By performing boundary tracing on the graphic representing the blue film area, the boundary pixels of the blue film area are extracted and sorted according to spatial connectivity to form a closed sequence of outline points. This sequence of outline points is defined as the standard blue film outline. Each outline point in the standard blue film outline carries its pixel coordinates in the reference design image. The overall standard blue film outline reflects the ideal position of the blue film design boundary on the ceramic substrate printed circuit board.
[0021] Extraction of the actual set of marker points; Specifically, in the image to be inspected, since marker points typically present high-contrast patterns on ceramic substrate printed circuit boards, methods such as grayscale thresholding, symmetry detection, or template matching can be used to identify the marker points. The pixel coordinates of each identified marker point in the image to be inspected are extracted and paired with a reference marker point set to form an actual marker point set. The one-to-one correspondence between the reference and actual marker point sets reflects the spatial mapping between the design coordinate system and the actual image coordinate system.
[0022] S2. Calculate the affine transformation matrix based on the reference set of marker points and the actual set of marker points; Establishment of a set of paired markers; Specifically, each reference marker in the reference marker set is paired with a corresponding actual marker in the image to be detected, forming several pairs of marker pairings. In this embodiment, the reference marker set and the actual marker set each contain four markers, thus forming four pairs of marker pairings. Each pair of marker pairings includes pixel coordinates in the reference design image and pixel coordinates in the image to be detected.
[0023] Solving the relation of two-dimensional affine transformation Specifically, based on the set of paired marker points, a two-dimensional affine transformation relationship is established from the reference design image to the image to be detected. A two-dimensional affine transformation can be represented as a combination of linear and translation transformations on a plane. By approximating the actual marker point coordinates with the transformed reference marker point coordinates, a system of linear equations is constructed. In the presence of measurement errors, the least squares method is used to solve the system of equations, yielding the first affine transformation matrix describing translation, rotation, scaling, and shearing.
[0024] When misidentified points may exist in the actual set of marker points, a consistency estimation method based on random sampling can be introduced when solving the first affine transformation matrix. This involves multiple random samplings and model fitting of the marker point pairing set, eliminating abnormal marker point pairs that do not satisfy the affine transformation relationship, thereby improving the stability and accuracy of the first affine transformation matrix. The first affine transformation matrix serves as the basis for mapping from the reference design image coordinate system to the coordinate system of the image to be detected, and will be used in subsequent steps to map the standard contour of the blue film.
[0025] S3. Map the blue film standard contour of the reference design image according to the affine transformation matrix to obtain the first contour. Generate the second and third contours based on the first contour and determine the detection area. First contour generation; Specifically, for each contour point in the standard blue membrane contour, a coordinate transformation is performed according to the first affine transformation matrix to obtain the mapped coordinates of that contour point in the image to be detected. All mapped contour point coordinates are then connected in their original order to form a closed mapped contour, which is the first contour. The first contour geometrically reflects the design boundary position of the blue membrane after considering overall positional offset, rotation, and scaling.
[0026] Construction of the second and third contours; Specifically, using the first contour as a reference, each contour point on the first contour is scaled along directions pointing inward and outward. In this embodiment, the center point of the first contour can be calculated first as a scaling reference point. Then, the first contour is scaled inward with a scaling factor less than 1 to obtain a second contour located inside the first contour; and the first contour is scaled outward with a scaling factor greater than 1 to obtain a third contour located outside the first contour. The scaling factor can be determined based on the blue film width design value and the process deviation range. For example, the inward scaling factor can be 0.95, and the outward scaling factor can be 1.05, so that an annular strip area is formed between the second and third contours, and the width of the annular strip covers the edge offset range allowed by the design.
[0027] The detection area has been determined. Specifically, the area between the second and third contours is defined as the detection area. The detection area covers the possible locations where the blue film edge may appear, excluding the area inside the blue film and the background area outside the blue film. Therefore, during subsequent blue film edge extraction, only pixels within the detection area are processed, reducing interference from irrelevant areas and reducing the amount of computation.
[0028] S4. Extract the actual blue film edge contour of the image to be detected within the detection area, and generate defect markers based on the intersection points of the blue film edge contour with the second and third contours. Blue membrane edge contour extraction; Specifically, within the detection area, edge extraction of the image to be detected can be performed by first smoothing and filtering the grayscale image within the detection area to reduce noise. Then, gradient operators or edge detection operators are used to identify pixels with significant grayscale value changes, and these pixels are recorded as edge candidate pixels. Based on spatial connectivity, the edge candidate pixels are divided into sets and their contours are traced to obtain one or more closed or nearly closed contour curves. Among these contour curves, the one that is closest in position and similar in shape to the first contour is selected as the actual blue film edge contour.
[0029] Calculation of the intersection set; Specifically, the actual blue film edge contour, the second contour, and the third contour are rasterized into binary mask images. The size of the binary mask image is the same as that of the image to be detected. Pixels belonging to the contour are assigned a first value, and pixels not belonging to the contour are assigned a second value.
[0030] A pixel-by-pixel logical AND operation is performed on the binary mask of the actual blue film edge contour and the binary mask of the second contour. When the same pixel position has the first value in both masks, the pixel is located in the intersection point set of the second contour. Similarly, a pixel-by-pixel logical AND operation is performed on the binary mask of the actual blue film edge contour and the binary mask of the third contour to obtain the intersection point set of the third contour.
[0031] Large defect marker generation; Specifically, when there are pixels in the second contour intersection point set, it means that the actual blue film edge contour has shifted inward to the first contour by more than the preset scaling range. The blue film edge has a large inward bulge at this position. By recording the position of the second contour intersection point set, a corresponding large bulge mark is generated.
[0032] When there are pixels in the third contour intersection set, it indicates that the actual blue film edge contour has shrunk significantly to the outside of the first contour, and the blue film edge has a large damage or gap at this position. By recording the position of the third contour intersection set, a corresponding large damage mark is generated.
[0033] For locations that have already been marked as large protrusion defects or large breakage defects through the intersection point set, they can be excluded from the calculation of minor defects in subsequent steps to avoid duplicate marking.
[0034] S5. When the blue film edge contour has no intersection with either the second or third contour, calculate the directional distance from each contour point of the blue film edge contour to the first contour, correct the directional distance using a sliding window, and then determine the defect based on the corrected directional distance. Directional distance calculation; Specifically, for each contour point on the actual blue film edge contour, the Euclidean distance from that contour point to all contour points on the first contour is calculated, and the minimum value is selected as the nearest distance. Then, the sign of the directional distance is determined according to the inside-outside relationship of the contour point relative to the first contour: when the contour point is inside the first contour, the nearest distance is assigned a positive sign; when the contour point is outside the first contour, the nearest distance is assigned a negative sign. Thus, each contour point on the actual blue film edge contour corresponds to a directional distance, the value of which reflects the extent of the contour point's deviation from the first contour, and the sign reflects the direction of the deviation.
[0035] Sliding window construction; Specifically, all contour points on the actual blue membrane edge contour are numbered in spatial order, forming a one-dimensional point sequence. In this embodiment, the width of the sliding window is set to 23 points, and the half-width of the sliding window is 11. When a contour point in the point sequence is taken as the current contour point, several contour points adjacent to the current contour point on the left and right are included in the same sliding window, so that each sliding window contains several consecutive contour points and their corresponding directional distances. As the current contour point moves along the point sequence, the sliding window slides synchronously along the point sequence until it covers the entire actual blue membrane edge contour.
[0036] Local offset distance calculation Specifically, for each sliding window, the directional distances corresponding to all contour points within the window are collected, forming a set of directional distance data. This set of data is sorted, and the median and average directional distances are calculated. To reduce the impact of outliers on local offset estimation, a weighted approach is used to combine the median and average when calculating the local offset distance. For example, the median is multiplied by a larger first weight, and the average is multiplied by a smaller second weight. The two are then added together to obtain the local offset distance, where the first weight is greater than the second weight. The local offset distance reflects the average offset of the entire local contour covered by the sliding window relative to the first contour.
[0037] Correcting directional distance calculation; Specifically, for the current contour point located at the center of the sliding window, its directional distance is subtracted from the local offset distance corresponding to the sliding window to obtain the corrected directional distance of the current contour point. The corrected directional distance characterizes the additional deviation of the current contour point relative to the local contour trend after the local average offset is eliminated. By sliding the window along the actual blue film edge contour and repeating the above calculation process for each contour point, the distribution of the corrected directional distance of the entire actual blue film edge contour can be obtained.
[0038] Minor defect threshold determination and marker generation; Specifically, a defect threshold is preset based on the accuracy requirements for blue film edge defect detection. This threshold can be determined according to pixel size, the allowable edge deviation range of the ceramic substrate printed circuit board, and historical data statistics. For example, when the absolute value of the corrected directional distance exceeds the threshold representing a minor geometric deviation, a minor defect can be considered to exist at that location.
[0039] When the corrected directional distance of a contour point is greater than the defect threshold, it indicates that the contour point has significantly deviated inward from the first contour within the local contour, and a minor protrusion defect exists at the corresponding location, resulting in a minor protrusion mark being generated at that location. When the corrected directional distance of a contour point is less than the negative of the defect threshold, it indicates that the contour point has significantly deviated outward from the first contour within the local contour, and a minor breakage defect exists at the corresponding location, resulting in a minor breakage mark being generated at that location. If the absolute value of the corrected directional distance is less than or equal to the defect threshold, the contour point is considered to be within the normal offset range allowed by the process, and no defect mark is generated.
[0040] Based on the previous embodiment, this embodiment further explains the key parameter value range and optimization strategy in the blue film contour registration method for ceramic substrate printed circuit boards, which is used to adapt to different specifications of ceramic substrate printed circuit boards and different imaging conditions, and improve the versatility and robustness of the method in actual production lines. Number and distribution of reference markers: The number of reference markers can range from 3 to 12. A stable first affine transformation matrix can be determined when the number of reference markers is not less than 3. When the area of the ceramic substrate printed circuit board is large or its shape is relatively long and narrow, the number of reference markers can be appropriately increased to evenly distribute the reference markers in different areas of the board surface. Reference markers should preferably be placed at the four corners of the ceramic substrate printed circuit board and near the middle of the long side, so that the first affine transformation matrix can account for overall translation, rotation, and scaling errors. The actual set of markers is arranged in the same number and spatial position to ensure that the pairing sets of markers are geometrically reasonable.
[0041] Imaging resolution and detection accuracy matching strategy: The pixel resolution of the industrial camera can be selected based on the size of the ceramic substrate printed circuit board and the expected minimum defect size to be detected. When the long side dimension of the ceramic substrate printed circuit board is in the range of 100 mm to 300 mm, the imaging resolution can be selected between 1.6 million pixels and 5 million pixels to ensure that the width of the blue film edge on the image corresponds to at least a certain number of pixels. The higher the imaging resolution, the smaller the actual length represented by a single pixel, and the higher the actual size resolution corresponding to the corrected directional distance, but at the same time, it will increase the computational load. In this embodiment, an appropriate resolution can be selected within the above range according to the production line cycle time, processor performance, and the target minimum defect size requirement, so that the actual length corresponding to one pixel of the corrected directional distance is less than the minimum geometric deviation allowed by the design.
[0042] Scaling factor range for the second and third contours: In the previous embodiment, the second and third contours were obtained by scaling the first contour. To accommodate different blue film widths and process deviations, in this embodiment, the scaling factor used to generate the second contour can be a value not less than 0.9 and less than 1, and the scaling factor used to generate the third contour can be a value greater than 1 and not greater than 1.2. The specific value of the scaling factor can be determined based on the design width of the blue film edge and historical process data, so that the distance between the second and third contours covers the upper limit of the normal process offset range. For example, when the maximum allowable offset of the blue film design edge is 0.1 mm, the average distance between the second and third contours relative to the first contour can be set to be close to this offset value, so that if the actual blue film edge significantly exceeds the second contour or recedes into the third contour, it can be marked as a large defect.
[0043] Sliding window width and contour sampling strategy: The sliding window width determines the smoothness of the local offset distance and the sensitivity to local morphological changes. In this embodiment, the sliding window width can be an odd number of points, ranging from 11 to 51 contour points. A larger sliding window width results in a smoother local offset distance and stronger suppression of small-range fluctuations, but may have a smoothing effect on details with rapidly changing curvature. A smaller sliding window width can more sensitively reflect local morphological changes, but its robustness to noise and local irregularities decreases. For products with short contour lengths and large defect scales, a smaller window width close to 11 can be selected; for products with longer contours and the need to detect small defects, a window width between 23 and 31 can be selected. During contour sampling, contour points can be selected along the actual blue film edge contour with a fixed step size, ensuring that adjacent contour points are spaced approximately equally in actual space, thereby guaranteeing that the actual length covered by the sliding window is roughly consistent at different locations.
[0044] The range of values for the first and second weights: The local offset distance is obtained by weighting the median and average directional distances within the sliding window. The first weight corresponding to the median and the second weight corresponding to the average can be adjusted according to the noise level and the proportion of outliers. In this embodiment, the first weight can be in the range of 0.5 to 0.9, and the second weight can be in the range of 0.1 to 0.5, ensuring that the first weight is greater than the second weight. When the noise in the blue film edge detection environment is high or there are scattered outliers in some areas, the first weight can be appropriately increased and the second weight decreased to highlight the dominant role of the median in the local offset distance; when the noise level is low and the contour smoothness is good, the second weight can be appropriately increased to increase the participation of the average value, thereby making the local offset distance more comprehensively reflect the overall distribution of directional distances within the window.
[0045] Matching the Defect Threshold with the Minimum Detectable Defect Size: The defect threshold is used to determine the corrected directional distance, and its value should match the imaging resolution and the minimum detectable defect size of the target. Given an imaging resolution, the actual length corresponding to one pixel in the corrected directional distance can be used as the basic unit. Based on the minimum protrusion height or damage depth to be identified, the defect threshold can be set to one or more pixels. For example, when the minimum defect height to be identified is approximately 0.05 mm, and the actual length corresponding to a single pixel is approximately 0.02 mm, the defect threshold can be set to an integer value between 2 and 3 pixels. During actual production line debugging, several ceramic substrate printed circuit board samples with known defects can be selected, and the detection results under different defect thresholds can be compared. By considering the combined performance of the correct detection rate and false alarm rate, the suitable defect threshold range for the current product and process conditions can be determined.
[0046] In actual deployment, the solution method for the first affine transformation matrix, the scaling factors of the second and third contours, the sliding window width, the first and second weights, and the defect threshold are not independent of each other, but rather jointly affect the sensitivity and stability of blue film edge defect detection. In this embodiment, a phased joint optimization strategy can be adopted: While ensuring affine registration accuracy, the number of reference markers and imaging resolution are adjusted to ensure that the first contour basically coincides with the position of the blue film in the actual image. Secondly, based on the blue film design width and allowable process deviations, the scaling factor range of the second and third contours is determined to ensure that large defects can be reliably identified through the intersection set. Thirdly, with the scaling factor fixed, the corrected directional distance distribution is calculated on several sample plates by changing the sliding window width and the combination of the first and second weights, and the separability of small protrusion defects and small breakage defects under different parameter combinations is compared. Finally, by adjusting the defect threshold, the corrected directional distance is made to clearly distinguish between normal process offsets and small defects, achieving a high correct detection rate and a low false alarm rate.
[0047] Through the above parameter range setting and optimization strategy, this embodiment enables the blue film contour registration method for ceramic substrate printed circuit boards to maintain high registration accuracy and defect detection reliability under different product specifications, different imaging conditions and different process fluctuation levels, providing an adjustable parameter space and clear debugging basis for production line applications.
[0048] To facilitate understanding of the above embodiments, this embodiment takes a specific application scenario of the above-described blue film contour registration method for ceramic substrate printed circuit boards in an actual production line as an example: The object under inspection is a ceramic substrate printed circuit board used for power module packaging, with a single piece size of approximately 100mm × 120mm. The blue film forms a closed ring boundary around the functional pad area. The inspection station uses an industrial camera with a resolution of 1920×1080 for top-down imaging. After calibration, the actual length of a single pixel on the ceramic substrate printed circuit board on the camera's imaging plane is approximately 0.02mm.
[0049] In this embodiment, four reference markers are arranged at the four corners of the ceramic substrate printed circuit board: the pixel coordinates of the center of the marker in the reference design image are: , , , The coordinates of the actual marker point in the image to be detected, where the center of the marker point is: , , , The coordinates in the reference design image represent the ideal design position, while the coordinates in the image to be detected represent the actual imaging position.
[0050] Two-dimensional affine transformation relationship from the reference design image coordinate system to the coordinate system of the image to be detected: : The pixel coordinates of a point in the reference design image; : The mapped coordinates of this point in the image to be detected; The coefficients in the first affine transformation matrix that describe rotation, scaling, and shearing; Translation offset.
[0051] For each pair of marker points, the following condition must be met: Organize into matrix form: : A column vector containing the coordinates of all actual marked points; :Include The parameter column vector; : A coefficient matrix composed of the coordinates of reference marker points; Solve the above system of linear equations using the least squares method to obtain the parameter vector. This determines the first affine transformation matrix and the translation vector.
[0052] The standard outline of the blue film in the reference design image consists of several outline points: Mapping each contour point using the first affine transformation matrix yields the contour points corresponding to the first contour: : A two-dimensional affine transformation matrix, with matrix elements as ; Translation vector, with components ; The first contour in the image to be detected One outline point; Approximate calculation of the geometric center of the first contour: in, Represents the coordinates of the center of the first contour; For each point of the first contour, perform the following transformation: For each point of the first contour, perform the following transformation: The second outline One outline point; The third outline One outline point; A reduction factor less than 1 (e.g., 0.95); Amplification factor greater than 1 (e.g., 1.05); The area between the second and third contours is the detection area, which includes the normal offset range of the blue film edge allowed by the design.
[0053] Within the detection area, edge extraction and contour tracking are performed on the image to be detected to obtain the actual blue film edge contour, which is sampled as an ordered point sequence: The first one on the actual blue film edge contour One outline point; Number of outline points; When it has been confirmed through binary mask logic operations that both the second and third contour intersection point sets are empty, for each contour point... Calculate its nearest distance to the first contour: in, Represents contour points The absolute value of the minimum Euclidean distance to the first contour.
[0054] To distinguish whether a contour point is located inside or outside the first contour, a sign factor is introduced. Directional distance is defined as: When the contour point When located inside the first contour, (Offset inward); when the contour point When located outside the first contour, (Outward contraction); directional distance It reflects both the magnitude and direction of the offset.
[0055] The actual blue film edge contour points are arranged into a one-dimensional sequence in spatial order, and a sliding window is constructed for each sequence position. In this embodiment, the width of the sliding window is selected as [value missing]. points (e.g.) hour, ).
[0056] For the serial number The contour points, whose corresponding sliding windows contain: Windows can be constructed at the boundaries using either a loop or a truncation method.
[0057] Calculate the median and mean of the set of directional distances within the window: : with the first The median of directional distances within a sliding window centered on a contour point; : The average value of directional distances within the window; Local offset distance is defined as a weighted combination of the median and the mean: First weight (preferably 0.5~0.9); Second weight (preferably 0.1~0.5); Constraints: (This makes the median have a greater impact on local shifts and suppresses a small number of outliers); The directional distance is corrected based on the local offset distance: in, For contour points The corrected directional distance after removing local overall offsets; the larger the value, the greater the degree of anomaly relative to the local average offset.
[0058] Based on the target minimum detectable defect size, the defect threshold is set. The directional distance is set to a number of pixels. In this embodiment: the actual length corresponding to a single pixel is 0.02mm; the minimum defect height to be identified is 0.06mm; and the defect threshold is set as follows: (A minor defect is considered to exist if the absolute value of the directional distance exceeds 3 pixels.) For each contour point Make a judgment: when At this point: a tiny raised defect is determined to exist, and a tiny raised mark is generated; when Time: Determine that there is a minor damage defect at this point, and generate a minor damage marker; when At this point: if the edge of the blue film is determined to be within the normal offset range allowed by the process, no defect mark will be generated; Large protrusion / damage defect: determined by the set of intersection points with the second and third contours; Minor bumps / damage defects: determined by adjusting directional distance and defect threshold; Both types of defects can coexist in spatial locations without conflicting with each other.
[0059] The processing unit makes a comprehensive judgment of pass / fail for each ceramic substrate printed circuit board based on the location, length and number of all defect marks, combined with the safety distance between the blue film design and the functional pads, and displays the defect distribution on the inspection interface for process personnel to analyze and adjust the blue film bonding process.
[0060] An embodiment of the present invention also provides a computer-readable storage medium in which the computer program of the above contour registration method is stored in an SD card (capacity 16GB, Class 10). The SD card is inserted into the embedded controller (based on ARM Cortex-A9 architecture) of the IGBT substrate PCB inspection equipment. After the equipment is started, the controller reads the program in the SD card and executes it, which can realize a fully automated process from image acquisition, registration to defect judgment.
[0061] like Figure 2 The diagram shown is a functional block diagram of a blue film contour registration system for ceramic substrate PCBs provided in an embodiment of the present invention.
[0062] In this embodiment, the functions of each module / unit are as follows: The image and marker extraction module is used to acquire reference design images and images to be inspected for ceramic substrate PCBs, extract a set of reference marker points and a standard blue film outline from the reference design image, and extract an actual set of marker points from the image to be inspected. The affine matrix calculation module is used to calculate the affine transformation matrix based on the reference set of marker points and the actual set of marker points. The detection region generation module is used to map the blue film standard contour of the reference design image according to the affine transformation matrix to obtain the first contour, generate the second and third contours based on the first contour, and determine the detection region. The defect marking module is used to extract the actual blue film edge contour of the image to be detected within the detection area, and generate defect marks based on the intersection of the blue film edge contour with the second and third contours. The sliding window correction module is used to calculate the directional distance from each contour point of the blue film edge contour to the first contour when there is no intersection between the blue film edge contour and the second and third contours. The directional distance is corrected by sliding window, and the corrected directional distance is used to determine defects.
[0063] like Figure 3 As shown, Figure 3 This diagram illustrates the construction of three contours, the definition of the detection area, and defects. The horizontal axis represents the X-pixel value, and the vertical axis represents the Y-pixel value, used to characterize the contour positions in the coordinate system of the image under inspection. The blue dashed line represents the first contour, which is the standard mapped contour obtained by mapping the reference image to the image under inspection through the first affine transformation matrix. The red solid line represents the second contour, which is the inner boundary contour obtained by scaling inward based on the first contour. The green solid line represents the third contour, which is the outer boundary contour obtained by scaling outward based on the first contour. The gray shaded area represents the detection area, which is the area enclosed between the second and third contours, used to define the effective pixel range for edge extraction and defect determination. The thick black line represents... The actual contour refers to the actual blue film edge contour obtained by performing edge extraction and contour tracking on the image to be inspected within the detection area. The actual contour is offset relative to the first contour and superimposed with local irregular fluctuations. Orange dots represent the location of protruding defects, corresponding to the set of abnormal points where the actual contour deviates from the outward direction locally. Purple dots represent the location of broken defects, corresponding to the set of abnormal points where the actual contour is concave inward direction locally. The legend is used to illustrate the semantic correspondence between the contour lines and the defect markers, thereby realizing the visual comparison of the first contour, second contour, third contour, detection area, actual contour, and protruding and broken defects in the same coordinate system.
[0064] like Figure 4 As shown, Figure 4This effectively demonstrates the processing effects of overall offset suppression and local defect prominence. The horizontal axis represents the outline point number, indicating the index position traversed along the actual blue film edge outline point sequence. The vertical axis represents the distance value in pixels. The gray curve represents the original directional distance, including the deviation fluctuations caused by overall offset and local defects. The blue dashed line represents the local offset calculated on the point sequence using a sliding window, used to characterize the overall offset baseline near that position. The red curve represents the corrected distance, which is obtained by subtracting the local offset from the original directional distance, reflecting the local abnormal residual after deducting the overall offset. The green dotted line represents the upper and lower boundaries of the defect threshold, used to determine the corrected distance. The orange marked point represents the detected defect point, whose corrected distance exceeds the defect threshold, thus being judged as abnormal. As can be seen from the curve shape, the gray curve presents a stable positive / negative plateau in multiple segments and the overall offset switches around approximately 1000 and approximately 3000. The blue dashed line can follow the plateau changes to give the corresponding local offset baseline, while the red curve is compressed to near zero in most segments, only showing significant deviation and triggering threshold judgment at the local defect position.
[0065] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for contour registration of blue film on a ceramic substrate PCB, characterized in that, include: S1. Obtain the reference design image and the image to be inspected of the ceramic substrate PCB. Extract the reference marker point set and the blue film standard outline from the reference design image. Extract the actual marker point set from the image to be inspected. S2. Calculate the affine transformation matrix based on the reference set of marker points and the actual set of marker points; S3. Map the blue film standard contour of the reference design image according to the affine transformation matrix to obtain the first contour. Generate the second and third contours based on the first contour and determine the detection area. S4. Extract the actual blue film edge contour of the image to be detected within the detection area, and generate defect markers based on the intersection points of the blue film edge contour with the second and third contours. S5. When the blue film edge contour has no intersection with the second contour and the third contour, calculate the directional distance from each contour point of the blue film edge contour to the first contour, correct the directional distance through a sliding window, and determine the defect based on the corrected directional distance.
2. The method for contour registration of blue film on a ceramic substrate PCB according to claim 1, characterized in that, Acquire a reference design image and an image to be inspected. Extract a set of reference marker points and a standard blue film contour from the reference design image. Extract the actual set of marker points from the image to be inspected, including: An image of the ceramic substrate PCB to be inspected is acquired by an imaging device to obtain the image to be inspected; Obtain a reference design image of the model corresponding to the image to be tested from the process database, and adjust the size of the reference design image; In the reference design image, reference markers are extracted according to the preset marker point positions to form a reference marker point set; In the reference design image, the boundary of the blue film region is extracted to obtain the standard blue film contour of the reference design image; In the image to be detected, extract the set of actual marker points that correspond to the set of reference marker points.
3. The method for contour registration of blue film on a ceramic substrate PCB according to claim 2, characterized in that, The affine transformation matrix is calculated based on the reference set of marker points and the actual set of marker points, including: Based on the pairing relationship between the reference marker set and the actual marker set, a marker pairing set is formed; A two-dimensional affine transformation relationship from the reference design image to the image to be detected is established based on the pairing set of marker points, and the two-dimensional affine transformation relationship is solved to obtain the affine transformation matrix.
4. The method for contour registration of blue film on a ceramic substrate PCB according to claim 1, characterized in that, The blue film standard contour of the reference design image is mapped using an affine transformation matrix to obtain a first contour. A second and third contour are then generated based on the first contour, and the detection region is determined, including: The blue film standard contour of the reference design image is mapped to the image to be detected based on the affine transformation matrix to obtain the mapped contour points, and the mapped contour points are connected to form the first contour. The first contour is scaled to obtain the second and third contours; The area between the second and third contours is used as the detection area.
5. The method for contour registration of blue film on a ceramic substrate PCB according to claim 1, characterized in that, Extract the actual blue film edge contour of the image to be detected within the detection area, including: Edge extraction is performed on the image to be detected within the detection area to obtain a set of edge pixels; Contour tracing is performed on the edge pixel set to obtain the actual blue film edge contour.
6. The method for contour registration of blue film on a ceramic substrate PCB according to claim 1, characterized in that, Based on the intersections of the blue film edge contour with the second and third contours, defect markers are generated, including: Determine whether the actual blue film edge contour and the second contour overlap or intersect. If they do, generate a large raised mark. Determine whether the actual blue film edge contour and the third contour overlap or intersect. If so, generate a large damage marker.
7. The method for contour registration of blue film on a ceramic substrate PCB according to claim 6, characterized in that, When the blue film edge contour has no intersection with either the second or third contour, the directional distance from each contour point of the blue film edge contour to the first contour is calculated. The directional distance is then corrected using a sliding window, and a defect determination is made based on the corrected directional distance, including: When both the second and third contour intersection point sets are empty, calculate the shortest distance from each contour point in the actual blue film edge contour to the first contour. If the contour point is located within the first contour area, assign a positive sign to the shortest distance; otherwise, assign a negative sign to the shortest distance to obtain the directional distance. Set the width of the sliding window and construct the sliding window along the point sequence of the actual blue film edge contour; Calculate the median and average of the directional distances within the sliding window; The local offset distance is obtained by weighting and summing the median and average directional distances within the sliding window based on the preset first and second weights. The corrected directional distance is obtained by calculating the difference between the directional distance and the local offset distance. When the corrected directional distance is greater than the preset defect threshold, a tiny raised mark is generated; When the corrected directional distance is less than the negative of the preset defect threshold, a minor damage marker is generated.
8. A blue film contour registration system for ceramic substrate PCBs, characterized in that, It is applied to a method for blue film contour registration on a ceramic substrate PCB as described in any one of claims 1-7, wherein the system comprises: The image and marker extraction module is used to acquire reference design images and images to be inspected for ceramic substrate PCBs, extract a set of reference marker points and a standard blue film outline from the reference design image, and extract an actual set of marker points from the image to be inspected. The affine matrix calculation module is used to calculate the affine transformation matrix based on the reference set of marker points and the actual set of marker points. The detection region generation module is used to map the blue film standard contour of the reference design image according to the affine transformation matrix to obtain the first contour, generate the second and third contours based on the first contour, and determine the detection region. The defect marking module is used to extract the actual blue film edge contour of the image to be detected within the detection area, and generate defect marks based on the intersection of the blue film edge contour with the second and third contours. The sliding window correction module is used to calculate the directional distance from each contour point of the blue film edge contour to the first contour when there is no intersection between the blue film edge contour and the second and third contours. The directional distance is corrected by sliding window, and the corrected directional distance is used to determine defects.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the blue film contour registration method for ceramic substrate PCBs according to any one of claims 1-7.