A Method and System for Locating Components on Remote Control PCB Boards Based on Feature Matching
By dynamically adjusting the feature window and weight adjustment coefficient, the positioning stability problem of remote control PCB board components in complex environments was solved, achieving efficient digital visual spatial alignment and fault detection.
Patent Information
- Application Number
- CN202611241177.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2046-08-17
AI Technical Summary
Existing technologies have limitations in handling complex reflection light suppression, algorithm computing power balance, and collaborative sensing of external geometric deformation and internal electrical faults, making it difficult to achieve stable component positioning and fault detection on high-flow-rate production lines.
By dynamically adjusting the feature window, edge contour features are extracted, local directional dispersion and topological consistency scores are calculated, and global contour topological matching is performed using weight adjustment coefficients to correct specular reflection distortion and achieve digital visual space alignment.
It improves the stability and efficiency of component positioning on the remote control PCB board, reduces mismatches caused by reflective interference, and enhances positioning accuracy in complex environments.
Smart Images

Figure CN122780404B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision positioning technology for printed circuit board components, and relates to a method and system for positioning remote control PCB board components based on feature matching. Background Technology
[0002] Currently, using optical image analysis and electrical condition assessment for automated online inspection of the manufacturing quality and surface components of printed circuit boards (PCBs) has become a core approach to intelligent manufacturing. However, existing technologies still have limitations in handling complex reflected light suppression, balancing algorithmic computational power on high-speed production lines, and efficiently coordinating the perception of external shape and internal electrical faults. First, there is the automatic component positioning technology based on graph feature space mapping. For example, Chinese invention patent CN113674207B discloses an automatic PCB component positioning method based on graph convolutional neural networks. This method extracts features through a multi-branch convolutional network and embeds them into nodes of a graph structure. It updates features based on a message passing mechanism and outputs the center coordinates of each component, thereby avoiding the impact of missing labels or obscured silkscreen characters on positioning. However, its drawback is that the solution essentially focuses on the local topological feature learning of two-dimensional planar images. It lacks the ability to resist nonlinear optical noise caused by surface copper plating, strong reflection of solder joint metal, or local overexposure / underexposure. Furthermore, it cannot map the recognition results into multi-dimensional constraints that include three-dimensional spatial deformation, such as warping and solder height deviation, resulting in significantly insufficient positioning stability of the model under complex environmental reflection.
[0003] Second, there is the shape defect detection technology based on multispectral and polarization fusion. For example, Chinese invention patent application CN121661085A discloses a method and system for detecting edge deviations of welded components and PCB boards. It locates abnormal areas of reflective exposure by combining polarization characteristics and reconstructs multi-scale low-frequency and high-frequency components based on adaptive spectral fusion weights to calculate three-dimensional spatial deviations. Its drawback is that the technology focuses on pixel-level fine reconstruction of dense spectral response and polarization characteristics. Its multi-scale Laplacian pyramid decomposition and complex weighted summation algorithm bring extremely high computing power and hardware dependence. It is difficult to compress the calculation time within the ultra-short time boundary under the high flow rate of the production line while ensuring the degree of detail restoration. It is very easy to lose the practical value of industrial online real-time control due to excessive calculation delay.
[0004] Third, intermittent electrical testing techniques based on nonlinear state estimation; for example, Chinese invention patent application CN120801983A discloses an automated testing method and system for automotive PCB motherboards, which uses five-dimensional environmental stress to construct a stress model and uses algorithms such as unscented Kalman filtering to perform nonlinear intermittent fault state estimation and electrical coordinate mapping of target nodes; its drawback is that the scheme focuses entirely on electrical integrity indicators and electrical fault location under multi-dimensional environmental stress coupling, which is a pure electrical functional assessment in a non-visual dimension, ignoring the evolution of optical morphological features such as the overall appearance of the PCB, geometric deformation, mounting misalignment and outer edge, and cannot perceive the degradation trend of physical form in real time before the initial characteristics of the circuit produce electrical anomalies, resulting in a significant vacuum in structural failure detection.
[0005] Therefore, the technical problem to be solved by this invention is how to construct an online integrated detection architecture with full-shape reflection suppression and multi-dimensional perception of electrical fault states, so that geometric shape deviation and fault assessment logic converge to the real physical safety boundary throughout the entire cycle. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and solve the technical problems of limitations in the prior art in handling complex reflected light suppression, algorithm computing power balance, and collaborative perception of appearance geometric deformation and internal electrical faults, and to provide a method and system for locating remote control PCB board components based on feature matching.
[0007] To achieve the above-mentioned objectives, this invention provides a method for locating components on a remote control PCB board based on feature matching, comprising the following steps: Step S1, dynamically adjust the feature window and extract edge contour features: acquire the original two-dimensional image array of the remote control PCB board containing the target component, calculate the local gradient two-dimensional distribution state of each pixel grid point in the original two-dimensional image array, dynamically adjust the initial size range of the adaptive feature window based on the spatial distribution gradient of the local gradient anisotropy of each pixel region in the original two-dimensional image array, and extract the edge contour features of the target component within the adaptive feature window; wherein, in areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise; in areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to improve the extraction speed; Step S2: Calculate the local directional dispersion of the structural orientation vectors of each edge pixel within the adaptive feature window. Compare the topological consistency score between the current global topological feature structure composed of edge contour features and the preset standard digital coordinate reference system. Based on the local directional dispersion and the dynamic adjustment coefficients that are dynamically corrected in real time by the reverse feedback mechanism of the topological consistency score, calculate the corresponding weight adjustment coefficients to characterize the feature confidence level of different regions. Specifically, when calculating the local directional dispersion, the structural orientation vector of each edge pixel is first converted into an unsigned double-angle representation to eliminate the influence of positive and negative polarities. Then, the collinear directions of the converted orientation angles within the adaptive feature window are statistically analyzed. The standard deviation of the collinear direction distribution is calculated as the local directional dispersion. A bidirectional feedback control loop is constructed between the feature analysis pre-stage and the topology matching post-stage in the calculation loop. The topology matching post-stage calculates the topology consistency score based on the Hausdorff distance between the feature point set and the standard control point set and the Hadamard product of the graph structure adjacency matrix. The consistency deviation data that quantifies the spatial topology convergence quality is obtained, and the consistency deviation data is fed back to the calculation stage of the weight adjustment coefficient. The dynamic adjustment coefficient is dynamically corrected by combining the preset benchmark adjustment constant and sensitivity correction factor. The weight adjustment coefficient is calculated accordingly, and the false edge topology connections caused by reflection distortion are filtered out in situ. Step S3 involves using weight adjustment coefficients to perform global contour topology matching, solving the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system, and performing pixel-level geometric stretching, coordinate translation, and reflection mapping transformations on the original two-dimensional image array based on the affine transformation matrix. This corrects the projection distortion introduced by surface specular reflection distortion, completing the digital visual spatial alignment of the target component. Specifically, the hardware-level context switching delay generated by the digital imaging sensor during continuous acquisition of the original two-dimensional image array is read, and the hardware-level context switching delay is converted into geometric displacement lag in the pixel coordinate system. A second-order lag compensation factor is introduced in the spatial alignment transformation to dynamically correct the time constant of the solved affine transformation matrix, and extrapolation compensation is performed to compensate for the target component positioning coordinate deviation caused by the calculation delay.
[0008] Step S1 of the present invention includes the following sub-steps: Step S11, analyze the local gradient anisotropy of each pixel in the original two-dimensional image array, and calculate the spatial distribution gradient between adjacent pixels.
[0009] Step S2 of the present invention includes the following sub-steps: Step S21, extract the structural gradient of each pixel in the adaptive feature window, and obtain the structural direction vector orthogonal to the structural gradient.
[0010] The process of dynamically correcting the dynamic adjustment coefficient in step S2 of the present invention includes the following sub-steps: Step S241, introducing a reference adjustment constant and a sensitivity correction factor into the bidirectional feedback control loop, setting the reference adjustment constant to 0.85 and the sensitivity correction factor to 0.50; Step S242, adjusting the reference adjustment constant stepwise according to the consistency deviation data and the sensitivity correction factor to complete the correction of the dynamic adjustment coefficient.
[0011] Step S2 of the present invention includes the following sub-steps: Step S25, in the first workpiece form where there is no specular reflection on the surface of the target component and the silkscreen edge is clear, the local directional dispersion approaches 0 and the topological consistency score reaches the maximum critical value of 1, thereby driving the weight adjustment coefficient to reach the maximum boundary value of 1 and preserving local features; Step S26, in the second workpiece form where there is high reflectivity on the surface of the target component, causing edge distortion and artifacts, the increased local directional dispersion is obtained, and combined with the reduced topological consistency score, the weight adjustment coefficient of the corresponding noise region is lowered.
[0012] Step S3 of the present invention includes the following sub-steps: Step S31, combining the spatial scale change of the adaptive feature window with the attribute decoupling of the structural direction vector, and converting the specular reflection difference of the surface material of the target component into a geometric topological convergence calculation under a preset standard digital coordinate reference system; Step S32, applying the solved affine transformation matrix to perform pixel mapping on the original two-dimensional image array, eliminating the rotation and displacement deviation caused by the lens angle and the initial workpiece deflection, and outputting the aligned standardized preprocessed image source.
[0013] Step S1 of the present invention includes the following sub-steps: Step S12, using a digital imaging sensor to acquire a digital shape image of the remote control PCB board containing the target components, and converting the digital shape image into an original two-dimensional image array; Step S13, performing grayscale denoising and scaling processing on the original two-dimensional image array, and establishing an initial mapping reference between the original two-dimensional image array and a preset standard digital coordinate reference system.
[0014] This invention also provides a remote control PCB board component positioning system based on feature matching, which is used to implement a remote control PCB board component positioning method based on feature matching, including: The feature extraction unit is used to acquire the original two-dimensional image array of the remote control PCB board containing the target component, calculate the local gradient two-dimensional distribution state of each pixel grid in the original two-dimensional image array, dynamically adjust the initial size range of the adaptive feature window based on the spatial distribution gradient of the local gradient anisotropy of each pixel region in the original two-dimensional image array, and extract the edge contour features of the target component within the adaptive feature window; wherein, in areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise; in areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to improve the extraction speed. The weight calculation unit is used to calculate the local directional dispersion of the structural orientation vector of each edge pixel within the adaptive feature window. It compares the topological consistency score between the current global topological feature structure composed of edge contour features and the preset standard digital coordinate reference system. Based on the local directional dispersion and a dynamic adjustment coefficient that is dynamically corrected in real time by the reverse feedback mechanism of the topological consistency score, it calculates the corresponding weight adjustment coefficient to characterize the feature confidence level of different regions. Specifically, when calculating the local directional dispersion, the structural orientation vector of each edge pixel is first converted into an unsigned double-angle representation to eliminate the influence of positive and negative polarities. Then, the collinearity of the converted orientation angles within the adaptive feature window is statistically analyzed. The standard deviation of the collinear direction distribution is calculated as the local directional dispersion. A bidirectional feedback control loop is constructed between the feature analysis pre-stage and the topology matching post-stage in the calculation loop. The topology matching post-stage calculates the topology consistency score based on the Hausdorff distance between the feature point set and the standard control point set and the Hadamard product of the graph structure adjacency matrix. The consistency deviation data, which quantifies the convergence quality of the spatial topology, is obtained and fed back to the calculation stage of the weight adjustment coefficient. The dynamic adjustment coefficient is dynamically corrected by combining the preset benchmark adjustment constant and the sensitivity correction factor. The weight adjustment coefficient is calculated accordingly, and the pseudo-edge topology connections caused by reflection distortion are filtered out in situ. The spatial alignment unit is used to perform global contour topology matching using weight adjustment coefficients, solve the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system, and perform pixel-level geometric stretching, coordinate translation, and reflection mapping transformation on the original two-dimensional image array based on the affine transformation matrix. This corrects the projection distortion introduced by surface specular reflection distortion and completes the digital visual spatial alignment of the target components. Specifically, it reads the hardware-level context switching delay generated by the digital imaging sensor when continuously acquiring the original two-dimensional image array, converts the hardware-level context switching delay into geometric displacement lag in the pixel coordinate system, and introduces a second-order lag compensation factor in the spatial alignment transformation. This dynamically corrects the time constant of the solved affine transformation matrix and extrapolates to compensate for the target component positioning coordinate deviation caused by the calculation delay.
[0015] Compared with the prior art, the present invention has at least the following beneficial effects: 1. By combining the local directional dispersion of the structural direction vector with the weight adjustment coefficient, the influence of false edges generated by specular reflection on global contour topology matching can be reduced. Real edges with stable directional distribution can retain higher weights, while reflective noise with disordered directional distribution is suppressed. This allows the affine transformation matrix to be solved mainly based on reliable edge contour features, thereby reducing mismatches caused by reflective interference and improving the stability of remote control PCB board component positioning and digital visual space alignment.
[0016] 2. The adaptive feature window is dynamically adjusted according to the spatial distribution gradient of the local gradient anisotropy. It can adopt a suitable feature extraction range for different regions. In areas with rough silkscreen printing, scratches, or a lot of local noise, the window can be expanded to reduce the impact of a single noise point on the extraction result. At stable geometric boundaries, the window can be reduced to preserve boundary details and improve processing speed. This balances noise suppression, contour integrity, and feature extraction efficiency, and reduces positioning drift caused by oversensitivity of the fixed window or the inclusion of irrelevant background pixels.
[0017] 3. By using the topology consistency score, a two-way feedback control loop is formed between the feature analysis pre-stage and the topology matching post-stage. This loop can promptly correct the dynamic adjustment coefficient and weight adjustment coefficient based on the global matching result. The pseudo-edges generated by local reflection distortion no longer continuously affect the global contour topology matching with the same weight, thereby limiting the spread of local errors to the overall alignment result. This keeps the solution process of the affine transformation matrix stable and further reduces the positioning deviation in the position correction stage. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the edge contour feature extraction and visual spatial alignment process of the present invention; Figure 2This is a schematic diagram illustrating the collaborative interaction between the digital imaging sensor and the visual inspection station of the present invention. Detailed Implementation
[0019] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings.
[0020] Example 1: This embodiment discloses a method for locating components on a remote control PCB board based on feature matching, including the following steps: Step S1, dynamically adjust the feature window and extract edge contour features: acquire the original two-dimensional image array of the remote control PCB board containing the target component, calculate the local gradient two-dimensional distribution state of each pixel grid point in the original two-dimensional image array, dynamically adjust the initial size range of the adaptive feature window based on the spatial distribution gradient of the local gradient anisotropy of each pixel region in the original two-dimensional image array, and extract the edge contour features of the target component within the adaptive feature window; wherein, in areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise; in areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to improve the extraction speed; Step S2: Calculate the local directional dispersion of the structural orientation vectors of each edge pixel within the adaptive feature window. Compare the topological consistency score between the current global topological feature structure composed of edge contour features and the preset standard digital coordinate reference system. Based on the local directional dispersion and the dynamic adjustment coefficients that are dynamically corrected in real time by the reverse feedback mechanism of the topological consistency score, calculate the corresponding weight adjustment coefficients to characterize the feature confidence level of different regions. Specifically, when calculating the local directional dispersion, the structural orientation vector of each edge pixel is first converted into an unsigned double-angle representation to eliminate the influence of positive and negative polarities. Then, the collinear directions of the converted orientation angles within the adaptive feature window are statistically analyzed. The standard deviation of the collinear direction distribution is calculated as the local directional dispersion. A bidirectional feedback control loop is constructed between the feature analysis pre-stage and the topology matching post-stage in the calculation loop. The topology matching post-stage calculates the topology consistency score based on the Hausdorff distance between the feature point set and the standard control point set and the Hadamard product of the graph structure adjacency matrix. The consistency deviation data that quantifies the spatial topology convergence quality is obtained, and the consistency deviation data is fed back to the calculation stage of the weight adjustment coefficient. The dynamic adjustment coefficient is dynamically corrected by combining the preset benchmark adjustment constant and sensitivity correction factor. The weight adjustment coefficient is calculated accordingly, and the false edge topology connections caused by reflection distortion are filtered out in situ. Step S3 involves using weight adjustment coefficients to perform global contour topology matching, solving the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system, and performing pixel-level geometric stretching, coordinate translation, and reflection mapping transformations on the original two-dimensional image array based on the affine transformation matrix. This corrects the projection distortion introduced by surface specular reflection distortion, completing the digital visual spatial alignment of the target component. Specifically, the hardware-level context switching delay generated by the digital imaging sensor during continuous acquisition of the original two-dimensional image array is read, and the hardware-level context switching delay is converted into geometric displacement lag in the pixel coordinate system. A second-order lag compensation factor is introduced in the spatial alignment transformation to dynamically correct the time constant of the solved affine transformation matrix, and extrapolation compensation is performed to compensate for the target component positioning coordinate deviation caused by the calculation delay.
[0021] Step S1 of the present invention includes the following sub-steps: Step S11, analyze the local gradient anisotropy of each pixel in the original two-dimensional image array, and calculate the spatial distribution gradient between adjacent pixels.
[0022] Step S2 of the present invention includes the following sub-steps: Step S21, extract the structural gradient of each pixel in the adaptive feature window, and obtain the structural direction vector orthogonal to the structural gradient.
[0023] The process of dynamically correcting the dynamic adjustment coefficient in step S2 of the present invention includes the following sub-steps: Step S241, introducing a reference adjustment constant and a sensitivity correction factor into the bidirectional feedback control loop, setting the reference adjustment constant to 0.85 and the sensitivity correction factor to 0.50; Step S242, adjusting the reference adjustment constant stepwise according to the consistency deviation data and the sensitivity correction factor to complete the correction of the dynamic adjustment coefficient.
[0024] Step S2 of the present invention includes the following sub-steps: Step S25, in the first workpiece form where there is no specular reflection on the surface of the target component and the silkscreen edge is clear, the local directional dispersion approaches 0 and the topological consistency score reaches the maximum critical value of 1, thereby driving the weight adjustment coefficient to reach the maximum boundary value of 1 and preserving local features; Step S26, in the second workpiece form where there is high reflectivity on the surface of the target component, causing edge distortion and artifacts, the increased local directional dispersion is obtained, and combined with the reduced topological consistency score, the weight adjustment coefficient of the corresponding noise region is lowered.
[0025] Step S3 of the present invention includes the following sub-steps: Step S31, combining the spatial scale change of the adaptive feature window with the attribute decoupling of the structural direction vector, and converting the specular reflection difference of the surface material of the target component into a geometric topological convergence calculation under a preset standard digital coordinate reference system; Step S32, applying the solved affine transformation matrix to perform pixel mapping on the original two-dimensional image array, eliminating the rotation and displacement deviation caused by the lens angle and the initial workpiece deflection, and outputting the aligned standardized preprocessed image source.
[0026] Step S1 of the present invention includes the following sub-steps: Step S12, using a digital imaging sensor to acquire a digital shape image of the remote control PCB board containing the target components, and converting the digital shape image into an original two-dimensional image array; Step S13, performing grayscale denoising and scaling processing on the original two-dimensional image array, and establishing an initial mapping reference between the original two-dimensional image array and a preset standard digital coordinate reference system.
[0027] This invention also provides a remote control PCB board component positioning system based on feature matching, which is used to implement a remote control PCB board component positioning method based on feature matching, including: The feature extraction unit is used to acquire the original two-dimensional image array of the remote control PCB board containing the target component, calculate the local gradient two-dimensional distribution state of each pixel grid in the original two-dimensional image array, dynamically adjust the initial size range of the adaptive feature window based on the spatial distribution gradient of the local gradient anisotropy of each pixel region in the original two-dimensional image array, and extract the edge contour features of the target component within the adaptive feature window; wherein, in areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise; in areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to improve the extraction speed. The weight calculation unit is used to calculate the local directional dispersion of the structural orientation vector of each edge pixel within the adaptive feature window. It compares the topological consistency score between the current global topological feature structure composed of edge contour features and the preset standard digital coordinate reference system. Based on the local directional dispersion and a dynamic adjustment coefficient that is dynamically corrected in real time by the reverse feedback mechanism of the topological consistency score, it calculates the corresponding weight adjustment coefficient to characterize the feature confidence level of different regions. Specifically, when calculating the local directional dispersion, the structural orientation vector of each edge pixel is first converted into an unsigned double-angle representation to eliminate the influence of positive and negative polarities. Then, the collinearity of the converted orientation angles within the adaptive feature window is statistically analyzed. The standard deviation of the collinear direction distribution is calculated as the local directional dispersion. A bidirectional feedback control loop is constructed between the feature analysis pre-stage and the topology matching post-stage in the calculation loop. The topology matching post-stage calculates the topology consistency score based on the Hausdorff distance between the feature point set and the standard control point set and the Hadamard product of the graph structure adjacency matrix. The consistency deviation data, which quantifies the convergence quality of the spatial topology, is obtained and fed back to the calculation stage of the weight adjustment coefficient. The dynamic adjustment coefficient is dynamically corrected by combining the preset benchmark adjustment constant and the sensitivity correction factor. The weight adjustment coefficient is calculated accordingly, and the pseudo-edge topology connections caused by reflection distortion are filtered out in situ. The spatial alignment unit is used to perform global contour topology matching using weight adjustment coefficients, solve the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system, and perform pixel-level geometric stretching, coordinate translation, and reflection mapping transformation on the original two-dimensional image array based on the affine transformation matrix. This corrects the projection distortion introduced by surface specular reflection distortion and completes the digital visual spatial alignment of the target components. Specifically, it reads the hardware-level context switching delay generated by the digital imaging sensor when continuously acquiring the original two-dimensional image array, converts the hardware-level context switching delay into geometric displacement lag in the pixel coordinate system, and introduces a second-order lag compensation factor in the spatial alignment transformation. This dynamically corrects the time constant of the solved affine transformation matrix and extrapolates to compensate for the target component positioning coordinate deviation caused by the calculation delay.
[0028] Example 2: In this embodiment, the component positioning system employing the positioning method of this invention is deployed at the digital vision inspection station of the remote control production line. It processes images of remote control PCB boards containing conductive rubber contacts, copper foil traces, ink screen printing, and surface-mount components. A digital imaging sensor continuously acquires an array of original two-dimensional images containing the target components. When the remote control PCB board surface experiences non-uniform lighting, high surface reflectivity, localized specular reflection blurring, or severe breaks in the ink screen printing, the abrupt changes in grayscale caused by surface specular reflection distortion, as well as surface screen printing roughness or scratch noise, will form isolated geometric features. This causes boundary breaks and edge artifacts in the extracted edge contour features. After these abnormal edges participate in the affine transformation matrix solution, they will cause pixel-level spatial position drift in the standard digital coordinate reference system. When correcting this spatial position drift... The component positioning system acquires the original two-dimensional image array collected by the digital imaging sensor, calculates the local gradient two-dimensional distribution state of each pixel grid, and calculates the spatial distribution gradient of the local gradient anisotropy based on the difference in local gradient anisotropy between adjacent pixels. In areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise. In areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to preserve boundary details and improve the extraction speed of edge contour features. The system extracts the edge contour features of the target component within the adaptive feature window, and simultaneously extracts the structural gradient of each pixel, and determines the direction orthogonal to the structural gradient as the structural direction vector.
[0029] When calculating the local orientation dispersion, the structural orientation vector of each edge pixel is first converted into an unsigned double-angle representation to eliminate the positive and negative polarity effects caused by orientation vectors differing by 180 degrees but remaining collinear. Then, a histogram is used to statistically analyze the converted orientation angles within the adaptive feature window to obtain the collinear orientation distribution within the 0-180 degree range. Subsequently, the mean of this distribution and the variance of each angular component relative to the mean are calculated, and the square root of the variance is used as the standard deviation. This standard deviation is determined as the local orientation dispersion. When the edge pixels within the window form a consistent straight line boundary, the local orientation dispersion tends to decrease. When the noise generated by the surface specular reflection distortion makes the directional distribution disordered, the local directional dispersion increases accordingly. After extracting the edge contour features, the weight calculation unit calculates the local directional dispersion of each edge pixel and constructs a bidirectional feedback control loop between the feature analysis pre-stage and the topology matching post-stage in the calculation loop. The topology matching post-stage compares the current global topology feature structure composed of edge contour features with the standard digital coordinate reference system to obtain the topology consistency score. Then, the consistency deviation data is fed back to the weight adjustment coefficient calculation stage to correct the dynamic adjustment coefficient and feedback compensation gain in real time.
[0030] For any target pixel in the original two-dimensional image array A 5×5 pixel window is set around the target pixel, and the structural orientation vectors of all pixels within the window are counted to obtain the local orientation dispersion. Target pixel Corresponding weight adjustment coefficient satisfy: ,in, For target pixel The corresponding weight adjustment coefficient, This is a dynamic adjustment coefficient. The three factors—local directional dispersion, feature point set, and topological consistency score—are dimensionless. When calculating the topological consistency score, the pixel coordinates in the edge contour features are converted into a set of feature points, and a corresponding set of standard control points is set in a standard digital coordinate reference system. The system calculates the Hausdorff distance between the feature point set and the standard control point set to characterize the maximum deviation between the two point sets in geometric space. Then, graph adjacency matrices are established based on the proximity relationships of the two point sets, and the Hadamard product of the two adjacency matrices is used to evaluate the consistency of topological connectivity. Finally, the reciprocal of the Hausdorff distance is weighted and summed with the similarity of the adjacency matrices, and the summation result is normalized to the interval between 0 and 1 using a logistic function. The resulting value is used as the topological consistency score. , The closer it is to 1, the closer the current global topological feature structure is to the distribution of standard control points in the standard digital coordinate reference system.
[0031] When there is no specular reflection on the surface of the remote control PCB board and the silkscreen edges are clear, the structural direction vectors within the adaptive feature window remain collinear, and the local direction dispersion is... Approaching 0, topology consistency score Reaching the maximum critical value of 1, the weight adjustment coefficient When the local feature reaches its maximum boundary value of 1, it participates in subsequent global contour topology matching with full weight; when the target component surface has high reflectivity and produces edge distortion and artifacts, the local directional dispersion is... Increase, topology consistency score To reduce noise, the bidirectional feedback control loop adjusts the weighting coefficient of the corresponding noise region accordingly; the bidirectional feedback control loop uses a reference adjustment constant with an initial value of 0.85. A sensitivity correction factor with a value of 0.50. Sensitivity correction factor To characterize the feedback compensation gain, the consistency deviation data is calculated by subtracting the topology consistency score from 1. It is obtained that each feedback cycle is adjusted using the current benchmark constant. Calculate the dynamic adjustment coefficient When the consistency deviation data for the current period is greater than that for the previous period, the dynamic adjustment coefficient obtained for the current period will be adjusted. Write the reference adjustment constant for the next cycle A step-by-step upward adjustment is completed; if the consistency deviation data does not increase, the current benchmark adjustment constant remains unchanged, and the dynamic adjustment coefficient is adjusted accordingly. satisfy: ,in, This is the corrected dynamic adjustment coefficient. This is the baseline adjustment constant used in the current feedback cycle. This is the sensitivity correction factor. For the topology consistency score, all the above parameters are dimensionless. As the consistency deviation data increases, the dynamic adjustment coefficient increases step by step, so that the edge pixels with large local directional dispersion receive a lower weight adjustment coefficient, thereby filtering out the false edge topology connections caused by reflection distortion.
[0032] The spatial alignment unit extracts the set of edge pixels of the target component and obtains the weight adjustment coefficient corresponding to each edge pixel. When constructing the objective function of the affine transformation, the coordinates of each edge pixel are subtracted from the coordinates of the corresponding standard control point in the standard digital coordinate reference system to form the sum of squares of geometric reprojection errors. The weight adjustment coefficient is then used as a product factor to add weight to the corresponding projection error term. Noisy regions with large local directional dispersion and low weight adjustment coefficients contribute less to the objective function. The system uses a weighted least squares estimation algorithm to iteratively solve the objective function, obtaining components including geometric stretching, coordinate translation, and reflection mapping. The affine transformation matrix, representing the relationship between rotation and shearing, ensures that the matrix solution is primarily determined by stable edge features with large weight adjustment coefficients. During global contour topology matching, the spatial scale parameter of the adaptive feature window and the directional attribute of the structural direction vector participate in the calculation: the spatial scale parameter is used to determine the sampling range of the edge features, and the structural direction vector is used to calculate the local directional dispersion and weight adjustment coefficients. Based on this, the spatial alignment unit converts the specular reflection difference of the target component surface material into a geometric topological convergence calculation under a standard digital coordinate reference system, and solves the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system.
[0033] When the digital imaging sensor continuously acquires raw two-dimensional image arrays, the system uses a low-level high-precision timer in the operating system to record the moment when the digital imaging sensor triggers a hardware interrupt after completing exposure and data transmission, and the moment when the image processing thread completes context switching and begins processing the frame data. The difference between these two moments is taken as the hardware-level context switching delay. Based on the speed of the production line conveyor belt, this delay is converted into geometric displacement lag in the pixel coordinate system. In the spatial alignment transformation, the geometric displacement lag of the current frame and the previous two frames, two damping coefficients, and the dynamic time constant determined according to the continuous image acquisition cycle are input into the second-order lag state update process to recursively obtain the two-dimensional geometric deviation at the current sampling moment. This two-dimensional geometric deviation is then used as a second-order lag compensation factor. The second-order hysteresis compensation factor is used to correct the dynamic time constant of the affine transformation matrix between consecutive frames, and extrapolates to compensate for the target component positioning coordinate deviation caused by the computation delay. The corresponding two-dimensional geometric deviation is accumulated to the translation component of the affine transformation matrix in the form of a translation correction vector, so that the hardware-level context switching delay can participate in the matrix update according to the pixel displacement. After the above processing is completed, the spatial alignment unit calls the affine transformation matrix to perform pixel-level geometric stretching, coordinate translation and reflection mapping transformation on the original two-dimensional image array, corrects the projection distortion introduced by the surface specular reflection distortion, completes the digital visual spatial alignment of the target component, and outputs a standardized preprocessed image source without displacement deviation as input data for subsequent image visual feature recognition and object state understanding processes.
[0034] Example 3: In this embodiment, a component positioning system is deployed at the digital vision inspection station of a remote control production line. It processes images of remote control PCB boards containing conductive rubber contacts, copper foil traces, ink screen printing, and surface mount components. The system's digital vision spatial alignment stability is tested under conditions of non-uniform lighting, high surface reflectivity, local specular reflection blurring, and severe ink screen printing breakage. The digital imaging sensor is a monochrome complementary metal-oxide-semiconductor image sensor with a pixel array resolution of 4096×3000 pixels, a frame rate of 60Hz, and a grid pixel size of 3.45μm. The test data consists of 1000 digital images of industrial remote control PCB boards containing surface mount components of various materials.
[0035] When adjusting the size of the adaptive feature window, the system takes into account both local noise suppression and boundary contour geometry preservation during edge contour feature extraction. The system first uses the Sobel operator to calculate the first-order partial derivatives of each pixel grid in the horizontal and vertical directions, and constructs a structure tensor matrix by combining the pixel grid and its neighboring pixels. Then, it calculates the maximum and minimum eigenvalues of the structure tensor, and uses the ratio of their difference to their sum as the local gradient anisotropy, which characterizes the edge intensity. Subsequently, it calculates the difference in local gradient anisotropy between adjacent pixels to obtain the spatial distribution gradient of the local gradient anisotropy. After completing the calculation of the adjacent difference, it uses the Laplacian operator to perform second-order spatial difference on the discrete image formed by the spatial distribution gradient to check for local abrupt changes. A 5×5 pixel sliding calculation window is set around each region to be evaluated, and the mean of the spatial distribution gradient of each pixel within the window is counted. Then, the sum of the squares of the differences between each gradient value and the mean is divided by the total number of pixels to obtain the local variance value, which is used to distinguish between screen printing scratches, minor reflection artifacts, and stable geometric boundaries.
[0036] When the local variance value exceeds the noise threshold of 0.25, the system determines that the area has surface silkscreen roughness or scratch interference, and expands the adaptive feature window to a 7×7 size to cover pixel-level grayscale jumps; when the local variance value is less than 0.10, the system determines that the area is a stable geometric boundary, and converges the adaptive feature window to a 3×3 size to preserve the boundary contour; for the anisotropic distribution caused by highly reflective pseudo-edges and silkscreen cracks, the system extracts the structural gradient of each pixel grid point, calculates the structural direction vector orthogonal to the structural gradient, and extracts the edge contour features of the target component within the adaptive feature window; during testing, a non-uniform specular field with a linear brightness variation from 50 Lux to 800 Lux is superimposed on the digital image set to simulate local specular reflection, while a pixel-level fracture pulse noise with a density of 2% is injected. The feature analysis pre-stage and the topology matching post-stage form a bidirectional feedback control loop, and the topology matching post-stage outputs the topology consistency score. And the consistency deviation data is fed back to the dynamic adjustment coefficient. The calculation process; in the first test state, The value is 0.98, and the corresponding consistency deviation is 0.02. The calculation loop will... The value was determined to be 0.86; for stable trace pixels unaffected by reflection interference, the local directional dispersion was measured. The value is 0.03, and the weight adjustment coefficient is obtained according to the weight adjustment relationship. The value is 0.97, indicating that this local feature continues to participate in global contour topology matching; in the second test state, The consistency deviation decreased to 0.85, while the deviation from the previous value increased to 0.15. The value was gradually increased to 0.91; the corresponding pixel with slight silkscreen scratches... Increased to 0.12, The attenuation was 0.90; in the third test state, the reflective interference increased. The consistency deviation decreased to 0.70, while the deviation from the previous value increased to 0.30. Increased to 0.98; edge pixels with localized pseudo-edge noise. Increased to 0.45, It dropped to 0.69.
[0037] In the fourth test state, the reflection tends to be saturated. The consistency deviation decreased to 0.45, dropping to 0.55. Increased to 1.04; the pixel grid corresponding to the strong interference pseudo-edge pixel grid formed by surface specular reflection. As it rises to 1.20, the non-linear decay of the weighted adjustment relationship causes... The value drops to 0.44. Following topological matching, the contribution of the structural direction vector in that region to the affine transformation matrix solution is reduced. In the fifth test state... The consistency deviation further decreased to 0.40, while the deviation increased to 0.60. Increased to 1.11; the anomalous pulse grid points corresponding to the surface reflection distortion center Reaching 2.50, When the value drops to 0.26, the solution to the affine transformation matrix is dominated by the structural direction vectors with higher weighting coefficients; a control test is used to check the baseline adjustment constant. and sensitivity correction factor The value boundaries, in the sixth test state, the control group Set to 0.55, exceeding the lower protection limit; under the same specular reflection interference conditions, It is 0.40. Reaching 1.20, the calculation loop records The value remains at 0.61. The pseudo-edge contour features continue to participate in global contour topology matching. The affine transformation matrix calculated by the spatial alignment unit produces a spatial positioning drift error of 4.2 pixels in the standard digital coordinate reference system. In the seventh test state, another control group... Set to 0.98, exceeding the protection limit; under clear edge conditions, It is 0.95. The calculated value is 0.05. The value is 0.82. Normal weak contour edge pixels are reduced in global contour topology matching, and the sparse feature points cause the alignment deviation to reach 3.8 pixels.
[0038] The eighth test state is used to check the sensitivity correction factor. The steady-state convergence boundary will After being set to 1.20, exceeding the upper limit, the bidirectional feedback control loop exhibits non-convergent numerical oscillations during alternating iterations. In the subsequently solved affine transformation matrix, the geometric scaling factor frequently jumps between a negative 1.45 and a positive 1.82, preventing the affine transformation computation flow from closing. In the ninth test state, [the following text is incomplete and requires further context: "will..."] When the value is lowered to 0.05, which exceeds the lower limit, the bidirectional feedback control loop exhibits a lag in its response to transient light surges. It cannot be synchronously corrected with the global contour topology matching quality; the spatial position drift under high reflectivity abrupt change conditions still reaches 3.5 pixels; the tenth test state adopts... 0.85 With a parameter combination of 0.50, after experiencing gradient disturbances under all operating conditions, the geometric residual error between the standardized preprocessed image source output by the spatial alignment unit and the standard digital coordinate reference system converges to within 0.12 pixels. This parameter combination suppresses the abnormal features corresponding to surface specular reflection distortion and local fractures in screen printing during weight calculation. The production line mechanical stations maintain their original configurations. The system corrects the affine transformation matrix through pixel-level feature decoupling weighting and bidirectional feedback control loops, reducing positioning drift in the position correction stage and improving the convergence accuracy of subsequent image visual feature recognition and object state understanding processes.
[0039] Example 4: This embodiment combines Figures 1 to 2 This paper describes a method and system for locating remote control PCB board components based on feature matching, such as... Figure 1 As shown, the flow sequence includes step S1, which dynamically adjusts the feature window and extracts edge contour features; step S1 flows backward and triggers step S2, which calculates the directional dispersion and consistency score and solves the weights; step S2 flows backward and triggers step S3, which solves the affine transformation matrix to complete the visual space alignment.
[0040] like Figure 2As shown, the digital imaging sensor interacts collaboratively with the production line conveyor belt. The digital imaging sensor performs continuous acquisition operations on the remote control PCB board on the production line conveyor belt. The digital imaging sensor is equipped with a monochrome complementary metal-oxide-semiconductor (CMOS) image sensor and a low-level high-precision timer. The monochrome CMOS image sensor transmits the acquired raw two-dimensional image array as data input to the feature extraction unit in the image processing thread within the digital vision inspection station. The low-level high-precision timer transmits the hardware-level context switching delay as a signal input to the spatial alignment unit. The digital vision inspection station includes a central processing unit's L2 cache register array, internal control registers, and an image processing thread. The image processing thread is equipped with a field calibration module, a feature extraction unit, a weight calculation unit, and a spatial alignment unit. The field calibration module outputs noise judgment threshold parameters to the internal control register and outputs an initial judgment benchmark signal to the feature extraction unit. The feature extraction unit transmits the calculated local directional dispersion to the weight calculation unit. The weight calculation unit transmits weight adjustment coefficients to the spatial alignment unit. The spatial alignment unit performs pixel mapping operations based on the received inputs and finally generates a standardized preprocessed image source.
[0041] Example 5: In this embodiment, after the digital imaging sensor ages, the light transmission attenuation reduces the overall contrast of the acquired original two-dimensional image array, and the background noise power increases accordingly. To address this condition, the component positioning system adjusts the size and weight adjustment coefficients of the adaptive feature window to maintain the accuracy of edge contour feature extraction for the target component. The system first acquires a test image array containing the vibration noise of the detection line, calculates the two-dimensional distribution of the local gradient at each pixel grid point, and obtains the spatial distribution gradient of the local gradient anisotropy based on the difference in local gradient anisotropy between adjacent pixels. Then, it examines the impact of different noise thresholds on the edge contour accuracy of the target component. In the discretization... In the gradient test, the noise judgment threshold is set to a range of 0.20 to 0.35. When the noise judgment threshold is below 0.20, some background noise is identified as edge contour features, resulting in pseudo edge contours. When the noise judgment threshold is above 0.35, the stable geometric boundaries at the pins of the surface mount components are incorrectly erased. Based on the test results within this range, the noise judgment threshold is determined to be 0.25. When the local variance of the spatial distribution gradient at a specific multi-material reflective interface is 0.26, this local variance is greater than the noise judgment threshold. The system adjusts the adaptive feature window to a 7×7 size to cover local noise and keep the extracted edge contour features within the adaptive feature window continuous.
[0042] When background noise power and image contrast change, the component positioning system determines the noise judgment threshold through pre-calibration. The system acquires multiple static standard images under unobstructed and uniformly illuminated conditions, calculates the spatial distribution gradient of the local gradient anisotropy in the background blank area, and obtains its initial variance mean. Then, 2.5 to 3.0 times this initial variance mean is used as the initial value of the noise judgment threshold to shield background electronic noise. During online acquisition, when the root mean square error of the current environmental noise measured by the digital imaging sensor increases, the data processing unit adjusts the noise judgment threshold according to the noise growth ratio to keep the true geometric boundary and scratch noise under aging imaging conditions distinguishable and reduce disordered jumps in the adaptive feature window size. To check the stability of the bidirectional feedback control loop under dynamic reflection change conditions, the data processing unit adjusts the reference adjustment constant. The sensitivity correction factor is limited to a parameter range of 0.75 to 0.95. Within a parameter range of 0.40 to 0.60, and given the input of component edge contour features containing local reflection distortion, the system calculates the structural orientation vector and its local orientation dispersion of the edge pixels. Simultaneously, the current global topological feature structure is compared with the standard digital coordinate reference system to obtain a topological consistency score. .
[0043] Topology consistency score under reflection saturation conditions Reduced to 0.55, local directional dispersion When the reference adjustment constant reaches 1.15, When the value is below 0.75, the dynamic adjustment coefficient calculated by the bidirectional feedback control loop is... Underweighted response occurs, weighting adjustment coefficient Maintaining a value of 0.68, the edge contour features corresponding to reflection artifacts still participate in global contour topology matching; when the baseline adjustment constant is... When the value is higher than 0.95, the structural orientation vectors within clear and non-reflective regions are excessively suppressed, and the weighting adjustment coefficient... If an unexpected mutation occurs, the system calculates the weight adjustment coefficients under each test state and writes the updated results to the incremental register, while setting the baseline adjustment constant... The sensitivity correction factor was determined to be 0.85. After setting it to 0.50, the weight adjustment coefficient for highly reflective pseudo-edge pixels. The local directional discreteness decreases monotonically and converges stably to 0.44. The contribution of edge contour features caused by surface material reflection differences to global contour topology matching decreases accordingly. In the affine transformation matrix solved by the spatial alignment unit, the scaling factor and rotation factor form a unique numerically stable solution. The spatial positioning drift error of the output standardized preprocessed image source is stably converged to within 0.15 pixels.
[0044] The weighting adjustment coefficient decreases in a reciprocal nonlinear relationship with increasing local directional dispersion, reducing the weight of highly reflective areas in digital visual spatial alignment calculations. The baseline adjustment constant and sensitivity correction factor jointly determine the gain slope of the bidirectional feedback control loop. The baseline adjustment constant ranges from 0.75 to 0.95, with the lower limit of 0.75 determined based on the inherent noise tolerance under no-high-reflectivity conditions. Below 0.75, the suppression of noise edge contour features is insufficient, increasing the system's noise sensitivity. The upper limit of 0.95 is determined based on the minimum contour contrast of the edge image; above 0.95, areas with low image edge contrast... Edge pixels within the area are excessively filtered out, resulting in sparse feature points. The sensitivity correction factor ranges from 0.40 to 0.60, with the lower limit of 0.40 determined based on the feedback response delay at the maximum transmission speed. Below 0.40, the bidirectional feedback control loop responds more slowly to dynamic specular distortion, and the upper limit of 0.60 is determined based on the closed-loop stability boundary of the bidirectional feedback control loop. Above 0.60, the numerical calculation produces non-convergent oscillations. After multiple rounds of iterative debugging, the baseline adjustment constant was determined to be 0.85, and the sensitivity correction factor was determined to be 0.50, so that the damping ratio and transition time are matched, and the error is stably converged.
[0045] Example 6: In this embodiment, when a new batch of remote control PCB boards is first connected to the testing line, the on-site calibration module retrieves 200 preset static sample digital images from a standard low-noise alignment reference station with known illumination uniformity, and writes the data stream into the L2 cache register array of the central processing unit. Subsequently, the feature analysis pre-stage selects a bare substrate blank area without silkscreen or copper foil in the sample images and calculates the local gradient two-dimensional distribution state of each pixel grid in the area. Finally, based on the difference in local gradient anisotropy between adjacent pixels, the spatial distribution gradient of local gradient anisotropy is obtained. At the same time, the pixel-level gray-scale difference amplitude of the bare substrate blank area under an ideal homogeneous surface is statistically analyzed, and three times the mean square error of the spatial distribution gradient obtained from multiple samplings is used as the initial calibration residual value. Based on this, the noise judgment threshold in the internal control register is updated to form the initial judgment benchmark under the new working condition.
[0046] After the pre-calibration is completed, the component positioning system receives the original two-dimensional image array continuously acquired by the digital imaging sensor during the dynamic conveying process of the production line. When solder paste overflows or ink wear occurs on the pins of the surface mount components, the feature analysis stage extracts the structural direction vector of the edge pixels and calculates the local direction dispersion. The topology matching stage compares the current global topology feature structure composed of edge contour features with the standard digital coordinate reference system to obtain the topology consistency score and consistency deviation data, and corrects the dynamic adjustment coefficient through a two-way feedback control loop.
[0047] As the collinear distribution of edge contour features is disrupted, the local directional dispersion monotonically increases, and the weight adjustment coefficient corresponding to the target pixel decreases accordingly. This reduces the contribution of pseudo-edge topological connections formed by solder paste overflow or ink surface wear to the global contour topological matching. The spatial alignment unit uses the updated weight adjustment coefficient to solve the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system. Based on this matrix, it performs pixel-level geometric stretching, coordinate translation, and reflection mapping transformations on the original two-dimensional image array to complete the digital visual spatial alignment of the target components. The output is a standardized preprocessed image source with a stable geometric residual error within 0.15 pixels.
Claims
1. A feature matching-based remote controller PCB component positioning method, characterized in that, Includes the following steps: Step S1: Obtain the original two-dimensional image array of the remote control PCB board containing the target component, calculate the local gradient two-dimensional distribution state of each pixel grid point in the original two-dimensional image array, dynamically adjust the initial size range of the adaptive feature window based on the spatial distribution gradient of the local gradient anisotropy of each pixel region in the original two-dimensional image array, and extract the edge contour features of the target component within the adaptive feature window; wherein, in areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise; in areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to improve the extraction speed; Step S2: Calculate the local directional dispersion of the structural direction vectors of each edge pixel within the adaptive feature window. Compare the topological consistency score between the current global topological feature structure composed of edge contour features and the preset standard digital coordinate reference system. Based on the local directional dispersion and the dynamic adjustment coefficients that are dynamically corrected in real time by the reverse feedback mechanism of the topological consistency score, calculate the corresponding weight adjustment coefficients to characterize the feature confidence level of different regions. Specifically, when calculating the local directional dispersion, first convert the structural direction vector of each edge pixel into an unsigned double-angle representation to eliminate the influence of positive and negative polarities. Then, statistically analyze the collinearity distribution of the converted direction angles within the adaptive feature window and calculate the standard deviation of the collinearity distribution as the local directional dispersion. In the computational loop, construct a bidirectional feedback control loop between the feature analysis pre-stage and the topology matching post-stage. The topology matching post-stage calculates the topological consistency score based on the Hausdorff distance between the feature point set and the standard control point set, as well as the Hadamard product of the graph structure adjacency matrix. Obtain consistency deviation data that quantifies the spatial topological convergence quality and feeds back the consistency deviation data. In the calculation of the weight adjustment coefficient, the dynamic adjustment coefficient is dynamically adjusted by combining the preset benchmark adjustment constant and sensitivity correction factor. Based on this, the weight adjustment coefficient is calculated, and the false edge topology connections caused by reflection distortion are filtered out in situ. The process of dynamically adjusting the dynamic adjustment coefficient includes the following sub-steps: a benchmark adjustment constant and a sensitivity correction factor are introduced into the bidirectional feedback control loop. The benchmark adjustment constant is set to 0.85, and the sensitivity correction factor is set to 0.
50. Based on the consistency deviation data and the sensitivity correction factor, the benchmark adjustment constant is adjusted stepwise to complete the correction of the dynamic adjustment coefficient. In the first workpiece form where there is no specular reflection on the surface of the target component and the silkscreen edge is clear, the local directional dispersion approaches 0, and the topology consistency score reaches the maximum critical value of 1, thereby driving the weight adjustment coefficient to reach the maximum boundary value of 1 and preserving local features. In the second workpiece form where there is high reflection on the surface of the target component, which causes edge distortion and generates artifacts, the increased local directional dispersion is obtained, and combined with the reduced topology consistency score, the weight adjustment coefficient of the corresponding noise region is reduced. For any target pixel in the original two-dimensional image array A 5×5 pixel window is set around the target pixel, and the structural orientation vectors of all pixels within the window are counted to obtain the local orientation dispersion. Target pixel Corresponding weight adjustment coefficient satisfy: ,in, For target pixel The corresponding weight adjustment coefficient, This is a dynamic adjustment coefficient. The three factors represent local directional dispersion and are all dimensionless; among them, the sensitivity correction factor... To characterize the feedback compensation gain, the consistency deviation data is calculated by subtracting the topology consistency score from 1. It is obtained that each feedback cycle is adjusted using the current benchmark constant. Calculate the dynamic adjustment coefficient When the consistency deviation data for the current period is greater than that for the previous period, the dynamic adjustment coefficient obtained for the current period will be adjusted. Write the reference adjustment constant for the next cycle A step-by-step upward adjustment is completed; if the consistency deviation data does not increase, the current benchmark adjustment constant remains unchanged, and the dynamic adjustment coefficient is adjusted accordingly. satisfy: ,in, This is the corrected dynamic adjustment coefficient. This is the baseline adjustment constant used in the current feedback cycle. This is the sensitivity correction factor. For the topology consistency score, all the above parameters are dimensionless; as the consistency deviation data increases, the dynamic adjustment coefficient increases step by step, so that the edge pixels with large local directional dispersion obtain a lower weight adjustment coefficient, thereby filtering out the false edge topology connections caused by reflection distortion. Step S3 involves using weight adjustment coefficients to perform global contour topology matching, solving the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system, and performing pixel-level geometric stretching, coordinate translation, and reflection mapping transformations on the original two-dimensional image array based on the affine transformation matrix. This corrects the projection distortion introduced by surface specular reflection distortion, completing the digital visual spatial alignment of the target component. Specifically, the hardware-level context switching delay generated by the digital imaging sensor during continuous acquisition of the original two-dimensional image array is read, and the hardware-level context switching delay is converted into geometric displacement lag in the pixel coordinate system. A second-order lag compensation factor is introduced in the spatial alignment transformation to dynamically correct the time constant of the solved affine transformation matrix, and extrapolation compensation is performed to compensate for the target component positioning coordinate deviation caused by the calculation delay.
2. The method for locating remote control PCB board components based on feature matching according to claim 1, characterized in that, Step S1 includes the following sub-steps: Step S11, analyze the local gradient anisotropy of each pixel in the original two-dimensional image array, and calculate the spatial distribution gradient between adjacent pixels.
3. The method for locating remote control PCB board components based on feature matching according to claim 1, characterized in that, Step S2 includes the following sub-steps: Step S21, extract the structural gradient of each pixel in the adaptive feature window, and obtain the structural direction vector orthogonal to the structural gradient.
4. The method for locating remote control PCB board components based on feature matching according to claim 1, characterized in that, Step S3 includes the following sub-steps: Step S31, combining the spatial scale change of the adaptive feature window with the attribute decoupling of the structural direction vector, and converting the specular reflection difference of the surface material of the target component into a geometric topological convergence calculation under a preset standard digital coordinate reference system; Step S32, applying the solved affine transformation matrix to perform pixel mapping on the original two-dimensional image array, eliminating the rotation and displacement deviations caused by the lens angle and the initial workpiece deflection, and outputting the aligned standardized preprocessed image source.
5. The method for locating remote control PCB board components based on feature matching according to claim 1, characterized in that, Step S1 includes the following sub-steps: Step S12, using a digital imaging sensor to acquire a digital shape image of the remote control PCB board containing the target components, and converting the digital shape image into an original two-dimensional image array; Step S13, performing grayscale denoising and scaling processing on the original two-dimensional image array, and establishing an initial mapping reference between the original two-dimensional image array and a preset standard digital coordinate reference system.
6. A component positioning system for a remote control PCB board based on feature matching, used to implement the component positioning method for a remote control PCB board based on feature matching as described in claim 1, characterized in that, include: The feature extraction unit is used to acquire the original two-dimensional image array of the remote control PCB board containing the target component, calculate the local gradient two-dimensional distribution state of each pixel grid in the original two-dimensional image array, dynamically adjust the initial size range of the adaptive feature window based on the spatial distribution gradient of the local gradient anisotropy of each pixel region in the original two-dimensional image array, and extract the edge contour features of the target component within the adaptive feature window; wherein, in areas where the spatial distribution gradient indicates the presence of surface silkscreen roughness or scratch noise, the size of the adaptive feature window is determined to be 7×7 to cover local noise; in areas where the spatial distribution gradient indicates the presence of stable geometric boundaries, the size of the adaptive feature window is converged to 3×3 to improve the extraction speed. The weight calculation unit is used to calculate the local directional dispersion of the structural direction vector of each edge pixel within the adaptive feature window. It compares the current global topological feature structure composed of edge contour features with the preset standard digital coordinate reference system to obtain a topological consistency score. Based on the local directional dispersion and a dynamic adjustment coefficient that is dynamically corrected in real time by the topological consistency score feedback mechanism, it calculates the corresponding weight adjustment coefficient to characterize the feature confidence level of different regions. Specifically, when calculating the local directional dispersion, the structural direction vector of each edge pixel is first converted to an unsigned double-angle representation to eliminate the influence of positive and negative polarities. Then, the collinearity distribution of the converted direction angles within the adaptive feature window is statistically analyzed, and the standard deviation of the collinearity distribution is calculated as the local directional dispersion. A bidirectional feedback control loop is constructed between the feature analysis pre-stage and the topology matching post-stage in the calculation loop. The topology matching post-stage calculates the topological consistency score based on the Hausdorff distance between the feature point set and the standard control point set, as well as the Hadamard product of the graph structure adjacency matrix. This obtains consistency deviation data that quantifies the spatial topological convergence quality, and the consistency deviation data is then... The reverse feedback to the weight adjustment coefficient calculation stage combines a preset baseline adjustment constant and a sensitivity correction factor to dynamically adjust the dynamic adjustment coefficient, thereby solving the weight adjustment coefficient and filtering out false edge topological connections caused by reflection distortion in situ. The dynamic adjustment coefficient correction process includes: introducing a baseline adjustment constant and a sensitivity correction factor into the bidirectional feedback control loop, setting the baseline adjustment constant to 0.85 and the sensitivity correction factor to 0.50; adjusting the baseline adjustment constant stepwise based on consistency deviation data and the sensitivity correction factor to correct the dynamic adjustment coefficient; in the first workpiece form where there is no specular reflection on the target component surface and the silkscreen edge is clear, the local directional dispersion approaches 0, and the topological consistency score reaches the maximum critical value of 1, thus driving the weight adjustment coefficient to reach the maximum boundary value of 1, preserving local features; in the second workpiece form where there is high reflection on the target component surface leading to edge distortion and artifact generation, the increased local directional dispersion is obtained, and combined with the reduced topological consistency score, the weight adjustment coefficient for the corresponding noise region is lowered; for any target pixel in the original two-dimensional image array... A 5×5 pixel window is set around the target pixel, and the structural orientation vectors of all pixels within the window are counted to obtain the local orientation dispersion. Target pixel Corresponding weight adjustment coefficient satisfy: ,in, For target pixel The corresponding weight adjustment coefficient, This is a dynamic adjustment coefficient. The three factors represent local directional dispersion and are all dimensionless; among them, the sensitivity correction factor... To characterize the feedback compensation gain, the consistency deviation data is calculated by subtracting the topology consistency score from 1. It is obtained that each feedback cycle is adjusted using the current benchmark constant. Calculate the dynamic adjustment coefficient When the consistency deviation data for the current period is greater than that for the previous period, the dynamic adjustment coefficient obtained for the current period will be adjusted. Write the reference adjustment constant for the next cycle A step-by-step upward adjustment is completed; if the consistency deviation data does not increase, the current benchmark adjustment constant remains unchanged, and the dynamic adjustment coefficient is adjusted accordingly. satisfy: ,in, This is the corrected dynamic adjustment coefficient. This is the baseline adjustment constant used in the current feedback cycle. This is the sensitivity correction factor. For the topology consistency score, all the above parameters are dimensionless; as the consistency deviation data increases, the dynamic adjustment coefficient increases step by step, so that the edge pixels with large local directional dispersion obtain a lower weight adjustment coefficient, thereby filtering out the false edge topology connections caused by reflection distortion. The spatial alignment unit is used to perform global contour topology matching using weight adjustment coefficients, solve the affine transformation matrix that maps the current global topological feature structure to the standard digital coordinate reference system, and perform pixel-level geometric stretching, coordinate translation, and reflection mapping transformation on the original two-dimensional image array based on the affine transformation matrix. This corrects the projection distortion introduced by surface specular reflection distortion and completes the digital visual spatial alignment of the target components. Specifically, it reads the hardware-level context switching delay generated by the digital imaging sensor when continuously acquiring the original two-dimensional image array, converts the hardware-level context switching delay into geometric displacement lag in the pixel coordinate system, and introduces a second-order lag compensation factor in the spatial alignment transformation. This dynamically corrects the time constant of the solved affine transformation matrix and extrapolates to compensate for the target component positioning coordinate deviation caused by the calculation delay.
Citation Information
Patent Citations
An Automatic PCB Component Location Method Based on Graph Convolutional Neural Networks
CN113674207B
Automatic testing method and system for vehicle-mounted PCB mainboard
CN120801983A
Method and system for detecting edge deviation of appearance based on welding component and PCB (Printed Circuit Board)
CN121661085A
Metal membrane piece position correction method and system based on improved template matching
CN121685633A
Carrier positioning and control method and system based on machine vision
CN121722115A
