Blind hole plate hole depth measuring method and system based on distributed camera 2D and 3D

By combining 2D and 3D methods with distributed cameras, the problems of positioning deviation and low reliability caused by specular reflection in blind hole detection are solved. This enables accurate detection and comprehensive evaluation of blind hole quality, adapts to complex hole conditions, and improves the accuracy and reliability of detection.

CN121095241AActive Publication Date: 2025-12-09合肥九川智能装备有限公司

Patent Information

Application Number
CN202511630507.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2025-12-09
Estimated Expiration
2045-11-10

AI Technical Summary

Technical Problem

Existing blind hole detection technologies suffer from problems such as large positioning deviations due to specular reflection, low measurement reliability, inability to adapt to complex hole conditions, and inability to comprehensively assess blind hole quality.

Method used

A distributed camera approach combining 2D and 3D methods is employed. By using laser stripe images and 2D grayscale images, along with affine transformation and clustering algorithms, the center of the blind hole is accurately located and the hole depth is calculated. The quality is then assessed using 2D grayscale features.

Benefits of technology

It improves the accuracy and reliability of blind hole detection, can adapt to various complex production environments, and realizes the upgrade from simple measurement to comprehensive evaluation, adapting to various complex actual production environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121095241A_ABST
    Figure CN121095241A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer vision, and particularly relates to a blind hole plate hole depth measuring method and system based on distributed cameras 2D and 3D, and the method comprises the steps: projecting laser stripes through a laser, and synchronously collecting a laser stripe image and a blind hole plate 2D gray scale image through the distributed cameras; according to pixel gray scale distribution in a preset window on the laser stripes, adaptively selecting a Gaussian fitting method or a gray scale centroid method to carry out sub-pixel-level center extraction, and generating 3D height data of the blind hole plate; based on the 3D height data and the positioning holes, blind hole center positioning is carried out through affine transformation and image matching; and combining the 3D height data and the 2D grayscale image, judging the measurability of the blind hole according to 2D grayscale features, selectively starting hole depth calculation based on the 3D height data, and comprehensively evaluating the quality of the blind hole. According to the invention, the problems of specular reflection and deep hole measurement are effectively solved, and the precision and efficiency of blind hole depth measurement are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of computer vision, and particularly relates to a blind hole plate hole depth measurement method and system based on distributed cameras 2D and 3D. BACKGROUND

[0002] PCB blind hole plate, as a key technology to realize high-density interconnection (HDI), plays an important role in the development of modern electronic equipment miniaturization and high performance. It realizes interlayer electrical connection through non-penetrating blind holes, effectively improving the wiring density and signal integrity. However, accurate detection of blind hole quality has always been a difficulty in the manufacturing process.

[0003] At present, some researches have proposed to replace the traditional destructive slicing detection with optical methods. For example, a Chinese patent with publication number CN115713553A proposes a blind hole depth measurement scheme based on multiple 3D cameras, which obtains the 3D data of the whole plate by scanning, and uses the coordinates of the through holes to map and locate the blind holes through affine transformation, and finally calculates the hole depth according to the average depth of multiple points in the blind hole rectangular area. Although this scheme realizes non-contact measurement, it still has obvious limitations: first, it highly depends on the through holes for blind hole positioning, and its applicability is limited on plate parts with missing or unevenly distributed through holes; second, it only uses 3D data for calculation, and when the blind hole is deep and mirror reflection occurs or the laser cannot return, the 3D data will be invalid or severely distorted, resulting in measurement failure or a sharp drop in accuracy.

[0004] Therefore, the existing technology still lacks an automatic detection scheme that can adapt to complex hole conditions, effectively overcome the inherent limitations of optical measurement, and comprehensively, accurately and robustly detect the quality of blind holes. SUMMARY

[0005] The purpose of the present application is to provide a blind hole plate hole depth measurement method based on distributed cameras 2D and 3D to solve the technical problems of large positioning deviation, low measurement reliability and inability to comprehensively evaluate the quality of blind holes caused by mirror reflection, deep hole laser unable to return and lack of 2D information assistance in the existing blind hole depth optical detection method.

[0006] The present application achieves the above-mentioned purposes through the following technical solutions: In a first aspect, the present application proposes a blind hole plate hole depth measurement method based on distributed cameras 2D and 3D, which comprises: projecting a laser fringe onto the blind hole plate by a laser, and collecting the laser fringe image and the 2D gray image of the blind hole plate by a distributed camera; determining a center extraction algorithm according to the pixel gray distribution of the laser fringe in the preset window on the image, to extract the two-dimensional image coordinates of the laser fringe center point, and determining the 3D height data of the blind hole plate according to the two-dimensional image coordinates; Based on the 3D height data and the blind hole on the blind hole plate, coordinate mapping is performed through affine transformation, center positioning is performed in the mapped region using image matching, and the center coordinates of the blind hole are determined; According to the gray level features of the 2D gray image in the center coordinate region, the 3D height data is used for blind hole depth calculation.

[0007] Further, the center extraction algorithm according to the pixel gray level distribution of the laser stripe in the preset window on the image is used to extract the two-dimensional image coordinates of the laser stripe center point, including: Iterate the pixel points on the laser stripe, and when the gray values of the continuous multiple pixel points in the preset window are all greater than a first threshold value, it is determined that the region is an overexposure region, otherwise it is determined to be an unsaturated region; In the unsaturated region, the two-dimensional image coordinates of the laser stripe center are extracted using a Gaussian fitting method, which is realized by the following formula: ; Where x is the pixel position perpendicular to the laser stripe direction, f(x) is the light intensity gray level fitted at the position, a is the peak intensity, b is the sub-pixel level vertical coordinate of the laser stripe center point, c is the standard deviation of the Gaussian distribution, and e is the base of the natural logarithm. The parameters a, b and c are solved by the least square method; In the overexposure region, the laser stripe center is extracted using a gray center method, which is realized by the following formula: ; Where g i is the gray value of the i th pixel point, is the integer pixel vertical coordinate of the i th pixel point, and U is the sub-pixel level vertical coordinate of the laser stripe center point.

[0008] Further, the 3D height data of the blind hole plate is determined according to the two-dimensional image coordinates, including: The two-dimensional image coordinates are input into a pre-calibrated laser triangulation model, and the three-dimensional space coordinates of each point on the surface of the blind hole plate are calculated to generate the 3D height data.

[0009] Further, the coordinate mapping based on the 3D height data and the positioning hole on the blind hole plate through affine transformation includes: Based on the coordinates of at least four positioning holes on the blind hole plate in the actual image and the coordinates of the positioning holes in the standard drawing, an affine transformation model is constructed; The coordinates of the positioning holes in the standard drawing are mapped to the image coordinate system corresponding to the 3D height data, which is realized by the following formula: ; Wherein, x' is the horizontal coordinate of the actual image hole, y' is the vertical coordinate of the actual image hole; x is the horizontal coordinate of the standard image hole, y is the vertical coordinate of the standard image hole; A is the 8-parameter transformation matrix.

[0010] Further, the center positioning in the mapped region using image matching to determine the center coordinates of the blind hole comprises: In the mapped region, a convolution kernel matched with the three-dimensional topography of the standard blind hole is constructed; The response map of the convolution kernel and the 3D height data in the region is calculated, and the peak point of the response map is determined as the candidate point of the blind hole center; A clustering algorithm is used to perform clustering analysis on all candidate points, and a cluster center is formed based on the optimal cluster number; The Euclidean distance between each candidate point and the cluster center to which it belongs is calculated, and if the distance is greater than a preset deviation limit, the point is determined as an abnormal point and is removed; the finally obtained cluster center coordinates are determined as the center coordinates of the blind hole.

[0011] Further, the clustering algorithm is used to perform clustering analysis on all candidate points, comprising: A preset candidate cluster number is traversed, and for each candidate number, clustering is performed and the average silhouette coefficient of this clustering is calculated; The average silhouette coefficients under different candidate numbers are compared, and the candidate number corresponding to the highest coefficient is determined as the optimal cluster number; wherein, the silhouette coefficient s of a single sample point is calculated according to the following formula: ; Wherein, M is the average distance from the sample point to other points in its own cluster, and N is the average distance from the sample point to points in other clusters.

[0012] Further, the 3D height data is used to calculate the hole depth of the blind hole according to the gray scale features of the 2D gray scale image in the center coordinate region, comprising: The proportion of pixels with a gray scale value lower than a second preset threshold in a predetermined region around the center coordinate is calculated; If the proportion is lower than a third preset threshold, it is determined as a measurable blind hole, and a quadratic surface is fitted in the 3D height data based on a quadratic surface model in the neighborhood of the center coordinate to calculate the hole depth; If the proportion is higher than the third preset threshold, it is determined as an unmeasurable blind hole; The quadratic surface model is as follows: ; The parameters are solved by the least square method 、 、 、 , , The optimal value is determined, and the difference between the height of the extreme point of the quadratic surface and the reference height of the plate surface is taken as the actual hole depth.

[0013] Furthermore, the method also includes: Based on the quadratic surface used for hole depth calculation, the transverse curvature and longitudinal curvature of the bottom of the blind hole are calculated. When either curvature exceeds the preset range, it is judged as an abnormal shape. Based on the 2D grayscale image, the grayscale uniformity of the hole wall region is analyzed. When the grayscale standard deviation exceeds the preset standard deviation threshold, it is determined that there is an over-plating or under-plating defect. Based on the deviation of the hole depth from the standard depth, abnormal morphology, and filling defects, the quality of blind holes is divided into multiple grades, including "qualified", "repairable", and "scrap".

[0014] Secondly, the present invention proposes a blind hole plate depth measurement system based on distributed camera 2D and 3D, used to implement the steps of the blind hole plate depth measurement method described above, the system comprising: The data acquisition module is used to project laser stripes onto the blind hole plate using a laser, and to acquire laser stripe images and 2D grayscale images of the blind hole plate using a distributed camera. The 3D reconstruction module is used to determine the center extraction algorithm based on the pixel grayscale distribution of the laser stripes in the image within a preset window, so as to extract the two-dimensional image coordinates of the center point of the laser stripes, and determine the 3D height data of the blind hole plate based on the two-dimensional image coordinates. The center positioning module is used to perform coordinate mapping by affine transformation based on the 3D height data and the positioning holes on the blind hole plate, and to perform center positioning by image matching in the mapped area to determine the center coordinates of the blind hole. The hole depth calculation module is used to calculate the hole depth of blind holes based on the grayscale features of the 2D grayscale image in the central coordinate region and the 3D height data.

[0015] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the blind hole plate hole depth measurement method described above.

[0016] The beneficial effects of this invention are as follows: 1、The application effectively solves the practical problems in blind hole detection by combining the advantages of 2D and 3D images. In extracting the center of laser stripes, the system can automatically select the most suitable algorithm according to the light intensity: when the light is normal, Gaussian fitting is used to ensure accuracy, and when the light is too strong, the gray centroid method is switched to avoid errors, thereby ensuring the accurate generation of 3D data. In positioning the blind hole center, the system first performs preliminary positioning through the positioning hole, then uses a template matched with the standard blind hole shape for accurate search, and finally removes the false positioning points caused by mirror reflection through intelligent clustering, so that the positioning result is more reliable.

[0017] 2、The application uses 2D gray images for pre-judgment, directly judges as an unmeasurable deep hole when the hole is too dark, avoids invalid measurement, and accurately calculates the depth through 3D data for measurable holes. After obtaining the hole depth, the system also automatically judges the blind hole machining quality by analyzing the hole bottom curve shape and hole wall color uniformity, realizes the upgrading from simple measurement to comprehensive evaluation. This method not only improves the accuracy of measurement, but more importantly, can adapt to various complex actual production environments. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A flowchart of a blind hole plate hole depth measurement method based on distributed cameras 2D and 3D provided for Embodiment 1 of the application; Figure 2 Another flowchart of a blind hole plate hole depth measurement method based on distributed cameras 2D and 3D provided for Embodiment 1 of the application; Figure 3 A system block diagram of a blind hole plate hole depth measurement system based on distributed cameras 2D and 3D provided for Embodiment 2 of the application; Figure 4 A layout diagram of a distributed camera in the application. DETAILED DESCRIPTION

[0019] The following further describes the application with reference to the drawings. It is necessary to point out here that the following detailed description is only used to further illustrate the application and cannot be understood as limiting the protection scope of the application. Those skilled in the art can make some non-essential improvements and adjustments to the application according to the above application content.

[0020] Embodiment 1 Please refer to Figure 1 and Figure 2In one embodiment of the present application, a distributed camera 2D and 3D based blind hole plate hole depth measurement method is proposed, which comprises: projecting a laser stripe through a laser, and synchronously collecting a laser stripe image and a 2D gray image of the blind hole plate by using a distributed camera; adaptively selecting a Gaussian fitting method or a gray gravity center method for sub-pixel level center extraction according to the pixel gray distribution in a preset window on the laser stripe, to generate 3D height data of the blind hole plate; based on the 3D height data and the positioning hole, positioning the blind hole center through affine transformation and image matching; combining the 3D height data and the 2D gray image, judging the measurability of the blind hole according to the 2D gray features, selectively enabling the 3D height data based hole depth calculation, and comprehensively evaluating the quality of the blind hole.

[0021] The blind hole plate hole depth measurement method comprises the following specific steps: S1, projecting a laser stripe to the blind hole plate through a laser, and collecting a laser stripe image and a 2D gray image of the blind hole plate by using a distributed camera.

[0022] In one specific implementation, please refer to Figure 4 A linear laser stripe is projected to the surface of the blind hole plate to be measured by a line laser, as shown in the position of "laser" in the figure. A set of calibrated distributed industrial cameras (positioned as "CAM" in the figure) are used to synchronously collect two images under the control of a unified trigger signal: one is a laser stripe image mainly containing the laser stripe, at this time the ambient light source should be turned off or weakened, so that the laser stripe is clear and visible; the other is a 2D gray image of the blind hole plate collected under the illumination of a uniform surface light source, which clearly presents the surface texture of the blind hole plate, the blind hole profile and other two-dimensional features.

[0023] S2, determining the center extraction algorithm according to the pixel gray distribution of the laser stripe in the preset window on the image, to extract the two-dimensional image coordinates of the center point of the laser stripe, and determining the 3D height data of the blind hole plate according to the two-dimensional image coordinates.

[0024] Specifically, the center extraction algorithm is adaptively selected according to the distribution characteristics: for the normal and unsaturated conventional area of laser energy, the Gaussian fitting method is used to accurately determine the sub-pixel position of the stripe center; for the overexposed area caused by mirror reflection and other reasons, the gray gravity center method is switched to calculate, so as to overcome the positioning deviation caused by saturation. Through this process, the sub-pixel precision two-dimensional image coordinates of all points on the whole laser stripe are extracted.

[0025] Finally, these two-dimensional coordinates are input into the pre-calibrated laser triangulation model, to calculate the three-dimensional space coordinates of each point on the surface of the blind hole plate, so as to generate 3D height data describing the whole plate surface topography.

[0026] S3, based on the 3D height data and the positioning hole on the blind hole plate, the coordinate mapping is performed through affine transformation, the center positioning is performed in the mapped region by using image matching, and the center coordinate of the blind hole is determined.

[0027] In specific implementation, four positioning holes on the blind hole plate are preferentially selected as the reference feature points. In normal PCB blind hole plate design, one positioning hole is usually arranged at each of the upper left corner, the lower left corner, the upper right corner and the lower right corner of the plate surface. The positions of the four holes on the plate are accurate, and the distribution range is large, so that a stable and accurate coordinate transformation reference can be provided.

[0028] Optionally, when the four corner positioning holes cannot be reliably recognized due to pollution, shielding or damage, etc., four through holes or special positioning marks at other positions on the plate which are not collinear can be selected as the alternative reference. As long as the four points can be clearly identified and corresponded in the actual plate and the standard drawing, and the spatial distribution thereof can constitute a stable geometric relationship, the system can also calculate an effective affine transformation matrix based on the four points, complete the coordinate mapping, and ensure the accuracy of subsequent blind hole positioning.

[0029] S4, according to the gray scale features of the 2D gray scale image in the center coordinate region, the hole depth of the blind hole is calculated by using the 3D height data.

[0030] Specifically, the gray scale features of the 2D gray scale image in the region around the center of the blind hole are analyzed, and in particular, the proportion of low gray scale value pixels is calculated. If the proportion exceeds a set threshold, it indicates that the laser may not return from the hole bottom or complex secondary reflection occurs, and the 3D data is unreliable at this position, so it is directly determined that the hole is an unmeasurable deep hole. For the regular hole determined to be measurable, a quadratic surface is fitted in a small neighborhood in the 3D height data with the center coordinate of the blind hole as the reference to accurately represent the three-dimensional topography of the hole bottom. The height difference between the extreme point of the quadratic surface and the reference plane of the plate surface is calculated to obtain the accurate hole depth.

[0031] S5, based on the quadratic surface for hole depth calculation, the transverse curvature and the longitudinal curvature of the bottom of the blind hole are calculated, and when any of the curvatures exceeds a preset range, it is determined that the topography is abnormal; based on the 2D gray scale image, the gray scale uniformity of the hole wall region is analyzed, and when the gray scale standard deviation exceeds a preset standard deviation threshold, it is determined that there is over-plating or under-plating defect; the deviation of the hole depth from the standard depth, the topography abnormality and the filling defect are comprehensively considered, and the quality of the blind hole is divided into multiple grades, including “qualified”, “repairable” and “scrap”.

[0032] Further preferably, in step S2, the center extraction algorithm is determined according to the pixel gray scale distribution of the laser stripe on the image in the preset window, so as to extract the two-dimensional image coordinates of the center point of the laser stripe, including: First, the collected single laser stripe image is preprocessed by mean filtering, such as 7x5, to suppress random noise interference. Subsequently, each pixel point on the laser stripe is sequentially traversed along the direction of the laser stripe extension. For the current processing point, a preset detection window (for example, a 5-pixel-wide neighborhood) is set with it as the center, and the pixel gray scale distribution in the window is analyzed. The determination rule is: when the gray scale values of three consecutive pixel points in the window are all greater than a preset first threshold K, it is determined that the current region is a laser energy saturated overexposed region; otherwise, it is determined to be a normal unsaturated region of laser energy.

[0033] In the unsaturated region, the two-dimensional image coordinates of the laser stripe center are extracted by using the Gaussian fitting method, which is based on the characteristic that the laser intensity approximately obeys Gaussian distribution, and the following mathematical model is used for fitting: ; Where x is the pixel position perpendicular to the direction of the laser stripe, f(x) is the intensity gray scale at the position, a is the peak intensity, b is the sub-pixel level vertical coordinate of the laser stripe center point, c is the standard deviation of the Gaussian distribution, e is the base number of natural logarithm (a mathematical constant); the least squares method is used to curve fit the pixel gray scale data in the window, and the optimal values of parameters a, b and c are solved, so as to accurately determine the center position.

[0034] In the overexposed region, since the pixel gray scale value has reached or approached saturation, the Gaussian distribution model will be distorted, and the gray center method is switched to. This method locates the center by calculating the weighted center of gravity of the pixel gray scale values in the window, and the calculation formula is as follows: ; Where g i is the gray scale value of the i-th pixel point, is the integer pixel vertical coordinate of the i-th pixel point, and U is the sub-pixel level vertical coordinate of the laser stripe center point.

[0035] Through the above regional adaptive processing strategy, the application can stably extract high-precision laser stripe center coordinates in regions with different reflection characteristics (such as normal rough base material and smooth hole bottom copper foil with mirror reflection) on the blind hole plate surface.

[0036] It should be noted that in the specific implementation process, the laser stripe center vertical coordinate extracted by the foregoing steps needs to be combined with the corresponding image horizontal coordinate to form a complete two-dimensional image coordinate.

[0037] Specifically, the application is processed in column laser stripe image, for each column (assuming its horizontal coordinate value is u) in the image, in the laser stripe region corresponding to the column, through the adaptive algorithm (Gaussian fitting method or gray gravity method), the accurate longitudinal coordinate v of the laser stripe center point on the column is calculated (corresponding to b in Gaussian fitting and U in gray gravity method).

[0038] Therefore, for each column, the output of the center point coordinate is a two-dimensional data (u, v), where u is the known horizontal coordinate (i.e. column number) of the column, and v is the sub-pixel level longitudinal coordinate calculated by the algorithm. By traversing all the relevant columns in the image, a series of two-dimensional image coordinate point sets (u i , v i ) constituting the center line of the whole laser stripe can be obtained. This two-dimensional point set containing horizontal and vertical coordinates is the complete input for subsequent 3D height data construction.

[0039] Further preferably, in step S2, the 3D height data of the blind hole plate is determined according to the two-dimensional image coordinates, comprising: inputting the two-dimensional image coordinates into the pre-calibrated laser triangulation model to calculate the three-dimensional space coordinates of each point on the surface of the blind hole plate, and generating the 3D height data.

[0040] It can be understood that in the calibration of the laser triangulation model in the present application, a standard flat target plate with a known height is used, and the target plate is controlled to move accurately by a plurality of known displacement amounts in a direction perpendicular to the optical axis of the camera (Z axis). At each displacement height, the system collects a laser stripe image and extracts the position coordinates of the laser stripe in the image. By recording a series of known physical height values and their corresponding laser stripe image position coordinates, an accurate correspondence between the image coordinates and the physical height is established, and this correspondence is encapsulated in the laser triangulation model. The model is essentially a mapping function, and its core parameters are determined after calibration.

[0041] Further preferably, in step S3, based on the 3D height data and the positioning holes on the blind hole plate, coordinate mapping is performed through affine transformation, specifically including: Primary coordinate mapping based on positioning holes First, the inherent positioning holes on the blind hole plate are used to establish the coordinate transformation relationship from the standard drawing to the actual measurement image. Specifically, the center coordinates of at least four positioning holes (preferably four holes distributed at the corners of the plate and not collinear) in the actually collected 3D height data or 2D gray scale image are identified and extracted, denoted as (x’, y’). At the same time, the theoretical coordinates (x, y) of these same positioning holes are obtained from the standard design drawing of the blind hole plate.

[0042] Subsequently, based on the two sets of corresponding coordinate points, an affine transformation matrix A is calculated using the least squares method. The matrix is a 3x3 transformation matrix, commonly referred to as an 8-parameter transformation matrix containing 6 independent degrees of freedom. The coordinate mapping is achieved by the following formula: ; Where x' is the horizontal coordinate of the actual hole, y' is the vertical coordinate of the actual hole; x is the horizontal coordinate of the standard hole, y is the vertical coordinate of the standard hole; A is the 8-parameter transformation matrix. (x', y') is the corresponding coordinate mapped to the actual image coordinate system. Using this transformation matrix, the theoretical coordinates of all blind holes in the standard drawing can be preliminarily converted to the actual image, achieving coarse positioning of the blind holes and reducing the search range to the local area (e.g. 40x40 pixel ROI) around each blind hole.

[0043] (2) Precise positioning and anomaly screening in the mapping area In each local ROI given by the preliminary positioning, precise center positioning is performed: Topography matching: A convolution kernel matching the 3D topography of the standard blind hole (i.e. its ideal height variation characteristics) is constructed. The convolution kernel is correlated with the actual 3D height data in the ROI to generate a correlation response map. The brightest points (peak points) in the response map are the positions that best match the standard blind hole topography, and these peak points are used as candidate points for the center of the blind hole.

[0044] Cluster screening: Due to factors such as mirror reflection and noise, multiple false candidate points may be generated. Therefore, a clustering algorithm (such as K-means) is used to analyze the spatial coordinates of all candidate points. The clustering quality is evaluated by indicators such as the contour coefficient, and the optimal number of clusters is automatically determined to form stable cluster centers.

[0045] Anomaly rejection: The Euclidean distance between each candidate point and its cluster center is calculated. A preset tolerance (e.g. 5μm) is set, and if the distance of a candidate point exceeds the tolerance, it is determined to be an abnormal positioning point and is rejected.

[0046] Center determination: Finally, the cluster center coordinates of the most stable cluster group that remain after screening are determined as the final center coordinates of the blind hole.

[0047] Further preferably, a clustering algorithm is used to perform clustering analysis on all candidate points, specifically including: When processing the set of blind hole center candidate points generated by topography matching, an adaptive determination method based on cluster quality evaluation is used to overcome the subjectivity of the preset number of clusters.

[0048] First, a preset range of candidate cluster numbers (e.g., from 2 to 5) is traversed. For each candidate number K in the range, a clustering analysis (such as the K-means algorithm) is performed to divide all candidate points into K clusters.

[0049] Subsequently, for each clustering result, the overall average silhouette coefficient is calculated to quantitatively evaluate the quality of this clustering. For each sample point in the clustering result (i.e., a candidate point), its individual silhouette coefficient s needs to be calculated. The calculation formula is: ; where M is the average distance of the sample point to other points in its own cluster, and the smaller the M value, the closer the point is to other points in the same cluster. N is the average distance of the sample point to points in other clusters, and the larger the N value, the farther the point is from other clusters, and the better the separation between clusters.

[0050] After calculating the s values of all sample points, taking their average value, i.e., the average silhouette coefficient of this clustering (for the current K value) is obtained. Finally, the average silhouette coefficients obtained under different candidate numbers K are compared, and the K value with the highest average silhouette coefficient is determined as the optimal clustering number of the current candidate point set.

[0051] Further preferably, according to the gray level features of the 2D gray level image in the central coordinate region, 3D height data is used to calculate the depth of the blind hole, specifically including: After obtaining the accurate blind hole center coordinates, first, the measurability of the blind hole is judged. A predetermined rectangular region is defined with the center coordinates as the center, and the pixel distribution of this region in the 2D gray level image is analyzed. Specifically, the number of pixels with a gray level value lower than a second preset threshold T in the region is counted, and the percentage of the total number of pixels (i.e., the percentage of low gray level pixels) is calculated.

[0052] The percentage is compared with a third preset threshold: If the percentage is lower than the threshold, it is determined that the blind hole is a measurable blind hole. This indicates that the reflected light signal in the hole is sufficient, and the quality of the 3D height data is reliable.

[0053] If the percentage is higher than the threshold, it is determined that the blind hole is an unmeasurable blind hole. This usually means that the hole is a deep hole, and the laser cannot return effectively, or complex secondary reflection occurs in the hole, resulting in invalid or unreliable 3D height data in this region. This hole will be directly marked to avoid invalid depth calculation.

[0054] For the blind hole determined to be measurable, accurate depth calculation is performed in the 3D height data. In a small neighborhood of the blind hole center coordinates, a quadratic surface model is used to fit the discrete height points to accurately restore the three-dimensional topography of the hole bottom, and the quadratic surface model is as follows: ; wherein (x, y) is the plane coordinate of the pixel point, and z is the corresponding height value, the parameters are solved by least square method 、 、 、 、 、 The difference between the extreme point height of the quadric surface and the reference height of the plate surface is taken as the actual hole depth.

[0055] Embodiment 2 Please refer to Figure 3 , another specific embodiment of the present application proposes a blind hole plate hole depth measurement system based on distributed camera 2D and 3D, which is used to realize the steps of the blind hole plate hole depth measurement method as in embodiment 1, the system comprises: a data acquisition module for projecting a laser fringe onto the blind hole plate by a laser, and collecting a laser fringe image and a blind hole plate 2D gray image by a distributed camera; a 3D reconstruction module for determining a center extraction algorithm according to the pixel gray distribution of the laser fringe in the preset window on the image, so as to extract the two-dimensional image coordinates of the center point of the laser fringe, and determine the 3D height data of the blind hole plate according to the two-dimensional image coordinates; a center positioning module for mapping coordinates by affine transformation based on the 3D height data and the positioning hole on the blind hole plate, and positioning the center in the mapped area by image matching to determine the center coordinates of the blind hole; a hole depth calculation module for calculating the hole depth of the blind hole by using the 3D height data according to the gray features of the 2D gray image in the center coordinate area.

[0056] a blind hole quality evaluation module for comprehensively evaluating and grading the quality of the blind hole based on the hole depth calculation result, 3D topographic features and 2D gray information.

[0057] The specific limitations of the blind hole plate hole depth measurement system based on distributed camera 2D and 3D can be referred to the limitations of the blind hole plate hole depth measurement method in the above, which will not be repeated here. It should be noted that the modules in the above measurement system correspond to steps S1 to S5 in the implementation of the above measurement method, and the instances and application scenarios realized by the modules and the corresponding steps are the same, but are not limited to the content disclosed in embodiment 1.

[0058] It can be understood that the measurement system proposed above is mainly applied to the online quality detection link in the PCB / HDI blind hole plate manufacturing process. In specific implementation, the distributed camera can be arranged along the track gantry of the production line to form a visual detection station covering the entire plate surface. When the conveyor belt transports the blind hole plate to be detected to the detection station, the system automatically triggers the laser and the camera to complete the image acquisition and processing process.

[0059] The data acquisition module, the 3D reconstruction module, the center positioning module, the hole depth calculation module and the blind hole quality evaluation module can realize the functions through the special software system installed on the production control computer. The measurement results can be uploaded to the production management system (MES) of the factory in real time for statistical process control, and at the same time drive the downstream sorting device to classify the plates of different quality levels.

[0060] The system can be integrated into the existing production line to realize the detection of blind hole depth and quality, replace the traditional manual sampling and slicing detection method, effectively improve the production efficiency and product consistency, and provide a reliable automatic detection solution for high-end PCB manufacturing.

[0061] In another embodiment provided by the application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the steps of the blind hole plate hole depth measurement method in the embodiment 1, Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0062] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0063] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for measuring the depth of a blind hole plate based on 2D and 3D distributed cameras, characterized in that, The method includes: Laser stripes are projected onto a blind hole plate using a laser, and images of the laser stripes and 2D grayscale images of the blind hole plate are acquired using distributed cameras. The center extraction algorithm is determined based on the pixel grayscale distribution of the laser stripes in the image within a preset window, so as to extract the two-dimensional image coordinates of the center point of the laser stripes, and the 3D height data of the blind hole plate is determined based on the two-dimensional image coordinates. Based on the 3D height data and the positioning holes on the blind hole plate, coordinate mapping is performed through affine transformation, and image matching is used to locate the center of the blind hole within the mapped area to determine the center coordinates of the blind hole. Based on the grayscale characteristics of the 2D grayscale image in the central coordinate region, the hole depth of the blind hole is calculated using the 3D height data.

2. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 1, characterized in that, The algorithm for determining the center extraction based on the pixel grayscale distribution of laser stripes within a preset window in the image, to extract the two-dimensional image coordinates of the center point of the laser stripes, includes: Traverse the pixels on the laser stripe. When the gray values ​​of multiple consecutive pixels within the preset window are all greater than the first threshold, the area is determined to be an overexposed area; otherwise, it is determined to be an unsaturated area. In the unsaturated region, the two-dimensional image coordinates of the laser stripe center are extracted using Gaussian fitting, achieved by the following formula: ; Where x is the pixel position perpendicular to the laser stripe direction, f(x) is the grayscale of the light intensity fitted at that position; a is the peak intensity, b is the subpixel level ordinate of the center point of the laser stripe, c is the standard deviation of the Gaussian distribution, and e is the base of the natural logarithm; parameters a, b, and c are solved by the least squares method. In the overexposed area, the center of the laser stripe is extracted using the gray-scale centroid method, achieved by the following formula: ; Among them, g i Let be the grayscale value of the i-th pixel. Let U be the integer pixel coordinate of the i-th pixel, and U be the sub-pixel coordinate of the center point of the laser stripe.

3. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 2, characterized in that, The determination of the 3D height data of the blind hole plate based on the two-dimensional image coordinates includes: The two-dimensional image coordinates are input into a pre-calibrated laser triangulation model to calculate the three-dimensional spatial coordinates of each point on the surface of the blind hole plate, thereby generating the 3D height data.

4. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 1, characterized in that, The coordinate mapping based on the 3D height data and the positioning holes on the blind hole plate, through affine transformation, includes: Based on the coordinates of at least four positioning holes on the blind hole plate in the actual image and their coordinates in the standard drawing, an affine transformation model is constructed. Mapping the coordinates of the positioning holes in the standard drawing to the image coordinate system corresponding to the 3D height data is achieved using the following formula: ; Where x' is the abscissa of the actual hole and y' is the ordinate of the actual hole; x is the abscissa of the standard hole and y is the ordinate of the standard hole; A is an 8-parameter transformation matrix.

5. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 4, characterized in that, The step of using image matching to locate the center of the blind hole within the mapped area and determining its center coordinates includes: Within the mapped region, a convolution kernel is constructed that matches the three-dimensional morphology of a standard blind aperture; Calculate the response map of the convolution kernel and the 3D height data in the region, and determine the peak points of the response map as candidate points for the blind hole center; Clustering algorithms are used to perform cluster analysis on all candidate points, and cluster centers are formed based on the optimal number of clusters. Calculate the Euclidean distance between each candidate point and its cluster center. If the distance is greater than the preset deviation tolerance, the point is determined to be an outlier and removed. The final cluster center coordinates are then used as the center coordinates of the blind hole.

6. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 5, characterized in that, The clustering analysis of all candidate points using a clustering algorithm includes: Iterate through the preset number of candidate clusters, perform clustering for each candidate cluster, and calculate the average silhouette coefficient of the cluster. By comparing the average silhouette coefficients under different numbers of candidates, the number of candidates with the highest coefficient is determined as the optimal number of clusters; the formula for calculating the silhouette coefficient s of a single sample point is: ; Where M is the average distance from a sample point to other points within its cluster, and N is the average distance from a sample point to points in other clusters.

7. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 1, characterized in that, The step of calculating the hole depth of the blind hole using the 3D height data based on the grayscale features of the 2D grayscale image in the central coordinate region includes: Calculate the percentage of pixels with grayscale values ​​lower than a second preset threshold within a predetermined area surrounding the center coordinates; If the percentage is lower than the third preset threshold, it is determined to be a measurable blind hole, and the hole depth is calculated by fitting a quadratic surface in the neighborhood of the center coordinates based on the quadratic surface model in the 3D height data. If the percentage is higher than the third preset threshold, it is determined to be an unmeasurable blind hole; The quadratic surface model is as follows: ; (x, y) represents the planar coordinates of a pixel, and z is the corresponding height value. The parameters are solved using the least squares method. , , , , , The optimal value is determined by taking the difference between the height of the extreme point of the quadratic surface and the reference height of the plate surface as the actual hole depth.

8. The method for measuring the depth of a blind hole plate based on distributed camera 2D and 3D as described in claim 7, characterized in that, The method further includes: Based on the quadratic surface used for hole depth calculation, the transverse curvature and longitudinal curvature of the bottom of the blind hole are calculated. When either curvature exceeds the preset range, it is judged as an abnormal shape. Based on the 2D grayscale image, the grayscale uniformity of the hole wall region is analyzed. When the grayscale standard deviation exceeds the preset standard deviation threshold, it is determined that there is an over-plating or under-plating defect. Based on the deviation of the hole depth from the standard depth, abnormal morphology, and filling defects, the quality of blind holes is divided into multiple grades, including "qualified", "repairable", and "scrap".

9. A blind hole plate depth measurement system based on distributed camera 2D and 3D, used to implement the steps of the blind hole plate depth measurement method according to any one of claims 1-8, characterized in that, The system includes: The data acquisition module is used to project laser stripes onto the blind hole plate using a laser, and to acquire laser stripe images and 2D grayscale images of the blind hole plate using a distributed camera. The 3D reconstruction module is used to determine the center extraction algorithm based on the pixel grayscale distribution of the laser stripes in the image within a preset window, so as to extract the two-dimensional image coordinates of the center point of the laser stripes, and determine the 3D height data of the blind hole plate based on the two-dimensional image coordinates. The center positioning module is used to perform coordinate mapping based on the 3D height data and the blind holes on the blind hole plate through affine transformation, and to perform center positioning by image matching in the mapped area to determine the center coordinates of the blind holes. The hole depth calculation module is used to calculate the hole depth of blind holes based on the grayscale features of the 2D grayscale image in the central coordinate region and the 3D height data.

10. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the steps of the blind hole plate depth measurement method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method for measuring hole depth of blind hole of blind hole plate and related device

    CN115713553A

  • Circuit board blind hole quality detection method and system

    CN116295047A

  • Polaroid defect detection method and system based on deep learning

    CN120471930A

  • Semiconductor package board processing hole 3D automatic process inspection method and system

    KR102618194B1

Cited By

  • Iris lesion geometric parameter measurement system based on laser triangulation

    CN121264951A

  • An iris lesion geometry parameter measurement system based on laser triangulation

    CN121264951B