A computer vision-based precision assembly online quality detection system

By employing multi-view fruit fly registration and sub-pixel edge extraction techniques, combined with optical flow tracking and Kalman filtering, and decoupling error characteristics, the edge positioning and pose drift problems caused by occlusion and vibration in precision assembly were solved, achieving high-precision and stable assembly quality judgment.

CN122492665APending Publication Date: 2026-07-31GUIXIANG PRECISE MECHANICS (SUZHOU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIXIANG PRECISE MECHANICS (SUZHOU) CO LTD
Filing Date
2026-05-25
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In the precision assembly process, existing technologies face challenges such as local feature occlusion making micron-level edge localization difficult, single-view images failing to extract true edges, dynamic vibrations causing pose drift, and multi-source error coupling leading to unstable assembly quality judgments.

Method used

We reconstruct the contours of real parts using multi-view fruit fly registration and sub-pixel edge extraction techniques. We combine optical flow tracking and Kalman filtering to suppress vibrations and decouple error features. We then use fruit fly-optimized SVM for feature-weighted decision-making.

Benefits of technology

It achieves stable extraction of real edges under conditions of partial occlusion and vibration, suppresses pose drift, dynamically decouples errors, and improves the accuracy and robustness of assembly quality judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492665A_ABST
    Figure CN122492665A_ABST
Patent Text Reader

Abstract

This invention relates to the field of precision manufacturing technology, specifically disclosing a computer vision-based online quality inspection system for precision assembly. The system includes a collaborative control platform, which is communicatively connected to the following modules: an occlusion edge reconstruction module, used to integrate the global optimization capability of the fruit fly algorithm with the illumination invariance of phase-consistent edge detection to reconstruct the true part contour from multi-view images; and a vibration suppression pose tracking module, used to combine the Kalman filter's ability to suppress dynamic noise with the optical flow field's ability to track local feature points over time to construct a pose deviation time series. By integrating multi-view image information with phase-consistent edge detection technology, this invention can stably extract the true part edges under production line conditions of partial occlusion and illumination fluctuations, effectively overcoming edge breakage and false edge interference in single-view images, and providing a continuous, smooth, and closed sub-pixel accuracy contour foundation for subsequent precision measurements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision manufacturing technology, and in particular to an online quality inspection system for precision assembly based on computer vision. Background Technology

[0002] With the continuous development of technology, the automation and intelligence of the production process are becoming increasingly higher. Traditional manual inspection methods can no longer meet the requirements of high-precision and high-efficiency production. Therefore, online quality inspection for precision assembly has emerged. It mainly uses sensors, image processing technology, laser scanning and other means to monitor and evaluate product quality in real time during the assembly process, so as to ensure the accuracy and stability of the assembly process.

[0003] For example, the assembly quality inspection method and device in Chinese Patent Publication No. CN114723712A obtains the optimal screw assembly quality inspection method through a trained generative adversarial network. This avoids the limitation of low efficiency in relying on human experience to inspect fastening components, greatly reducing labor and time costs, and does not affect the motor production process. It realizes a highly automated inspection process without human intervention, thus solving the problem of low inspection efficiency of existing screw assembly quality inspection methods in motors.

[0004] In existing production lines, there is a problem of micron-level edge localization under local feature occlusion. The mutual occlusion of small parts makes it difficult to extract the true edges from single-view images, which undermines the basis for subsequent gap and alignment measurements. Furthermore, dynamic vibration interference can cause relative pose drift tracking problems. Low-frequency vibrations in the production line cause micron-level continuous drift in the relative pose between parts that have been initially located. Static vision models cannot maintain the temporal consistency of pose. In addition, the edge loss caused by local occlusion and the pose fluctuations introduced by dynamic vibration are coupled with each other, forming a comprehensive assembly quality judgment problem under multi-source error coupling. Errors in key indicators such as gap and coplanarity are superimposed and intertwined. Single or discrete threshold judgment logics frequently produce false alarms and false alarms, making it difficult to make stable judgments on assembly quality. To address these problems, a precision assembly online quality inspection system based on computer vision is proposed. Summary of the Invention

[0005] To overcome the shortcomings of the prior art, the present invention provides a precision assembly online quality inspection system based on computer vision, which can effectively solve the problems involved in the prior art.

[0006] The objective of this invention can be achieved through the following technical solution: This invention provides a precision assembly online quality inspection system based on computer vision, including a collaborative control platform, wherein the collaborative control platform is communicatively connected to the following modules: The occlusion edge reconstruction module is used to reconstruct the continuous, sub-pixel precision real part contour from multi-view images under actual production line conditions of local occlusion and micron-level edge blurring. It combines the global optimization capability of the fruit fly algorithm with the illumination invariance of phase-consistent edge detection to eliminate edge breakage and false edge interference caused by occlusion. The vibration suppression pose tracking module is designed to address the micron-level continuous drift in relative pose caused by low-frequency vibrations on the production line. It combines the ability of Kalman filtering to suppress dynamic noise with the ability of optical flow field to track local feature points in a time sequence, and constructs a pose deviation time series after eliminating random jitter, so as to achieve stable and continuous tracking of the relative pose between parts. The coupling error feature extraction module is used to dynamically decouple the dual modulation effect of production line vibration and local occlusion on multi-source error features including gap, parallelism and coplanarity based on the joint alignment of edge and pose. It extracts the original error components and their cross-coupling terms with physical interpretability, forming an initial multi-dimensional feature set for quality classification, and successfully decouples the dual modulation of vibration and occlusion. The fruit fly optimization SVM feature weighting module is used to perform nonlinear weight search on the initial multidimensional feature set using the global optimization capability of the fruit fly algorithm. Based on the contribution and redundancy of multi-source error features to the assembly state judgment, it optimizes the penalty coefficient of each feature dimension of the support vector machine, eliminates the discrimination bias caused by the difference in dimensions and error coupling, outputs the optimal discriminative feature subspace after weighting, and automatically identifies and removes redundant features. The assembly quality judgment module is used to establish the assembly quality classification boundary based on the optimal discriminative feature subspace, transform multi-source error features into stable and interpretable qualified / unqualified / warning judgments, and simultaneously reverse-locate the dominant error source that causes the judgment anomaly, forming a closed-loop quality judgment mechanism from feature input to judgment output and then to cause feedback.

[0007] Preferably, the occlusion edge reconstruction module includes a multi-view fruit fly registration unit and a sub-pixel edge extraction unit; The multi-view fruit fly registration unit is used to perform fast sub-pixel level registration of images from multiple cameras on the production line using the fruit fly algorithm, optimize the geometric transformation parameters between viewpoints, solve the problem of registration error accumulation when different viewpoint information is complementary due to occlusion, realize sub-pixel level alignment of multi-view images, and eliminate registration error accumulation. The subpixel edge extraction unit extracts illumination-insensitive edge responses in the frequency domain based on phase-consistent edge detection, and optimizes the local phase interpolation strategy using the fruit fly algorithm. It then interpolates and reconstructs continuous subpixel edges at occlusion boundaries, outputting smooth, closed, realistic part contours. It also smoothly reconstructs continuous edges at occlusion boundaries, outputting closed contours.

[0008] Preferably, the multi-view fruit fly registration unit specifically includes: Images of partially occluded parts acquired by multiple cameras in the production line at the same time are collected. FAST corner points and BRISK descriptors are extracted from images from each viewpoint to construct a set of multi-view feature point pairs, which serve as the initial population individual position encoding for the fruit fly algorithm. The multi-view features are complementary, effectively eliminating blind spots caused by single-view occlusion. Using the parameters of the homography matrix between viewpoints as the search space, the taste concentration determination function of individual fruit flies is defined as the reciprocal of the reprojection error of feature points. This guides the fruit fly population to iteratively approach the optimal registration parameters through olfactory search and visual localization, achieving global optimization registration and significantly reducing geometric deviation between viewpoints. The subpixel homography matrix obtained by the fruit fly algorithm is refined by LM nonlinear optimization, and the images from each viewpoint are uniformly transformed to the reference viewpoint coordinate system. The output is a multi-view aligned image that eliminates the accumulation of information complementarity registration error caused by occlusion, achieving subpixel alignment and completely solving the problem of registration error accumulation.

[0009] Preferably, the sub-pixel edge extraction unit specifically includes: On multi-view aligned images, a Log-Gabor filter bank is used to calculate the phase consistency response at multiple scales and directions, extract the illumination-insensitive edge response map, suppress the interference of production line illumination changes on edge detection, and effectively eliminate false edges caused by illumination fluctuations. For candidate edge points in the phase consistency response map, with the goal of minimizing the local phase interpolation residual, the fruit fly algorithm is used to optimize the phase model parameters within the sub-pixel interpolation window, and the continuous geometric direction of the broken edge is reconstructed at the occlusion boundary. The sub-pixel edge fragments reconstructed from each viewpoint are back-projected and fused through multi-view geometric transformation relationships. After edge connection and closed contour tracking, a smooth and unbroken real part contour point cloud sequence is output, with continuous and gap-free output contours.

[0010] Preferably, the vibration suppression pose tracking module includes an optical flow feature field tracking unit and a Kalman pose filtering unit; The optical flow feature field tracking unit is used to extract stable feature points from the real part contour, calculate the motion vector of feature points between adjacent frames using sparse optical flow field, capture instantaneous pose fluctuations caused by vibration in real time, transform low-frequency vibrations of the production line into a visualized instantaneous pose fluctuation sequence, capture instantaneous fluctuations caused by vibration in real time, and realize vibration visualization and quantification. The Kalman pose filtering unit is used to take the instantaneous pose fluctuation sequence of the optical flow output as the observation input, and utilize the state prediction and measurement update mechanism of the Kalman filter to perform optimal estimation and smoothing suppression of vibration noise, outputting a smooth and time-consistent micron-level pose drift trajectory, effectively filtering out random jitter noise.

[0011] Preferably, the optical flow feature field tracking unit specifically includes: From the real part contours output by the occlusion edge reconstruction module, sub-pixel-level stable feature points are selected according to the curvature extrema and edge endpoint constraints, and an initial candidate set for feature point matching between adjacent frames is constructed, which significantly improves the repeatability and matching reliability of feature points. The Lucas-Kanade sparse optical flow method is used to calculate the optical flow motion vector of feature points layer by layer from the top to the bottom of the image pyramid, thereby obtaining the relative instantaneous pose fluctuation sequence between parts caused by vibration, and realizing sub-pixel level fluctuation capture under large dynamic range vibration. For feature point loss caused by excessive vibration amplitude or edge occlusion during optical flow tracking, the system performs re-detection and re-initialization of failed feature points based on contour geometry constraints to maintain the continuity and coverage of the fluctuation sequence, effectively suppress tracking interruption, and ensure long-term stable output of pose fluctuations.

[0012] Preferably, the Kalman pose filtering unit specifically includes: Using the instantaneous pose fluctuation sequence as the observation input, a linear discrete Kalman filter model with pose deviation and its rate of change as state variables is established. The initial covariance matrix of process noise and observation noise is set to effectively filter out high-frequency random jitter and retain the true pose change trend. State prediction is performed within each frame time step, prior pose deviation is estimated, and measurement updates are performed using the observation fluctuations of the current frame to obtain the optimal estimate of the posterior pose deviation. This achieves dynamic weighted fusion of observation noise and prediction values, thereby improving the pose estimation accuracy. The optimal posterior estimate is fed back to the next frame prediction stage to form a closed-loop iteration. After filtering and smoothing for multiple consecutive frames, a micron-level relative pose drift trajectory sequence is output, eliminating random jitter and high-frequency noise components. The output is a smooth, continuous, and time-consistent stable pose trajectory.

[0013] Preferably, the coupling error feature extraction module specifically includes: Align the real part contour output by the occlusion edge reconstruction module with the pose drift trajectory output by the vibration suppression pose tracking module in a unified spatiotemporal coordinate system, establish a joint description model of edge spatial distribution and pose temporal change, realize sub-pixel spatiotemporal synchronization of edge and pose, and lay the foundation for multi-source error decoupling. Based on the joint description model, the dynamic gap deviation under vibration modulation, the static coplanarity deviation under the influence of shading, and the parallelism nonlinear error term generated by the cross-coupling of the two are extracted to form the original error component set, thereby realizing the physical separation of vibration and shading effects and quantifying the independent contribution of each error source. The original error components are subjected to dimensional unification and outlier truncation to construct an initial multidimensional feature set containing the main effect term and the second-order cross-coupling term, thereby eliminating dimensional differences and abnormal interference.

[0014] Preferably, the fruit fly optimized SVM feature weighting module specifically includes: Using the initial multidimensional feature set as input, the search space of individual fruit fly populations is set as the SVM penalty coefficient weight vector of each feature dimension. The taste concentration determination function is defined as the classification accuracy of the weighted features on the validation set, effectively screening out the key feature dimensions most sensitive to assembly quality. The Drosophila population is driven to iteratively update the weight vector through olfactory random search and visual group localization. Based on the contribution of each feature to the assembly state decision, the effective feature weight is increased and the redundant feature weight is compressed, which significantly suppresses the interference of redundant features on classification decision. After convergence, the optimal weight vector is output, and the original feature matrix is ​​subjected to a dimension-wise weighted transformation to generate the optimal discriminative feature subspace and its corresponding weighted kernel function that eliminate the discriminative bias caused by the difference in dimensions and the coupling of errors. This makes the classification boundary more sensitive to key features and significantly improves the overall decision accuracy.

[0015] Preferably, the assembly quality judgment module specifically includes: In the optimal discriminative feature subspace, a radial basis function kernel function SVM is used to train the assembly quality classifier. The penalty parameter and kernel parameter are optimized by grid search. Three-class decision boundaries of qualified, unqualified and warning are established, which significantly reduces the false alarm and false alarm rates and achieves stable and reliable three-class quality distinction. For the feature vector input by online detection, the classifier outputs the judgment category and the confidence level of the distance from the judgment boundary. When the judgment is unqualified or a warning is issued, the reverse location process of the abnormal cause is triggered, providing a quantifiable judgment reliability index and identifying critical quality states in advance. In the reverse positioning process, the contribution ratio of each original error component is calculated based on the feature weights and SHAP values. The dominant anomaly source is located as occlusion effect or vibration drift or its coupling term. The judgment result with cause label is output to the collaborative control platform to realize transparent tracing of the anomaly root cause and provide a clear basis for closed-loop adaptive control.

[0016] Compared with the prior art, the beneficial effects of the present invention are: 1. This precision assembly online quality inspection system based on computer vision integrates multi-view image information with phase consistency edge detection technology. It can stably extract the real parts edges under production line conditions of partial occlusion and light fluctuation, effectively overcome edge breakage and false edge interference in single-view images, and provide a continuous, smooth, and closed sub-pixel accuracy contour basis for subsequent precision measurement.

[0017] 2. This precision assembly online quality inspection system based on computer vision, through a hybrid architecture of optical flow tracking and optimal estimation filtering, can capture and effectively suppress micron-level continuous relative pose drift caused by low-frequency vibrations on the production line in real time, and output smooth pose trajectories with temporal consistency, thus solving the inherent defect that static vision models cannot maintain temporal stability.

[0018] 3. This precision assembly online quality inspection system based on computer vision can dynamically decouple the dual modulation effect of vibration and occlusion on key assembly indicators such as gap and coplanarity based on edge and pose joint alignment, and extract the original error components and their cross-coupling terms with clear physical meaning, thus avoiding information confusion caused by single error indicator discrimination.

[0019] 4. This precision assembly online quality inspection system based on computer vision utilizes a global optimization algorithm to perform nonlinear weight search on multi-source error features. It adaptively adjusts the weights based on the contribution of each feature to the assembly state judgment, eliminating the discrimination bias caused by dimensional differences and error coupling, and significantly improving the generalization ability and robustness of the classifier under different production line conditions. Attached Figure Description

[0020] Figure 1 This is a schematic diagram illustrating the workflow of a computer vision-based precision assembly online quality inspection system according to the present invention. Figure 2 This is a schematic diagram of the module structure of a precision assembly online quality inspection system based on computer vision according to the present invention. Detailed Implementation

[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0022] Example 1, please refer to Figure 1 , Figure 2 This invention provides a technical solution: a precision assembly online quality inspection system based on computer vision, including a collaborative control platform, which is communicatively connected to the following modules: The occlusion edge reconstruction module is used to reconstruct the continuous, subpixel-precision real part contour from multi-view images under actual production line conditions of local occlusion and micron-level edge blurring. It combines the global optimization capability of the fruit fly algorithm with the illumination invariance of phase-consistent edge detection. It eliminates edge breaks and false edge interference caused by occlusion, effectively restores the real edge contour of the occluded part, and achieves subpixel-level reconstruction accuracy. The occlusion edge reconstruction module includes a multi-view fruit fly registration unit and a subpixel edge extraction unit. The multi-view fruit fly registration unit is used to perform fast sub-pixel level registration of images from multiple cameras on the production line using the fruit fly algorithm. It optimizes geometric transformation parameters between viewpoints, solves the problem of registration error accumulation when different viewpoints are complementary due to occlusion, achieves sub-pixel level alignment of multi-view images, eliminates registration error accumulation, acquires partially occluded part images from multiple cameras on the production line at the same time, extracts FAST corner points and BRISK descriptors from each viewpoint image, constructs a multi-view feature point pair set as the initial population individual position encoding for the fruit fly algorithm, and achieves multi-view feature complementarity, effectively eliminating single-view errors. To address the blind zone caused by occlusion, the homography matrix parameters between viewpoints are used as the search space. The flavor concentration determination function for individual fruit flies is defined as the reciprocal of the reprojection error of feature points. This guides the fruit fly population to iteratively approach the optimal registration parameters through olfactory search and visual localization, achieving global optimization registration and significantly reducing geometric deviations between viewpoints. The sub-pixel level homography matrix obtained by the fruit fly algorithm is refined using LM nonlinear optimization. The images from each viewpoint are uniformly transformed to the reference viewpoint coordinate system, outputting a multi-view aligned image that eliminates the accumulation of information complementarity registration errors caused by occlusion. This sub-pixel level alignment completely solves the problem of registration error accumulation. It should be noted that in the actual production line, three 5-megapixel industrial cameras are evenly distributed at a 120° angle around the workstation to be tested. These cameras simultaneously capture grayscale images of partially occluded parts. A three-layer image pyramid is constructed for each image, and FAST corner points are extracted from each layer. The corner detection threshold is set to 30, the non-maximum suppression radius is 10 pixels, and a 64-dimensional binary descriptor is generated using the BRISK algorithm. Cross-view feature matching is performed based on the Hamming distance between the descriptors, with a distance threshold of 50. Matching pairs are retained, and each pair... The difference in coordinates of the matching points is used as the positional encoding of individual fruit fly individuals in the population. The population size is set to 30, and the initial range of individual positions is limited to the [-15, 15] pixel interval, corresponding to the search space of the translation parameters of the homography matrix. The flavor concentration determination function for each fruit fly individual is defined as the reciprocal of the mean of the reprojection error of all matching feature points. The reprojection error is calculated using the Euclidean distance between the coordinates of the projected points after homography matrix transformation and the coordinates of the target feature points. During the olfactory search phase, each fruit fly individual randomly moves within the [-2, 2] pixel neighborhood of its current position. In the visual localization stage, individuals with the highest taste concentration in the population are selected, and all individuals are gathered towards this optimal location. The above two stages are iteratively executed, with a maximum number of iterations of 50. The search is terminated early when the rate of change of the global optimal concentration is less than 0.1% in 5 consecutive iterations, and the sub-pixel-level optimal homography matrix parameters are output. The optimal homography matrix obtained by the fruit fly algorithm is used as the initial value of the LM algorithm. The sum of squared reprojection errors of all matching feature point pairs is used as the objective function. The initial value of the damping factor of the LM algorithm is set to 0.01, the maximum number of iterations is 30, and the gradient threshold is 1e-6. The damping factor is dynamically adjusted according to the error reduction rate during the iteration process. The optimization is stopped when the error change is less than 1e-4, and the refined homography matrix is ​​obtained. Using the coordinate system of the intermediate view camera as the reference, the refined homography matrix is ​​applied to the images of the other two viewpoints for bilinear interpolation transformation, and three geometrically aligned multi-view images are output. The registration accuracy reaches 0.15 pixels, effectively eliminating the problem of registration error accumulation when the viewpoint information is complementary due to occlusion. The subpixel edge extraction unit extracts illumination-insensitive edge responses in the frequency domain based on phase-consistent edge detection. It combines the fruit fly algorithm to optimize the local phase interpolation strategy, interpolating and reconstructing continuous subpixel edges at occlusion boundaries, outputting smooth and closed realistic part contours. It also smoothly reconstructs continuous edges at occlusion boundaries, outputting closed contours. On multi-view aligned images, the Log-Gabor filter bank is used to calculate phase-consistent responses at multiple scales and directions to extract illumination-insensitive edge response maps, suppressing the interference of production line illumination changes on edge detection and effectively eliminating false edges caused by illumination fluctuations. For candidate edge points in the phase-consistent response map, with the goal of minimizing local phase interpolation residuals, the fruit fly algorithm is used to optimize the phase model parameters within the subpixel interpolation window, reconstructing the continuous geometric direction of broken edges at occlusion boundaries. The subpixel edge segments reconstructed from each viewpoint are back-projected and fused through multi-view geometric transformation relationships. After edge connection and closed contour tracking, a smooth and unbroken realistic part contour point cloud sequence is output, with continuous and gap-free output contours. It should be noted that, on three multi-view images with sub-pixel-level geometric alignment completed, four-scale and six-directional Log-Gabor filter banks were constructed respectively. The minimum wavelength was set to 3 pixels, the scale factor was 2, the directional spacing was 30°, and the filter bandwidth was controlled within one octave. For each pixel location, the local phase-consistency response value in each direction at each scale was calculated, and the maximum value in all directions was taken as the edge response intensity of that pixel, forming a phase-consistency edge response map. To suppress false edges introduced by production line illumination fluctuations, an edge response threshold of 0.35 was set, and only candidate edge points with response values ​​higher than this threshold were retained. Simultaneously, isolated noise regions (connected area less than 5 pixels) are filtered out, and four illumination-insensitive edge response maps (corresponding to three viewpoints plus a reference viewpoint) are output. On the phase-consistent edge response map, a 5×5 pixel local interpolation window is established with the candidate edge point as the center. For each pixel in the window, its phase angle value in different directions is extracted, and a second-order Fourier series model is used to fit the phase distribution in the window. The fruit fly population size is defined as 20, and the position code of each individual corresponds to four undetermined coefficients of the Fourier model. The initial search range is limited to [-0.5, 0.5] radians. The taste concentration determination function is defined as the coefficients of each individual in the window. The reciprocal of the sum of squares of the residuals between the measured pixel phase values ​​and the model prediction values ​​is used. The olfactory search step size is set to [-0.1, 0.1] radians, the visual localization clustering coefficient is 0.8, the maximum number of iterations is 30, and the early stopping condition is set to the optimal concentration change rate being less than 0.05% for four consecutive times. After convergence, the optimal phase model parameters are output. Three pixels are extrapolated along the phase contour lines on both sides of the occlusion boundary to reconstruct the continuous geometric direction of the fracture edge, and a set of edge segments with sub-pixel precision is output. The sub-pixel edge segments reconstructed from each viewpoint are back-projected onto the reference viewpoint coordinate system based on the refined homography matrix output by the multi-view fruit fly registration unit. For the projected edge point cloud, the Euclidean distance clustering algorithm is used to merge adjacent points with a spatial distance of less than 0.8 pixels, and redundant points generated by repeated projection are removed. The edge connection operation is performed: the maximum connection gap is set to 2 pixels, the tolerance for change of direction angle is 15°, and the edge segments that meet the geometric continuity condition are connected end to end. For the connected edge network, the closed contour tracking algorithm based on graph search is used to extract closed contours with a length greater than 20 pixels, remove internal holes and burr branches, perform cubic B-spline fitting on the closed contour point sequence, control the point spacing to 1 pixel, and output a smooth, continuous, and unbroken real part contour point cloud sequence. The vibration suppression pose tracking module is designed to address the micron-level relative pose drift caused by low-frequency vibrations on the production line. It combines the dynamic noise suppression capability of Kalman filtering with the time-series tracking capability of optical flow field for local feature points to construct a pose deviation time series after eliminating random jitter, thereby achieving stable and continuous tracking of the relative pose between parts. This effectively suppresses low-frequency vibration interference and achieves stable micron-level pose tracking. The vibration suppression pose tracking module includes an optical flow feature field tracking unit and a Kalman pose filtering unit. The optical flow feature field tracking unit is used to extract stable feature points from the real part contour, calculate the motion vector of feature points between adjacent frames using sparse optical flow field, capture instantaneous pose fluctuations caused by vibration in real time, transform low-frequency vibrations of the production line into a visualized instantaneous pose fluctuation sequence, capture instantaneous fluctuations caused by vibration in real time, realize vibration visualization and quantification, select sub-pixel level stable feature points from the real part contour output by the occlusion edge reconstruction module according to the curvature extreme value and edge endpoint constraints, construct an initial candidate set for feature point matching between adjacent frames, significantly improve the repeatability and matching reliability of feature points, adopt the pyramid Lucas-Kanade sparse optical flow method, calculate the optical flow motion vector of feature points layer by layer from the top to the bottom of the image pyramid, obtain the relative instantaneous pose fluctuation sequence between parts caused by vibration, realize sub-pixel level fluctuation capture under large dynamic range vibration, and perform failed feature point re-detection and re-initialization based on contour geometric constraints for feature point loss due to excessive vibration amplitude or edge occlusion during optical flow tracking, maintain the continuity and coverage of the fluctuation sequence, effectively suppress tracking interruption, and ensure long-term stable output of pose fluctuations; It should be noted that stable feature points are extracted from the real part contour point cloud sequence to construct a matching candidate set between adjacent frames. Specifically, for each closed contour curve, its discrete curvature value is calculated, a curvature threshold of 0.15 radians per pixel is set, and points with local maxima of curvature are selected as candidate corner points. Simultaneously, the start and end points of the contour are detected as edge endpoints. After merging the two types of points, non-maximum suppression is performed based on the contour point spacing, with a suppression radius set to 5 pixels. Finally, a stable feature point set with sub-pixel precision is obtained. For the current frame and the next frame image, these stable feature points are used to... An 11×11 pixel matching window is constructed centered on the feature points. Normalized cross-correlation is used as the similarity measure, and the correlation coefficient threshold is set to 0.85 to form an initial matching candidate set. A three-layer image pyramid sparse optical flow method is used to track stable feature points layer by layer. At the top of the pyramid, the coordinates of stable feature points are scaled down and the initial optical flow vector is calculated using the Lucas-Kanade method. The optical flow calculation window is set to 15×15 pixels. The iteration termination condition is set to a pixel displacement change of less than 0.03 pixels or reaching 20 iterations. The calculation result of the top layer is passed to the middle layer as the initial value, and after the same calculation, it is passed to the bottom layer. Finally, the sub-pixel precision optical flow motion vector is output at the original image resolution. For each stable feature point, the magnitude of its optical flow vector is calculated to form an instantaneous pose fluctuation sequence. At the same time, the forward and backward consistency error of each feature point during the tracking process is recorded, and the error threshold is set to 0.5 pixels. Matches exceeding the threshold are considered unreliable and are discarded. When the forward and backward consistency error of a stable feature point exceeds 0.5 pixels or its optical flow confidence score is lower than 0.6, it is judged as a lost feature. If a point is lost, it is not discarded immediately. Instead, on the actual part contour of the current frame, within a range extending 10 pixels before and after the original contour curve where the lost point was located, candidate points whose rate of curvature change deviates from the original curvature value of the lost point by less than 0.05 radians per pixel are searched as replacements. If the search is successful, the optical flow tracking window is reinitialized with the candidate point as the center, and the matching information of the new stable feature point is inherited to subsequent frames. At the same time, a lost point counter is set, and points that fail to be re-detected for three consecutive frames are removed, effectively maintaining the continuity of the fluctuation sequence and the contour coverage. The Kalman pose filtering unit takes the instantaneous pose fluctuation sequence output by optical flow as the observation input. Utilizing the state prediction and measurement update mechanism of the Kalman filter, it performs optimal estimation and smoothing suppression of vibration noise, outputting a smooth and time-consistent micron-level pose drift trajectory. This effectively filters out random jitter noise. Taking the instantaneous pose fluctuation sequence as the observation input, a linear discrete Kalman filter model is established with pose deviation and its rate of change as state variables. An initial covariance matrix for process noise and observation noise is set to effectively filter out high-frequency random jitter and retain the true pose change trend. State prediction is performed within each frame time step, calculating the prior pose deviation estimate. Measurement updates are performed using the observed fluctuation amount of the current frame to obtain the optimal estimate of the posterior pose deviation, achieving dynamic weighted fusion of observation noise and prediction values, improving pose estimation accuracy. The optimal posterior estimate is fed back to the prediction stage of the next frame to form a closed-loop iteration. After filtering and smoothing for multiple consecutive frames, a micron-level relative pose drift trajectory sequence eliminating random jitter and high-frequency noise components is output, resulting in a smooth, continuous, and time-consistent stable pose trajectory. It should be noted that, for the problem of micron-level continuous relative pose drift caused by low-frequency vibrations in the production line, a linear discrete Kalman filter model is constructed with pose deviation and its rate of change as state variables. The state vector is defined as a four-dimensional vector, containing pose deviation components and corresponding rate of change components in the X and Y axes of the plane. The initial value of the process noise covariance matrix is ​​set to a diagonal matrix with diagonal elements of 0.01, and the initial value of the observation noise covariance matrix is ​​set to a diagonal matrix with diagonal elements of 0.05, reflecting the measurement uncertainty of the instantaneous fluctuation sequence output by the optical flow feature field tracking unit. The filter time step is kept synchronized with the camera frame rate. The time step is set to 33 milliseconds, corresponding to a sampling rate of 30 frames per second. The state transition matrix is ​​constructed based on a uniform motion model, and the observation matrix maps the pose deviation components in the state vector to the observation space, forming a complete filtering model framework. Within each frame time step, the Kalman filter first performs state prediction based on the posterior state estimate and state transition matrix of the previous frame, calculates the prior pose deviation estimate and its covariance matrix, and after prediction, uses the instantaneous pose fluctuation sequence output by the optical flow feature field tracking unit as the observation input for the current frame. The observation vector includes the X-axis and Y-axis displacement components of each stable feature point calculated by optical flow. The Kalman gain matrix is ​​calculated, and its value depends on the relative magnitude of the prior covariance and the observation noise covariance. Then, a measurement update is performed, using the observation fluctuations of the current frame to weight and correct the prior estimate, obtaining the optimal estimate of the posterior pose deviation. During the update process, if the optical flow confidence score is below 0.6, the noise covariance of the corresponding observation component is dynamically increased to reduce the weight of unreliable observations on the estimation results. After the measurement update is completed, the optimal estimate of the posterior pose deviation is fed back and stored as the initial state value for the next frame's time step prediction stage, forming a closed-loop iterative structure for the Kalman filter, continuously executing multiple iterations. After frame filtering, the random jitter component in the instantaneous pose fluctuation sequence is effectively suppressed, and the high-frequency noise component is attenuated by the low-pass filtering characteristics, outputting a smooth and time-consistent micron-level relative pose drift trajectory sequence. The pose deviation estimate of each frame in this trajectory sequence has sub-micron-level numerical stability, and the variance of pose change between adjacent frames is reduced by about one order of magnitude compared with the original observation sequence. During the filtering process, the statistical characteristics of the innovation sequence are monitored in real time. When the innovation of five consecutive frames exceeds the standard deviation threshold of plus or minus two times, the adaptive adjustment of the noise covariance matrix is ​​triggered to ensure that the filter maintains the optimal estimation performance when the vibration characteristics change. The coupling error feature extraction module is used to dynamically decouple the dual modulation effect of production line vibration and local occlusion on multi-source error features including gap, parallelism and coplanarity based on edge and pose joint alignment. It extracts the original error components with physical interpretability and their cross-coupling terms, forming an initial multi-dimensional feature set for quality classification. It successfully decouples the dual modulation of vibration and occlusion and extracts interpretable error components. The Fruit Fly Optimized SVM Feature Weighting Module is used to perform nonlinear weight search on the initial multidimensional feature set using the global optimization capability of the Fruit Fly algorithm. Based on the contribution and redundancy of multi-source error features to the assembly state judgment, it optimizes the penalty coefficient of each feature dimension of the support vector machine, eliminates the discrimination bias caused by dimensional differences and error coupling, outputs the optimal discriminative feature subspace after weighting, automatically identifies and removes redundant features, and significantly improves the classification and discrimination accuracy. The assembly quality judgment module is used to establish assembly quality classification boundaries based on the optimal discriminative feature subspace, transform multi-source error features into stable and interpretable qualified / unqualified / warning judgments, and simultaneously reverse-locate the dominant error sources that cause judgment anomalies, forming a closed-loop quality judgment mechanism from feature input to judgment output to cause feedback, realizing interpretable three types of quality judgments and reverse-locating the dominant anomaly sources.

[0023] Example 2, as Figure 1 , Figure 2 As shown, based on Embodiment 1, the present invention provides a technical solution: the coupling error feature extraction module specifically includes: aligning the real part contour output by the occlusion edge reconstruction module with the pose drift trajectory output by the vibration suppression pose tracking module in a unified spatiotemporal coordinate system, establishing a joint description model of edge spatial distribution and pose temporal change, realizing sub-pixel-level spatiotemporal synchronization of edge and pose, laying the foundation for multi-source error decoupling, and based on the joint description model, extracting the dynamic gap deviation under vibration modulation, the static coplanarity deviation under occlusion influence, and the parallelism nonlinear error term generated by the cross-coupling of the two, forming an original error component set, realizing the physical separation of vibration and occlusion effects, quantifying the independent contribution of each error source, performing dimensional unification and outlier truncation processing on each original error component, constructing an initial multidimensional feature set containing the main effect term and the second-order cross-coupling term, and eliminating dimensional differences and abnormal interference; It should be noted that in actual production line operation, the real part contour point cloud sequence output by the occlusion edge reconstruction module and the pose drift trajectory output by the vibration suppression pose tracking module are aligned in a unified spatiotemporal coordinate system. The intermediate view camera coordinate system is used as the spatial reference, the time reference is synchronized with the acquisition rate of 30 frames per second, and the time step is fixed at 33 milliseconds. The aligned contour point cloud is associated with the pose deviation estimate of the corresponding frame according to the timestamp. The pose deviation estimate includes the displacement components and rate of change components in the X and Y axes. During the spatial alignment process, the sub-pixel edge fragments reconstructed from each viewpoint are back-projected to the reference coordinate system using the refined homography matrix. Euclidean distance clustering is used to merge adjacent points with a spatial distance of less than 0.8 pixels to ensure a strict correspondence between the contour point cloud and the pose trajectory in the spatial domain. Through alignment operations, a joint description model of edge spatial distribution and pose temporal changes is established. During dynamic gap deviation extraction, the distance between adjacent part edge points is calculated along the contour normal direction. Combined with the rate of change components in the X and Y axes of the pose drift trajectory, vibration compensation is applied to the gap measurement value to obtain the original gap value after removing dynamic interference, achieving a gap measurement accuracy of 0.15 pixels. During static coplanarity deviation extraction, candidate points with response values ​​higher than 0.35 in the phase consistency edge response map are used. For edge points, the spatial plane equation of the fitted part assembly surface is used, and the standard deviation of the distance from each edge point to the fitted plane is calculated as the coplanarity deviation. This process suppresses the interference of illumination fluctuations on the plane fitting. The parallelism nonlinear error term is obtained by analyzing the cross-correlation between the pose drift trajectory and the gap deviation sequence. The sliding cross-correlation function of the two within a 33-millisecond time step is calculated, and the frequency band with a correlation coefficient exceeding 0.7 is extracted as the cross-coupling term, reflecting the assembly error modulation effect under the combined action of vibration and occlusion. The dynamic gap deviation, static coplanarity deviation, and parallelism nonlinear error term have length units and dimensionless units, respectively, and are calibrated using Z-scores. The normalization method transforms each component to the same dimensional scale, with a zero-mean unit variance distribution. Outlier truncation adopts the interquartile range criterion, marking data points that exceed 1.5 times the interquartile range between the first and third quartiles as outliers and truncating them to the boundary value. The main effect term constructed after processing includes the mean and variance of the gap deviation, the maximum value and root mean square of the coplanarity deviation, and the peak factor of the parallelism error. The second-order cross-coupling term includes the cross-correlation entropy between the gap deviation and the pose drift trajectory, and the decay slope of the coplanarity deviation with vibration frequency. The initial multidimensional feature set contains a total of 12 feature vectors, which serve as the input to the feature weighting module of the Drosophila optimized SVM. The optimized SVM feature weighting module for fruit flies specifically includes: taking an initial multidimensional feature set as input, setting the search space of individual fruit fly populations as the SVM penalty coefficient weight vector of each feature dimension, defining the taste concentration judgment function as the classification accuracy of the weighted features on the validation set, effectively screening out the key feature dimensions most sensitive to assembly quality, driving the fruit fly population to iteratively update the weight vector through olfactory random search and visual group localization, adaptively increasing the weight of effective features and compressing the weight of redundant features based on the contribution of each feature to the assembly state judgment, significantly suppressing the interference of redundant features on classification decisions, outputting the optimal weight vector after convergence, performing a dimension-wise weighted transformation on the original feature matrix, generating the optimal discriminative feature subspace and its corresponding weighted kernel function that eliminates the discriminative bias caused by dimensional differences and error coupling, making the classification boundary more sensitive to key features, and significantly improving the overall judgment accuracy; It should be noted that in actual production line operation, the 12-dimensional initial feature set output by the coupling error feature extraction module is first used as the input to the fruit fly optimized SVM feature weighting module. The fruit fly population size is set to 30. The position code of each individual corresponds to the 12-dimensional feature dimension SVM penalty coefficient weight vector. The weight search space is limited to the interval [0.1, 10]. The initial position is randomly generated. The taste concentration judgment function is defined as the classification accuracy of the weighted features on the validation set. The validation set consists of 200 sets of data randomly selected from the historical assembly samples, including 100 qualified samples and 100 unqualified samples. In each iteration, each fruit fly individual is within the [-0.5, 0.5] neighborhood of its current position. A random olfactory search is performed to generate new candidate solutions for the weight vector. The classification accuracy of the corresponding validation set is calculated as the concentration value. After the olfactory search is completed, a visual localization operation is performed to select the individual with the highest concentration value in the current population as the optimal position. All individuals are then grouped towards this optimal position with a clustering coefficient of 0.8 to form a new population distribution. The maximum number of iterations is set to 50. The early stopping condition is that the rate of change of the global optimal concentration is less than 0.05% in 5 consecutive iterations to ensure that the algorithm terminates in a timely manner after convergence and avoids invalid computation. During the iterative optimization of the fruit fly algorithm, the weights of each feature dimension are adaptively adjusted according to their contribution to the assembly state decision. For the mean of gap deviation and the root mean square of coplanarity deviation, the weights are adjusted accordingly. For feature dimensions that significantly contribute to the classification boundary, their corresponding weight coefficients gradually increase during optimization, with the final convergence value typically ranging from 2.5 to 5.0. For feature dimensions with lower contribution or redundancy, such as the parallelism error peak factor and pose trajectory autocorrelation decay time, their weight coefficients are compressed to below 0.3, effectively suppressing the interference of features on classification decisions. The fruit fly algorithm's global optimization capability avoids the problem of traditional gradient descent methods easily getting trapped in local optima. It can effectively locate the globally optimal weight vector in a 12-dimensional search space. During optimization, the optimal concentration value and its corresponding weight vector are recorded in real time for each generation. When the optimal concentration value does not increase by more than 0.3% for eight consecutive generations, a local perturbation mechanism is triggered. To prevent premature convergence to a suboptimal solution, the weight vectors of 30% of individuals are randomly reset. After iteration termination, the average non-zero weight dimension in the output optimal weight vector is 8.2, indicating that there are approximately 3 to 4 redundant or low-contribution features in the original 12-dimensional feature set. The output optimal weight vector after convergence is used to perform a dimension-wise weighted transformation on the original feature matrix to generate the optimal discriminative feature subspace. Specifically, the original 12-dimensional feature vector is multiplied element-wise with the optimal weight vector to obtain the weighted feature vector. This transformation eliminates the dimensional differences between the original features and the discrimination bias caused by vibration and occlusion coupling. The weighted feature subspace is input into a radial basis function support vector machine with the kernel parameter set to 0.125. The classifier penalty parameter C is dynamically selected based on the five-fold cross-validation results in the weighted feature subspace, with a value range of [1, 100]. The weighted kernel function is constructed by applying a weight vector to the feature dimensions for scaling based on the original kernel function calculation. That is, for any two samples' weighted feature vectors, the kernel function value is equal to the calculation result of the original radial basis kernel function in the feature space with the reciprocals of each element of the weight vector as scaling factors. This weighted kernel function makes the classification boundary more sensitive on feature dimensions with high contribution and smooth on redundant feature dimensions, thereby significantly improving the accuracy and robustness of assembly quality judgment. The assembly quality judgment module specifically includes: training an assembly quality classifier using a radial basis function kernel function (SVM) on the optimal discriminative feature subspace; optimizing the penalty parameters and kernel parameters using grid search; establishing three judgment boundaries for qualified, unqualified, and warning classes; significantly reducing false alarm and missed alarm rates; achieving stable and reliable differentiation of the three quality classes; outputting the judgment category and confidence level of the distance from the judgment boundary for the feature vector input by online detection through the classifier; triggering the reverse location process for abnormal causes when the judgment is unqualified or a warning is issued; providing quantifiable judgment reliability indicators; identifying critical quality states in advance; calculating the contribution ratio of each original error component based on feature weights and SHAP values ​​in the reverse location process; locating the dominant abnormal source as occlusion effect or vibration drift or its coupling terms; and outputting the judgment result with cause label to the collaborative control platform; achieving transparent tracing of the root cause of the abnormality; and providing a clear basis for closed-loop adaptive control. It should be noted that the optimal discriminative feature subspace is used as the training data for the assembly quality classifier. This subspace contains a 12-dimensional feature vector weighted by the optimal weight vector. The weights of significant features such as the mean of gap deviation and the root mean square of coplanarity deviation converge between 2.5 and 5.0, while the weights of redundant features such as the peak factor of parallelism error and the autocorrelation decay time of pose trajectory are compressed to below 0.3. A support vector machine classifier is constructed using a radial basis function kernel, with the kernel parameter fixed at 0.125. The penalty parameter C is dynamically selected from 1 to 100 through five-fold cross-validation. Candidate parameter combinations are traversed with a grid search step size of 5. The optimal C value is determined based on the classification accuracy on the validation set. The classifier is then established. The system uses three decision boundaries: qualified, unqualified, and warning. The warning boundary is set at 0.3 times the inter-class distance from the qualified boundary to identify assembly samples in a critical quality state. These three boundaries together constitute a complete assembly quality judgment system. During online detection, the system receives the weighted feature vector input in real time. While outputting the judgment category, the classifier calculates the Mahalanobis distance of the current sample from its respective category's decision boundary as the confidence level. The confidence level ranges from 0 to 1, with values ​​closer to 1 indicating higher reliability. When the judgment result is unqualified or a warning, an automatic reverse fault localization process is triggered. This process is based on the support vector weights in the trained classifier and the SHAP values ​​of each feature dimension. Joint analysis is performed, and the SHAP value is calculated against the background of the training set sample distribution. The contribution of each of the 12 features of the current detection sample is calculated dimension by dimension. The SHAP value of each dimension is multiplied by the corresponding fruit fly optimization weight to obtain the weighted contribution ratio. Positive contributions point to the direction of non-compliance or warning, while negative contributions point to the direction of compliance. The reverse localization process identifies the dominant anomaly source based on the weighted contribution ratio. The specific judgment rule is: if the sum of the contribution ratios of the mean gap deviation and the root mean square of the coplanarity deviation exceeds 60%, and the area of ​​the region with a response value lower than 0.35 in the corresponding phase consistency edge response map exceeds 30%, then the dominant anomaly source is determined to be an occlusion effect; if the X-axis of the pose drift trajectory and... If the sum of the contribution of the Y-axis rate of change components exceeds 50%, and the Kalman filter innovation sequence exceeds the threshold of plus or minus two standard deviations for five consecutive frames, then the dominant anomaly source is determined to be vibration drift. If the contribution of the above two types is between 30% and 50%, and the maximum value of the sliding cross-correlation function between the gap deviation and the pose trajectory exceeds 0.7, then it is determined to be the coupling effect of occlusion and vibration. After the determination is completed, the system encapsulates the decision category, confidence level and dominant anomaly source label into a result data packet, and transmits it to the collaborative control platform through a shared memory communication mechanism. Based on the anomaly source type, the system adjusts the homography matrix search range of the multi-view fruit fly registration unit or the initial value of the observation noise covariance of the Kalman pose filter unit to form a closed-loop quality control process.

[0024] The following section describes the workflow of this computer vision-based precision assembly online quality inspection system.

[0025] After system startup, the collaborative control platform synchronously triggers three industrial cameras evenly distributed at a 120° angle around the workstation under test to simultaneously acquire multi-view grayscale images of the partially occluded parts. The image data is first input into the occlusion edge reconstruction module, which constructs a three-layer image pyramid and extracts FAST corner points and BRISK descriptors. The fruit fly algorithm is used to optimize the homography matrix between viewpoints to achieve sub-pixel level registration and eliminate registration error accumulation. Subsequently, a four-scale, six-direction Log-Gabor filter bank is constructed on the registered image to extract phase-consistent edge responses, and the fruit fly algorithm is used to optimize the local occlusion edge response. The partial phase interpolation model reconstructs continuous sub-pixel edges at the occlusion boundary, and outputs a real part contour point cloud sequence through multi-view fusion and B-spline fitting. The real part contour is input to the vibration suppression pose tracking module, which extracts the curvature extrema points on the contour as stable feature points, and uses the three-layer pyramid sparse optical flow method to calculate the motion vector of the feature points between adjacent frames to obtain the instantaneous pose fluctuation sequence. This sequence is used as the observation input to the Kalman filter. The filter performs state prediction and measurement update based on the uniform motion model and outputs a smooth micron-level pose drift trajectory, which effectively suppresses low-frequency vibration interference on the production line. The coupling error feature extraction module aligns the reconstructed contour and pose trajectory in the spatiotemporal coordinate system, extracts the dynamic gap deviation after vibration compensation along the contour normal, obtains the static coplanarity deviation by fitting the plane with high-response edge points, extracts the cross-coupling terms of vibration and occlusion through sliding cross-correlation analysis, and constructs a 12-dimensional initial feature set after Z-score standardization. This feature set is input into the fruit fly optimized SVM feature weighting module. The fruit fly algorithm uses the classification accuracy of the validation set as the concentration function to search for the optimal weight coefficients of each feature dimension, performs weighted transformation on the original features, and generates the optimal discriminative feature subspace and weighted kernel function. The assembly quality decision module trains a radial basis function SVM classifier on a weighted feature subspace, determines the penalty parameters through five-fold cross-validation, and establishes three decision boundaries: qualified, unqualified, and warning. During online detection, the classifier outputs the decision category and Mahalanobis distance confidence. When the decision is unqualified or a warning is issued, the dominant anomaly source is inversely located based on the joint contribution analysis of SHAP value and fruit fly weights, which may be occlusion effect, vibration drift, or a coupling of the two. The decision result and anomaly source label are fed back to the collaborative control platform through shared memory. The platform dynamically adjusts the front-end registration search range or the filter noise covariance accordingly to form a closed-loop adaptive quality control.

[0026] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A computer vision-based precision assembly online quality inspection system, comprising a collaborative control platform, characterized in that, The collaborative control platform has the following communication connection modules: The occlusion edge reconstruction module is used to combine the global optimization capability of the fruit fly algorithm with the illumination invariance of phase-consistent edge detection to reconstruct the real part outline from multi-view images. The vibration suppression pose tracking module is used to combine the Kalman filter's ability to suppress dynamic noise with the optical flow field's ability to track local feature points in a time sequence, and to construct a pose deviation time series after eliminating random jitter. The coupling error feature extraction module is used to dynamically decouple the dual modulation effect of production line vibration and local occlusion on multi-source error features based on the joint alignment of edge and pose, extract the original error components and their cross-coupling terms, and form an initial multi-dimensional feature set for quality classification. The fruit fly-optimized SVM feature weighting module is used to perform nonlinear weight search on the initial multidimensional feature set using the global optimization capability of the fruit fly algorithm. Based on the contribution and redundancy of multi-source error features to the assembly state decision, it optimizes the penalty coefficient of each feature dimension of the support vector machine and outputs the weighted optimal discriminative feature subspace. The assembly quality judgment module is used to establish the assembly quality classification boundary based on the optimal discriminative feature subspace, transform multi-source error features into qualified / unqualified / warning judgments, and simultaneously reverse locate the dominant error source that causes the judgment anomaly.

2. The precision assembly online quality inspection system based on computer vision according to claim 1, characterized in that: The occlusion edge reconstruction module includes a multi-view fruit fly registration unit and a sub-pixel edge extraction unit; The multi-view fruit fly registration unit is used to perform fast sub-pixel level registration of images from multiple cameras on the production line using the fruit fly algorithm, and to optimize the geometric transformation parameters between viewpoints. The subpixel edge extraction unit extracts illumination-insensitive edge responses in the frequency domain based on phase-consistent edge detection, and combines the fruit fly algorithm to optimize the local phase interpolation strategy. It then interpolates and reconstructs continuous subpixel edges at occlusion boundaries, outputting a smooth, closed, and realistic part contour.

3. The precision assembly online quality inspection system based on computer vision according to claim 2, characterized in that: The multi-view fruit fly registration unit specifically includes: Images of partially occluded parts acquired by multiple cameras in the production line at the same time are collected. FAST corner points and BRISK descriptors are extracted from images from each viewpoint to construct a set of multi-view feature point pairs, which serve as the initial population individual position encoding for the fruit fly algorithm. Using the parameters of the inter-view homography matrix as the search space, the taste concentration determination function of individual fruit flies is defined as the reciprocal of the reprojection error of feature points, guiding the fruit fly population to iteratively approach the optimal registration parameters through olfactory search and visual localization. The subpixel homography matrix obtained by the fruit fly algorithm is refined by LM nonlinear optimization, and the images from each viewpoint are uniformly transformed to the reference viewpoint coordinate system, outputting a multi-view aligned image that eliminates the accumulation of information complementarity registration errors caused by occlusion.

4. The precision assembly online quality inspection system based on computer vision according to claim 2, characterized in that: The sub-pixel edge extraction unit specifically includes: On multi-view aligned images, a Log-Gabor filter bank is used to calculate phase consistency response at multiple scales and directions, extract illumination-insensitive edge response maps, and suppress the interference of production line illumination changes on edge detection. For candidate edge points in the phase consistency response map, with the goal of minimizing the local phase interpolation residual, the fruit fly algorithm is used to optimize the phase model parameters within the sub-pixel interpolation window; The sub-pixel edge fragments reconstructed from each viewpoint are back-projected and fused through multi-view geometric transformation relationships. After edge connection and closed contour tracking, a smooth and unbroken real part contour point cloud sequence is output.

5. The precision assembly online quality inspection system based on computer vision according to claim 2, characterized in that: The vibration suppression pose tracking module includes an optical flow feature field tracking unit and a Kalman pose filtering unit; The optical flow feature field tracking unit is used to extract stable feature points from the real part contour, calculate the motion vector of feature points between adjacent frames using sparse optical flow field, capture instantaneous pose fluctuations caused by vibration in real time, and convert low-frequency vibrations of the production line into a visualized instantaneous pose fluctuation sequence. The Kalman pose filtering unit is used to take the instantaneous pose fluctuation sequence of the optical flow output as the observation input, and use the state prediction and measurement update mechanism of the Kalman filter to perform optimal estimation and smoothing suppression of vibration noise, and output the pose drift trajectory.

6. The precision assembly online quality inspection system based on computer vision according to claim 5, characterized in that: The optical flow feature field tracking unit specifically includes: From the real part contours output by the occlusion edge reconstruction module, sub-pixel-level stable feature points are selected according to the curvature extrema and edge endpoint constraints to construct an initial candidate set for feature point matching between adjacent frames; The Lucas-Kanade sparse optical flow method is used to calculate the optical flow motion vector of feature points layer by layer from the top to the bottom of the image pyramid, thereby obtaining the relative instantaneous pose fluctuation sequence between parts caused by vibration. For feature points lost during optical flow tracking due to excessive vibration amplitude or edge occlusion, a re-detection and re-initialization of failed feature points based on contour geometry constraints is performed to maintain the continuity and coverage of the fluctuation sequence.

7. The precision assembly online quality inspection system based on computer vision according to claim 5, characterized in that: The Kalman pose filtering unit specifically includes: Using the instantaneous pose fluctuation sequence as the observation input, a linear discrete Kalman filter model with pose deviation and its rate of change as state variables is established, and the initial covariance matrix of process noise and observation noise is set. Within each frame time step, state prediction is performed, prior pose deviation is estimated, and measurement updates are performed using the observed fluctuations in the current frame to obtain the optimal estimate of the posterior pose deviation. The optimal posterior estimate is fed back to the next frame prediction stage to form a closed-loop iteration. After being filtered and smoothed for multiple consecutive frames, a micrometer-level relative pose drift trajectory sequence is output, eliminating random jitter and high-frequency noise components.

8. The precision assembly online quality inspection system based on computer vision according to claim 5, characterized in that: The coupling error feature extraction module specifically includes: Align the real part contour output by the occlusion edge reconstruction module with the pose drift trajectory output by the vibration suppression pose tracking module in a unified spatiotemporal coordinate system to establish a joint description model of edge spatial distribution and pose temporal change. Based on the joint description model, the dynamic gap deviation under vibration modulation, the static coplanarity deviation under the influence of occlusion, and the parallelism nonlinear error term generated by the cross-coupling of the two are extracted to form the original error component set. The original error components are subjected to dimensional unification and outlier truncation to construct an initial multidimensional feature set containing the main effect term and the second-order cross-coupling term.

9. The precision assembly online quality inspection system based on computer vision according to claim 8, characterized in that: The fruit fly optimized SVM feature weighting module specifically includes: Using the initial multidimensional feature set as input, the search space of individual fruit fly populations is set as the SVM penalty coefficient weight vector of each feature dimension, and the taste concentration determination function is defined as the classification accuracy of the weighted features on the validation set. The Drosophila population is driven to iteratively update the weight vector through olfactory random search and visual group localization, and the effective feature weights are increased and redundant feature weights are compressed according to the contribution of each feature to the assembly state decision. After convergence, the optimal weight vector is output, and the original feature matrix is ​​subjected to a dimension-wise weighted transformation to generate the optimal discriminative feature subspace and its corresponding weighted kernel function that eliminate the discriminative bias caused by the difference in dimensions and the coupling of error.

10. The precision assembly online quality inspection system based on computer vision according to claim 9, characterized in that: The assembly quality judgment module specifically includes: On the optimal discriminative feature subspace, a radial basis function kernel function SVM is used to train the assembly quality classifier, and grid search is used to optimize the penalty parameters and kernel parameters to establish three-class decision boundaries: qualified, unqualified, and warning. For the feature vector input by online detection, the classifier outputs the judgment category and the confidence level of the distance from the judgment boundary. When the judgment is unqualified or a warning is issued, the reverse location process of the abnormal cause is triggered. In the reverse positioning process, the contribution ratio of each original error component is calculated based on the feature weights and SHAP values. The dominant anomaly source is identified as occlusion effect or vibration drift or its coupling terms. The judgment result with cause label is output to the collaborative control platform.