Circle measurement method based on credibility transfer and multi-level error compensation
Patent Information
- Application Number
- CN202611138964.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]现有技术中光学产线的圆检测方案以传统圆拟合测量算法为核心,包含最小二乘圆拟合、霍夫圆变换等经典方法,在实际工业检测场景中暴露多重缺陷,难以匹配高精度光学元件检测需求:第一,边缘定位精度不足
本发明基于高斯导数法与Hessian矩阵利用Steger算法提取亚像素边缘点形成亚像素边缘点集合,并构建融合可信度评价模型获取融合可信度,实现边缘亚像素精确定位及边缘质量评价;随后根据远心镜头视场畸变完成坐标矫正映射,对亚像素边缘点进行高精度空间矫正;进一步构建基于梯度权重、可信度权重、距离权重加权融合的RANSAC异常点剔除模型,实现边缘点鲁棒筛选;利用LM圆拟合算法获得最终拟合圆,并提出融合边缘质量可信度、模型一致性可信度和拟合稳定性可信度的全视场误差补偿模型,实现高精度圆参数估计。具体如下:
Smart Images

Figure CN122989840A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision and industrial measurement technology, specifically relating to a circle measurement method based on reliability transfer and multi-level error compensation. Background Technology
[0002] With the rapid development of the precision optical manufacturing industry towards high precision, mass production, and miniaturization, the full-scale visual inspection of various optical components such as glass spheres, lenses, prisms, optical windows, and optical wafers has become a core aspect of product quality control. The dimensional accuracy of the outer contour and circular reference features (including outer circle, inner hole, spherical reference circle, etc.) of optical components directly determines key optical performance characteristics such as coaxiality, imaging distortion, and transmission uniformity during subsequent assembly and adjustment. Therefore, more stringent requirements are placed on the accuracy, stability, and anti-interference capability of online measurement of the circular dimensions of optical components.
[0003] Current circular inspection solutions for optical production lines rely on traditional circular fitting measurement algorithms, including classic methods such as least-squares circular fitting and Hough circle transform. However, these methods exhibit multiple shortcomings in actual industrial inspection scenarios, making them unsuitable for the high-precision inspection requirements of optical components: First, insufficient edge positioning accuracy. Optical component surfaces exhibit coating gradients, weak reflections, and chamfered transition surfaces, resulting in blurred, gradient grayscale bands at the edges of the target circle after imaging. Traditional methods rely solely on single-pixel grayscale thresholds to extract contour points, failing to achieve sub-pixel-level precise edge positioning. This directly introduces errors in basic contour extraction, amplifying deviations in diameter and center coordinate measurements. Second, significant interference from abnormal contour points. Process defects such as impacts, chipping, notches, and edge burrs on optical components generate abnormal sampling points that deviate from the standard circle. Current methods process all contour data with equal weight, and these abnormal points severely distort the overall circle fitting results, making it impossible to simultaneously complete defect identification and accurate dimensional measurement. This easily leads to misjudgments of qualified parts and distorted dimensional data for defective parts. Third, the measurement error across the entire field of view cannot be uniformly compensated. Industrial camera lenses suffer from radial and tangential distortion, and the scaling and deformation of images vary in different fields of view. Existing methods only perform fixed distortion correction on a single image and do not establish a dynamic error compensation model for field of view partitions. The measurement results of the same standard circular part under the central field of view and the edge field of view are discrete, resulting in poor consistency in batch inspection.
[0004] In summary, existing circle detection schemes are constrained by multiple factors such as edge extraction, noise, defect anomalies, and lens field-of-view distortion. They suffer from problems such as insufficient positioning accuracy, sensitivity to edge noise, poor consistency of full field-of-view measurement, and insufficient long-term operational stability. Their measurement accuracy, repeatability, and anti-interference capabilities cannot meet the batch inspection requirements of micron-level appearance dimensions of high-end optical components. There is an urgent need to propose a circle measurement method that can achieve high-precision edge positioning and complete adaptive compensation for full field-of-view errors. Summary of the Invention
[0005] The purpose of this invention is to address the above-mentioned problems by proposing a circle measurement method based on reliability transfer and multi-level error compensation, which can be used to achieve sub-micron level high-precision measurement of the circular contour of optical elements in non-contact vision measurement, and has strong stability and anti-interference ability.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The circle measurement method based on reliability transfer and multi-level error compensation proposed in this invention includes the following steps: S1. Set up a vision measurement system to acquire images of the optical component under test and form an image of the optical component under test; S2. Extract sub-pixel edge regions from the image of the optical element under test based on the adaptive dynamic ROI algorithm; S3. Use the sub-pixel edge extraction algorithm to extract sub-pixel edge points in the sub-pixel edge region to obtain a candidate edge point set. Each sub-pixel edge point in the candidate edge point set carries coordinates and fusion confidence. S4. Based on several calibration board images acquired by the visual measurement system, the camera intrinsic parameters are obtained using Zhang's calibration method. Based on the camera intrinsic parameters, the coordinate correction mapping of the candidate edge point set is performed to obtain the corrected edge point set. S5. Construct an edge point filtering model based on the corrected edge point set to obtain a fitted edge point set; S6. Obtain the final fitted circle using the LM circle fitting algorithm based on the set of fitted edge points; S7. Using the full field-of-view error compensation model, multi-level error compensation is performed on the measurement error of the final fitted circle to obtain the final circle measurement result of the optical element under test.
[0007] Preferably, the vision measurement system includes an industrial camera, a telecentric lens, and a telecentric parallel light source. The telecentric lens is connected to the industrial camera, the optical axis of the telecentric parallel light source is parallel to the optical axis of the telecentric lens, and the telecentric parallel light source is used to provide backlight illumination for the optical element under test. By adjusting the distance between the telecentric lens and the optical element under test, the system focuses and captures an image of the optical element under test.
[0008] Preferably, the adaptive dynamic ROI algorithm performs the following operations: S2.1 Perform noise filtering on the image of the optical component under test; S2.2. Based on the Hough circle detection algorithm, coarsely locate the image of the optical element under test after noise filtering to obtain the target circular region; S2.3. Adaptively extract sub-pixel edge regions based on the target circular region, i.e., the coordinates of the center point of the sub-pixel edge region are... Width is Height is ,in, The center of the target circular region Direction coordinates The center of the target circular region Direction coordinates The radius of the target circular region. For the preset width increment threshold, To preset the height increment threshold, and , .
[0009] Preferably, the sub-pixel edge extraction algorithm performs the following operations: S3.1. Gaussian smoothing is applied to the sub-pixel edge region to form a smooth image, and the gradient, first derivative and second derivative of each pixel of the smooth image are calculated using the Gaussian derivative method. S3.2 Construct the Hessian matrix of each pixel based on the second derivative of each pixel in the smoothed image; S3.3. Based on the Hessian matrix of each pixel, use the Steger algorithm to extract sub-pixel edge points to form a sub-pixel edge point set; S3.4. Use the fusion credibility evaluation model to obtain the fusion credibility of each sub-pixel edge point in the sub-pixel edge point set. The fusion credibility evaluation model performs the following operations: S3.4.1. Calculate the magnitude of the gradient of the corresponding sub-pixel edge point based on the first derivative of each pixel in the smooth image, and then normalize it to obtain the gradient strength confidence of the corresponding sub-pixel edge point. S3.4.2 Calculate the Hessian response confidence level of each sub-pixel edge point; S3.4.3 Calculate the standard deviation of the normal direction angle of all sub-pixel edge points in the preset neighborhood of each sub-pixel edge point, and obtain the direction consistency confidence of the corresponding sub-pixel edge point based on the standard deviation of the normal direction angle. S3.4.4. The gradient intensity confidence, Hessian response confidence, and orientation consistency confidence of the corresponding sub-pixel edge points are weighted and fused to obtain the fused confidence of the corresponding sub-pixel edge points. S3.5. Retain sub-pixel edge points with a fusion confidence level greater than the confidence level threshold to form a candidate edge point set.
[0010] Preferably, the set of corrected edge points is represented as follows: in, To correct the set of edge points, The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates For the first The reliability of fusion of sub-pixel edge points This is the set of indices for sub-pixel edge points in the candidate edge point set.
[0011] Preferably, an edge point selection model is constructed based on the corrected edge point set to obtain a fitted edge point set, as follows: S5.1 Construct the first edge point set based on the corrected edge point set. : in, For the first set of edge points, the th The edge gradient intensity at the i-th edge point, i.e., the edge gradient intensity at the i-th edge point The magnitude of the gradient at each sub-pixel edge point; S5.2, From the set of first edge points Calculate the parameters of the initial circle by randomly selecting three non-collinear edge points. Based on the parameters of the initial circle Get the first Candidate circle models generated by round iteration : in, The center of the initial circle Direction coordinates The center of the initial circle Direction coordinates The radius of the initial circle, For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The radius of the candidate circle model generated by the round of iterations. , Let be the number of iterations at which the iteration terminates during the generation of the candidate circle model, and , , ; S5.3 Calculate the first edge point in the first edge point set. The edge point to the first The radial distance of the center of the candidate circle model generated by the round iteration Then the first In the first set of edge points in the round of iteration Distance residual of each edge point ; S5.4, the first edge point set... Normalize the edge gradient intensity of the nth edge point to obtain the nth edge point in the first set of edge points. Gradient weights at each edge point ; S5.5, Obtain the first edge point from the first edge point set. Credibility weight of each edge point ; S5.6 Calculate the first edge point in the first edge point set based on the Gaussian decay model. Distance weight of each edge point ; S5.7. The gradient weight, confidence weight, and distance weight of the corresponding edge points in the first edge point set are weighted and fused to obtain the comprehensive score of the corresponding edge points. The edge points with a comprehensive score greater than the score threshold are taken as inliers to form an inlier set. S5.8, The sum of the comprehensive scores of all edge points in the interior point set is taken as the first... Model scoring of candidate circle models generated in rounds of iteration; S5.9 Determine if the termination condition of the first iteration is met. If yes, proceed to step S5.10; otherwise, set... Return to step S5.2; S5.10. Select the set of interior points of the candidate circle model with the highest model score as the set of fitting edge points. , means as follows: in, The set of interior points of the candidate circle model with the highest model score. The model score weights for each edge point , This is the set of indices of all edge points in the set of interior points of the candidate circle model with the highest model score.
[0012] Preferably, the LM circle fitting algorithm performs the following operations: S6.1. Select the candidate circle model with the highest model score as the fitted circle for the first iteration; S6.2, Execute the following... Round of iteration to obtain the first The fitted circle from each iteration is as follows: S6.2.1. Construct a loss function based on the Huber kernel and obtain the Huber weights by taking the derivative of the loss function. Then, the first weight in the set of fitted edge points... Huber weights of edge points The formula is as follows: in, Represents the first edge point in the set of fitted edge points. Geometric residuals of each edge point Take the mold. The first experience value; S6.2.2, The confidence weight, model score weight and Huber weight of the corresponding edge points in the fitted edge point set are weighted and fused to obtain the total weight of the corresponding edge points; S6.2.3 Calculate the first edge point based on the total weight of each edge point in the fitted edge point set and the loss function. The optimization objective function for each iteration is given by the following formula: in, For loss function, For the first The objective function of round-by-round iteration is optimized. For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations. To fit the set of edge points, the first... The total weight of each edge point , This represents the number of iterations at the termination point during the process of generating the fitted circle. S6.2.4 Construct the weighted normal optimization equation, as shown in the following formula: in, To fit the diagonal matrix formed by the total weights of all edge points in the edge point set, For Jacobian matrices, For transpose, Let λ be the geometric residual vector, and λ be the damping factor. Let be the identity matrix, Δ be the parameter increment, and , For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The incremental value of the radius between the fitted circles in each iteration; S6.2.5, Solve for the Δ that minimizes the objective function using the weighted normal optimization equation, and then combine it with the first... Fitting circle of round iteration , obtained the Fitting circle of round iteration , For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations; S6.3, Place Return to step S6.2 and continue until the second iteration termination condition is met, then output the final fitted circle. ,in, The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates The radius of the final fitted circle.
[0013] Preferably, the full field-of-view error compensation model performs the following operations: S7.1, Construction of the entire field of view in the visual measurement system Using a grid, sample one image from each grid using a standard glass sphere and measure the corresponding final fitted circle. Calculate the... Measurement error per grid , The radius of a standard glass sphere. For the first The radius of a standard glass sphere measured by a grid. ; S7.2 Calculate the radial distances between the field of view center of the visual measurement system and the center of the standard glass spheres measured by each grid to construct the corresponding physical prior error function. Construct a non-homogeneous linear equation to solve for the coefficients of the physical prior error function, where: The formula for the physical prior error function is as follows: in, express The physical prior error, This represents the radial distance from the center of the field of view of the vision measurement system to the center of the standard glass sphere being measured using the current grid. This represents the zero-bias error term of the vision measurement system; This represents the magnification error term of the vision measurement system; This represents the radial distortion term of the visual measurement system; This represents the higher-order radial error term of the vision measurement system; This represents the residual higher-order error term of the vision measurement system; The formula for the non-homogeneous linear equation is as follows: in, For all grids The constructed variable matrix has dimensions of ; for The vector formed Let be a vector consisting of the physical prior errors corresponding to all grids, with dimension . , For transpose; S7.3 Build and train the SVR model to obtain the trained SVR model; S7.4 Construct an online drift error model based on exponential moving average to obtain the drift error of the standard glass ball at the corresponding time. S7.5 Calculate the radial distance between the center of the final fitted circle of the optical element under test and the center of the field of view. Forming a six-tuple Inputting the data into the trained SVR model yields the system residuals of the optical element under test. , The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates This represents the radial distance between the center of the final fitted circle after normalization and the center of the field of view. For edge quality credibility, For model consistency and credibility, To assess the reliability of the fit stability; S7.6 Calculate the physical prior error of the optical element under test based on the solved physical prior error function, and take the sum of the physical prior error of the optical element under test, the system residual and the drift error of the standard glass ball at the current moment as the final prediction error of the optical element under test. Then, compensate the final prediction error of the optical element under test to the radius of the final fitted circle to obtain the final circle measurement result of the optical element under test.
[0014] Preferably, the training process of the SVR model is as follows: S7.3.1 Calculate the edge quality confidence level based on the mean and standard deviation of the fusion confidence levels of the sub-pixel edge points corresponding to all edge points in the fitted edge point set. The formula is as follows: in, This represents the mean of the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. The standard deviation represents the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. Represents an exponential function; S7.3.2 Calculate the mean of the comprehensive scores of all edge points in the fitted edge point set as the model consistency reliability. ; S7.3.3 Calculate the stability reliability of the fit based on the mean square error of all edge points in the fitted edge point set. The formula is as follows: in, This represents the mean square error of the geometric residuals of all edge points in the fitted edge point set. This is the second experience value; S7.3.4 Obtaining the Reconstructed Feature Sample Set , For the first The center of a standard glass sphere measured by a grid. Direction coordinates For the first The center of a standard glass sphere measured by a grid. Direction coordinates From the center of the field of view of the normalized visual measurement system to the first The radial distance between the centers of a standard glass sphere measured by a grid. To determine the reliability of the normalized edge quality, To determine the consistency reliability of the normalized model, The normalized fit stability reliability; S7.3.5. Based on the measurement error and physical prior error of each reconstructed feature sample in the reconstructed feature sample set, calculate the corresponding system residual, and use the system residual of each reconstructed feature sample in the reconstructed feature sample set as the output target of the SVR model. Then, the system residual of the first reconstructed feature sample in the reconstructed feature sample set... The system residual of a reconstructed feature sample , For the first The physical prior error of each reconstructed feature sample; S7.3.6 Construct an SVR model and optimize the hyperparameter space of the SVR model within a preset parameter search range using the Bayesian optimization algorithm. Perform parameter optimization until the termination condition of the third iteration is met, thus obtaining the optimal hyperparameter optimization space. ,in, As a penalty factor, For kernel parameters, Insensitive interval The optimal penalty factor is... For optimal kernel parameters, This is the optimal insensitive interval; S7.3.7, Optimization Space Based on Optimal Hyperparameters The SVR model is trained using the reconstructed feature sample set to obtain a trained SVR model.
[0015] Preferably, an online drift error model is constructed based on exponential moving average to obtain the drift error of the standard glass ball at the corresponding time point, as follows: S7.4.1 Constructing an online drift error model based on exponential moving average: in, Standard glass beads Online drift error at any moment, Standard glass beads Online drift error at any moment Standard glass beads The drift error in time, The weights for the drift error; S7.4.2, Place the standard glass beads Time drift error Substituting into the online drift error model, a standard glass sphere is obtained. Online drift error at time , The radius of a standard glass sphere. for The radius of the standard glass sphere measured at any given time; S7.4.3, Place the standard glass beads Online drift error at time Reassigned to the standard glass ball Time drift error .
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention utilizes the Gaussian derivative method and the Hessian matrix, along with the Steger algorithm, to extract sub-pixel edge points, forming a sub-pixel edge point set. A fusion reliability evaluation model is then constructed to obtain fusion reliability, achieving precise sub-pixel edge localization and edge quality evaluation. Subsequently, coordinate correction mapping is performed based on the telecentric lens field-of-view distortion, enabling high-precision spatial correction of the sub-pixel edge points. Furthermore, a RANSAC outlier removal model based on gradient weights, reliability weights, and distance weights is constructed to achieve robust edge point screening. Finally, the LM circle fitting algorithm is used to obtain the final fitted circle, and a full-field-of-view error compensation model is proposed, encompassing fusion edge quality reliability, model consistency reliability, and fitting stability reliability, to achieve high-precision circle parameter estimation. Details are as follows: 1) Extract the sub-pixel edge region of the image of the optical element under test and use the sub-pixel edge extraction algorithm to extract the candidate edge point set of the sub-pixel edge region. The sub-pixel edge extraction algorithm uses the Gaussian derivative method to construct the continuous gradient field of the image to calculate the gradient, first derivative and second derivative of each pixel of the smooth image. The Hessian matrix is used to analyze the local structure of the edge to achieve high-precision sub-pixel edge localization. At the same time, a fusion confidence evaluation model is constructed as the edge quality evaluation model. The gradient intensity confidence, Hessian response confidence and orientation consistency confidence are fused to assign a fusion confidence to each sub-pixel edge point, so that edge localization and edge quality evaluation are completed simultaneously, providing a reliable data foundation for subsequent anomaly point screening and circle fitting.
[0017] 2) Construct a multi-dimensional fusion weighted scoring mechanism to remove abnormal edge points. That is, obtain a comprehensive score by weighting and fusing the gradient weight, confidence weight and distance weight of each edge point. Use the comprehensive score to guide the evaluation process of candidate circle models, so that high-quality edge points have a higher sampling probability and a greater model contribution, realize the accurate identification and removal of abnormal points and noise points, and improve the purity of edge point set and the stability and robustness of candidate circle model construction.
[0018] 3) A robust LM circle fitting algorithm with multi-source weight fusion is employed to obtain the final fitted circle. This involves constructing a loss function based on the Huber kernel to obtain Huber weights, and introducing a multi-source weight fusion mechanism that integrates confidence weights, model score weights, and Huber weights to adaptively adjust the contribution of edge points (total weight). The Huber kernel is used to continuously reduce the weights of edge points with large residuals, effectively suppressing the influence of residual outliers on the fitting results. The LM circle fitting algorithm is then combined to achieve high-precision iterative solutions for the circle center and radius parameters. This method significantly improves the stability, repeatability, and anti-interference ability of circle fitting, and can effectively reduce center drift and radius errors caused by abnormal edge points in industrial micrometer-level size measurements.
[0019] 4) The measurement error of the final fitted circle is compensated in multiple levels using a full-field-of-view error compensation model to obtain the final circle measurement result of the optical element under test. Specifically, a physical prior error function is constructed by combining the telecentric optical imaging mechanism. Error learning samples (reconstructed feature sample set) are established using the measurement position, radial distance, and reliability characteristics of the standard glass ball. Bayesian optimization is used to automatically optimize the hyperparameter optimization space of the SVR model. The SVR model is trained using the reconstructed feature sample set to achieve physical prior error compensation and system residual calculation. At the same time, an online drift error model is constructed based on exponential moving average to track and dynamically correct time-varying errors such as temperature changes in real time. The sum of the physical prior error of the optical element under test, the system residual, and the drift error of the standard glass ball at the current moment is used as the final prediction error of the optical element under test. The final prediction error of the optical element under test is then compensated to the radius of the final fitted circle to obtain the final circle measurement result of the optical element under test. Through multi-level error compensation, the measurement accuracy, consistency, and model generalization ability in the full field of view are improved, and the optimal estimation of the nonlinear error in the full field of view is achieved.
[0020] This invention constructs a reliability transfer mechanism for the entire process of edge extraction, outlier removal, circle fitting, and error compensation. It introduces telecentric optical imaging physical priors and integrates physical prior errors, system residuals, and online drift error compensation to achieve full-link closed-loop control of measurement errors. This significantly improves the accuracy, consistency, and long-term stability of micron-level industrial circle measurement. It can achieve sub-pixel positioning accuracy of 0.02 pixels and repeatability of sub-micron-level circle radius measurement, and can be widely used in the field of precision industrial visual inspection. Attached Figure Description
[0021] Figure 1 This is a flowchart of the circle measurement method based on reliability transfer and multi-level error compensation of the present invention; Figure 2 This is a visualization of the image of the optical element under test in this invention before and after circle measurement; Figure 3 This is a graph showing the diameter results of repeated measurements of different glass beads according to the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] It should be noted that when a component is referred to as being "connected" to another component, it can be directly connected to the other component or there may be an intervening component. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application.
[0024] like Figures 1-3 As shown, the circle measurement method based on reliability transfer and multi-level error compensation includes the following steps: S1. Set up a vision measurement system to acquire images of the optical components under test and form images of the optical components under test.
[0025] In one embodiment, the vision measurement system includes an industrial camera, a telecentric lens, and a telecentric parallel light source. The telecentric lens is connected to the industrial camera, and the optical axis of the telecentric parallel light source is parallel to the optical axis of the telecentric lens. The telecentric parallel light source is used to provide backlight illumination for the optical element under test. By adjusting the distance between the telecentric lens and the optical element under test, the system focuses and captures an image of the optical element under test.
[0026] In this embodiment, a vision measurement system is constructed to acquire images of the optical component under test. Preferably, a high-precision vision measurement system is composed of a CH series industrial camera from Hangzhou Hikvision Robotics Co., Ltd., a DRCA series telecentric lens from Shenzhen Vision Technology Co., Ltd., and a telecentric parallel light source. The telecentric parallel light source can be any existing telecentric parallel light source. Specifically, when installing the industrial camera, telecentric lens, and telecentric parallel light source, all three are fixed on a bracket. The telecentric lens and the telecentric parallel light source maintain parallel optical axes, preferably coaxial. The optical component under test is placed on a stage, which is either a linear drive unit capable of moving the optical component under test along the optical axis (e.g., the Z-axis) or a three-axis linear drive unit capable of moving the optical component under test along the X, Y, and Z axes. The telecentric parallel light source provides backlight illumination to the optical component under test, placing it between the telecentric parallel light source and the telecentric lens. The distance between the optical component under test and the telecentric lens is adjusted based on the stage until the telecentric lens's focal plane is aligned to ensure clear imaging. In this embodiment, the optical element under test is a small glass ball. If the outer contour circle of the glass ball is measured, it can be adjusted according to actual needs. For example, if the optical element under test is an optical lens, prism, optical window, optical wafer, etc., an image of the optical element under test is acquired to form an image of the optical element under test.
[0027] To ensure the stability of image acquisition from the industrial camera, the image acquisition parameters were set as follows: exposure time of 2500μs, gain of 0dB, image format of mono8, field of view of 28mm×20mm, and pixel resolution of 6.9μm. Other parameters were kept at their default settings.
[0028] S2. Extract sub-pixel edge regions from the image of the optical element under test based on the adaptive dynamic ROI algorithm.
[0029] In one embodiment, the adaptive dynamic ROI algorithm performs the following operations: S2.1 Perform noise filtering on the image of the optical component under test; S2.2. Based on the Hough circle detection algorithm, coarsely locate the image of the optical element under test after noise filtering to obtain the target circular region; S2.3. Adaptively extract sub-pixel edge regions based on the target circular region, i.e., the coordinates of the center point of the sub-pixel edge region are... Width is Height is ,in, The center of the target circular region Direction coordinates The center of the target circular region Direction coordinates The radius of the target circular region. For the preset width increment threshold, To preset the height increment threshold, and , .
[0030] In this process, after noise filtering is applied to the image of the optical element under test, since there are generally a large number of background areas in the image of the optical element under test, in order to reduce the amount of computation in processing the image of the optical element under test, the circular region in the image of the optical element under test after noise filtering is coarsely located based on the Hough circle detection algorithm to obtain the target circular region, and the sub-pixel edge region is adaptively extracted based on the target circular region.
[0031] Specifically, the adaptive dynamic ROI algorithm, based on the Hough circle detection algorithm, coarsely locates the target circular region in the noise-filtered image of the optical element under test. Then, it applies adaptive dynamic ROI constraints to the acquired target circular region. Gaussian filtering is preferred for the noise filtering preprocessing. The ROI region (sub-pixel edge region) is adaptively extracted, preferably... It can also be adjusted according to actual needs to obtain an image covering the target circular area, thereby improving the continuity and robustness of edge extraction.
[0032] S3. Use a sub-pixel edge extraction algorithm to extract sub-pixel edge points in the sub-pixel edge region to obtain a candidate edge point set. Each sub-pixel edge point in the candidate edge point set carries coordinates and fusion confidence.
[0033] In one embodiment, the sub-pixel edge extraction algorithm performs the following operations: S3.1. Gaussian smoothing is applied to the sub-pixel edge region to form a smooth image, and the gradient, first derivative and second derivative of each pixel of the smooth image are calculated using the Gaussian derivative method. S3.2 Construct the Hessian matrix of each pixel based on the second derivative of each pixel in the smoothed image; S3.3. Based on the Hessian matrix of each pixel, use the Steger algorithm to extract sub-pixel edge points to form a sub-pixel edge point set; S3.4. Use the fusion credibility evaluation model to obtain the fusion credibility of each sub-pixel edge point in the sub-pixel edge point set. The fusion credibility evaluation model performs the following operations: S3.4.1. Calculate the magnitude of the gradient of the corresponding sub-pixel edge point based on the first derivative of each pixel in the smooth image, and then normalize it to obtain the gradient strength confidence of the corresponding sub-pixel edge point. S3.4.2 Calculate the Hessian response confidence level of each sub-pixel edge point; S3.4.3 Calculate the standard deviation of the normal direction angle of all sub-pixel edge points in the preset neighborhood of each sub-pixel edge point, and obtain the direction consistency confidence of the corresponding sub-pixel edge point based on the standard deviation of the normal direction angle. S3.4.4. The gradient intensity confidence, Hessian response confidence, and orientation consistency confidence of the corresponding sub-pixel edge points are weighted and fused to obtain the fused confidence of the corresponding sub-pixel edge points. S3.5. Retain sub-pixel edge points with a fusion confidence level greater than the confidence level threshold to form a candidate edge point set.
[0034] In one embodiment, the set of corrected edge points is represented as follows: in, To correct the set of edge points, The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates For the first The reliability of fusion of sub-pixel edge points This is the set of indices for sub-pixel edge points in the candidate edge point set.
[0035] Specifically, a sub-pixel edge extraction algorithm is used to extract sub-pixel edge points from the sub-pixel edge region to obtain a candidate edge point set, as detailed below: 3.1) Image Preprocessing and Gaussian Derivative Space Construction: After obtaining the sub-pixel edge regions, Gaussian smoothing is first applied to these regions to form a smooth image, suppressing the influence of random noise on gradient calculation. Simultaneously, the gradient, first derivative, and second derivative of each pixel in the smooth image are calculated using the Gaussian derivative method.
[0036] 3.2) Hessian Matrix Construction: Based on the second derivative of each pixel in the smoothed image, a Hessian matrix is constructed for each pixel in the smoothed image. Hessian matrix : in, To smooth the pixels of the image of Directional second derivative, To smooth the pixels of the image of and Mixed second derivative of direction, To smooth the pixels of the image of Directional second derivative, , , The pixels that make up a smooth image The second derivative of .
[0037] 3.3) Based on the Hessian matrix of each pixel, the Steger algorithm is used to extract sub-pixel edge points to form a sub-pixel edge point set. , means as follows: in, For the first Sub-pixel edge points, , This is the set of indices of sub-pixel edge points within the set of sub-pixel edge points. , For the first Sub-pixel edge points Direction coordinates For the first Sub-pixel edge points Direction coordinates.
[0038] 3.4) Use the fusion credibility evaluation model to obtain the fusion credibility of each sub-pixel edge point in the sub-pixel edge point set.
[0039] To further improve the reliability of edge extraction in complex industrial environments, a multi-dimensional reliability evaluation model is constructed, including gradient strength reliability, Hessian response reliability, and orientation consistency reliability. This model is used to evaluate the quality of each sub-pixel edge point in the sub-pixel edge point set and obtain the fusion reliability of the corresponding sub-pixel edge point.
[0040] By integrating the credibility evaluation model, the following operations are performed: 3.4.1) Calculate the gradient intensity confidence level of each sub-pixel edge point, including: Calculate the magnitude of the gradient at the current sub-pixel edge point. The formula is as follows: in, The smoothed image pixels corresponding to the current sub-pixel edge points Directional first derivative, The smoothed image pixels corresponding to the current sub-pixel edge points Directional first derivative, , Together they form the first derivative of the pixels in the smooth image corresponding to the current sub-pixel edge point.
[0041] Will Normalization is used to obtain the gradient intensity confidence level of the current sub-pixel edge point. : in, It represents the maximum magnitude of the gradient of all sub-pixel edge points in the set of sub-pixel edge points.
[0042] The larger the gradient magnitude, the more obvious the edge, and the higher its reliability.
[0043] 3.4.2) Calculate the Hessian response confidence of each sub-pixel edge point, using the following formula: in, The confidence level of the Hessian response of the current sub-pixel edge point. The first eigenvalue of the Hessian matrix of the current sub-pixel edge point. Let be the second eigenvalue of the Hessian matrix of the current sub-pixel edge point, and , Indicates taking The absolute value, Indicates taking The absolute value, To prevent constants with a denominator of zero, the value is taken as... ~ In this embodiment, we take .
[0044] The saliency of edge structure is described using the eigenvalue ratio of the Hessian matrix. True edge regions in smooth images typically exhibit obvious unidirectional curvature features; therefore, the confidence level of the Hessian response can effectively distinguish edges from texture noise.
[0045] 3.4.3) Calculate the directional consistency reliability of each sub-pixel edge point, as follows: Within a preset neighborhood of the current sub-pixel edge point, the normal direction angles of each sub-pixel edge point are statistically analyzed, and the standard deviation of the normal direction angles is calculated based on the statistically analyzed normal direction angles. .
[0046] The directional consistency reliability of the current sub-pixel edge point is calculated based on the standard deviation of the normal direction angle. The formula is as follows: in, This represents an exponential function.
[0047] The smoother the directional change in a continuous edge region, the higher its consistency score (directional consistency reliability).
[0048] 3.4.4) The gradient intensity confidence, Hessian response confidence, and orientation consistency confidence of each sub-pixel edge point are weighted and fused to obtain the fused confidence of the corresponding sub-pixel edge point. : in, , The weights for the confidence level of the gradient strength. The weights for the credibility of Hessian responses. The weight for the credibility of directional consistency. .
[0049] 3.5) Sub-pixel edge points are filtered based on the fusion confidence of all sub-pixel edge points, i.e., by setting a confidence threshold. Sub-pixel edge points with a fusion confidence score greater than a confidence score threshold are retained, and the retained fusion confidence scores are saved as weights for the corresponding sub-pixel edge points to form a candidate edge point set. , means as follows: in, For the first The reliability of fusion of sub-pixel edge points Let be the set of indices of sub-pixel edge points in the candidate edge point set, and .
[0050] S4. Based on several calibration board images acquired by the vision measurement system, the camera intrinsic parameters are obtained using Zhang's calibration method. Based on the camera intrinsic parameters, the coordinate correction mapping of the candidate edge point set is performed to obtain the corrected edge point set.
[0051] Among them, the camera intrinsic parameters are obtained using Zhang's calibration method based on several calibration plate images captured by the industrial camera, and the candidate edge point set is then determined based on the camera intrinsic parameters. The coordinate correction mapping is performed to obtain the set of correction edge points, as follows: 4.1) Acquire calibration plate images: Take 24 to 36 calibration plate images with an industrial camera. If a glass calibration plate with a precision of 10μm is used, the size of the glass calibration plate should be 1 / 2 to 2 / 3 of the field of view of the industrial camera. Move the glass calibration plate and take several calibration plate images continuously to ensure that the continuously captured glass calibration plate images can completely cover the field of view of the industrial camera.
[0052] 4.2) Telecentric lens distortion calibration: Camera intrinsic parameters, including pixel scale, are obtained from several calibration board images acquired by the industrial camera using Zhang's calibration method. The coordinates of the principal point and distortion parameters ,in, For calibration board image Pixel focal length in direction For calibration board image Pixel focal length in direction Principal point of the calibration board image Direction coordinates Principal point of the calibration board image Direction coordinates The coefficients are, in order, the first-order coefficients, the second-order coefficients, and the third-order coefficients of radial distortion. The first tangential distortion coefficient and the second tangential distortion coefficient are, in order.
[0053] 4.3) Candidate edge point set correction mapping: Based on camera intrinsic parameters, the candidate edge point set... Perform coordinate correction mapping to obtain the set of correction edge points. : in, The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates.
[0054] After calibrating the field of view distortion of the telecentric lens, the coordinate correction mapping of all sub-pixel edge points in the candidate edge point set is completed. The coordinate correction mapping is to correct the coordinates of the sub-pixel edge points in the candidate edge point set using the camera intrinsic parameters, which is a conventional technique well known to those skilled in the art.
[0055] S5. Construct an edge point filtering model based on the corrected edge point set to obtain a fitted edge point set.
[0056] In one embodiment, an edge point filtering model is constructed based on the corrected edge point set to obtain a fitted edge point set, as follows: S5.1 Construct the first edge point set based on the corrected edge point set. : in, For the first set of edge points, the th The edge gradient intensity at the i-th edge point, i.e., the edge gradient intensity at the i-th edge point The magnitude of the gradient at each sub-pixel edge point; S5.2, From the set of first edge points Calculate the parameters of the initial circle by randomly selecting three non-collinear edge points. Based on the parameters of the initial circle Get the first Candidate circle models generated by round iteration : in, The center of the initial circle Direction coordinates The center of the initial circle Direction coordinates The radius of the initial circle, For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The radius of the candidate circle model generated by the round of iterations. , Let be the number of iterations at which the iteration terminates during the generation of the candidate circle model, and , , ; S5.3 Calculate the first edge point in the first edge point set. The edge point to the first The radial distance of the center of the candidate circle model generated by the round iteration Then the first In the first set of edge points in the round of iteration Distance residual of each edge point ; S5.4, the first edge point set... Normalize the edge gradient intensity of the nth edge point to obtain the nth edge point in the first set of edge points. Gradient weights at each edge point ; S5.5, Obtain the first edge point from the first edge point set. Credibility weight of each edge point ; S5.6 Calculate the first edge point in the first edge point set based on the Gaussian decay model. Distance weight of each edge point ; S5.7. The gradient weight, confidence weight, and distance weight of the corresponding edge points in the first edge point set are weighted and fused to obtain the comprehensive score of the corresponding edge points. The edge points with a comprehensive score greater than the score threshold are taken as inliers to form an inlier set. S5.8, The sum of the comprehensive scores of all edge points in the interior point set is taken as the first... Model scoring of candidate circle models generated in rounds of iteration; S5.9 Determine if the termination condition of the first iteration is met. If yes, proceed to step S5.10; otherwise, set... Return to step S5.2; S5.10. Select the set of interior points of the candidate circle model with the highest model score as the set of fitting edge points. , means as follows: in, The set of interior points of the candidate circle model with the highest model score. The model score weights for each edge point , This is the set of indices of all edge points in the set of interior points of the candidate circle model with the highest model score.
[0057] Among them, based on the set of corrected edge points Construct an edge point selection model to obtain a set of fitted edge points. The details are as follows: 5.1) Based on the set of correction edge points Construct the first set of edge points : Among them, the first set of edge points edge points Represented as: in, For the first set of edge points, the th The edge gradient intensity at the i-th edge point, i.e., the edge gradient intensity at the i-th edge point The magnitude of the gradient at each sub-pixel edge point. For the first The reliability of fusing sub-pixel edge points.
[0058] 5.2) Random generation of candidate circle models: from the first set of edge points Calculate the parameters of the initial circle by randomly selecting three non-collinear edge points. Based on the parameters of the initial circle Get the first The candidate circle model generated by the round of iterations is represented as follows: in, The center of the initial circle Direction coordinates The center of the initial circle Direction coordinates The radius of the initial circle, For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The radius of the candidate circle model generated by the round of iterations. , Let be the number of iterations at which the iteration terminates during the generation of the candidate circle model, and , , .
[0059] 5.3) Edge point distance residual calculation: Calculate the residual distance of the first edge point in the first edge point set. edge points To the The radial distance of the center of the candidate circle model generated by the round iteration Then the first In the first set of edge points in the round of iteration Distance residual of each edge point , Indicates taking The absolute value of.
[0060] 5.4) Gradient Weight Calculation: Since the edges of a real circle have a large gradient response, a gradient confidence evaluation function is defined. Then, the gradient weight in the first set of edge points... Gradient weights at each edge point The calculation is as follows: in, It is the maximum value of the edge gradient intensity of all edge points in the first set of edge points.
[0061] By taking the first edge point set Normalize the edge gradient intensity of the nth edge point to obtain the nth edge point in the first set of edge points. Gradient weights at each edge point The closer the gradient weight is to 1, the stronger the gradient; the closer it is to 0, the weaker the gradient.
[0062] 5.5) Introduction of Credibility Weight: Introducing the first... fusion reliability of sub-pixel edge points As an evaluation index for edge point quality, the first... Credibility weight of each edge point , among which, the credibility of sub-pixel edge points The higher the value, the stronger the gradient. credibility of sub-pixel edge points The lower the value, the weaker the gradient.
[0063] 5.6) Calculating Distance Weights Based on Gaussian Decay Model: The traditional RANSAC (Random Sample Consensus) algorithm uses a threshold filtering method, that is, it directly removes abnormal edge points that exceed a preset threshold. This invention calculates the distance weights in the first set of edge points using a Gaussian decay model. Distance weight of each edge point : in, For distance scale parameters, in this embodiment, we take... , Represents pixels, This represents an exponential function.
[0064] When the distance residual is smaller The closer the distance is to 1, the more smoothly the distance weight will decay as the distance residual increases, which can effectively reduce the instability caused by threshold screening.
[0065] 5.7) Edge Point Filtering: A comprehensive evaluation function is constructed based on the gradient weight, confidence weight, and distance weight of each edge point, as shown in the following formula: in, Represents the first edge point set. The overall score of each edge point As the first weighting coefficient, This is the second weighting coefficient. It is the third weighting coefficient, and in this embodiment... , , .
[0066] Determine if it satisfies , As the scoring threshold, in this embodiment If so, believe It is an interior point; otherwise, it is considered... If a point is not an interior point, then all interior points are grouped into the interior point set. : .
[0067] 5.8) The sum of the comprehensive scores of all edge points in the interior point set is taken as the first... Model scoring of candidate circle models generated by round iteration : in, For the first The set of indices of all edge points in the set of interior points during each iteration. The higher the overall score of the edge points in the set of interior points, the higher the model score.
[0068] 5.9) Adaptive Iteration Termination Mechanism: Determine if the first iteration termination condition is met. If yes, execute step 5.10; otherwise, set... Then return to step 5.2) to randomly generate candidate circle models.
[0069] The first iteration termination condition is reaching the first preset number of iterations, or terminating the iteration when the convergence condition is met and there is no significant improvement after a preset number of consecutive iterations (e.g., 50 times) (e.g., remaining within the convergence condition). The formula for the convergence condition is as follows: in, For the first Model scoring of candidate circular models generated in rounds of iteration. This represents the maximum model score among the candidate circle models generated in the historical iterations.
[0070] 5.10) Select the set of interior points of the candidate circle model with the highest model score as the set of fitting edge points. Used as edge points for high-precision circle fitting, denoted as: in, The set of interior points of the candidate circle model with the highest model score. The model score weights for each edge point , This is the set of indices of all edge points in the set of interior points of the candidate circle model with the highest model score.
[0071] Among them, based on the sub-pixel edge points after distortion correction (coordinate correction mapping), an industrial-grade robust edge point screening model is established by weighted fusion of gradient weights, confidence weights, and distance weights to achieve highly robust interior point (edge point) screening.
[0072] S6. Obtain the final fitted circle using the LM circle fitting algorithm based on the set of fitted edge points.
[0073] In one embodiment, the LM circle fitting algorithm performs the following operations: S6.1. Select the candidate circle model with the highest model score as the fitted circle for the first iteration; S6.2, Execute the following... Round of iteration to obtain the first The fitted circle from each iteration is as follows: S6.2.1. Construct a loss function based on the Huber kernel and obtain the Huber weights by taking the derivative of the loss function. Then, the first weight in the set of fitted edge points... Huber weights of edge points The formula is as follows: in, Represents the first edge point in the set of fitted edge points. Geometric residuals of each edge point Take the mold. The first experience value; S6.2.2, The confidence weight, model score weight and Huber weight of the corresponding edge points in the fitted edge point set are weighted and fused to obtain the total weight of the corresponding edge points; S6.2.3 Calculate the first edge point based on the total weight of each edge point in the fitted edge point set and the loss function. The optimization objective function for each iteration is given by the following formula: in, For loss function, For the first The objective function of round-by-round iteration is optimized. For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations. To fit the set of edge points, the first... The total weight of each edge point , This represents the number of iterations at the termination point during the process of generating the fitted circle. S6.2.4 Construct the weighted normal optimization equation, as shown in the following formula: in, To fit the diagonal matrix formed by the total weights of all edge points in the edge point set, For Jacobian matrices, For transpose, Let λ be the geometric residual vector, and λ be the damping factor. Let be the identity matrix, Δ be the parameter increment, and , For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The incremental value of the radius between the fitted circles in each iteration; S6.2.5, Solve for the Δ that minimizes the objective function using the weighted normal optimization equation, and then combine it with the first... Fitting circle of round iteration , obtained the Fitting circle of round iteration , For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations; S6.3, Place Return to step S6.2 and continue until the second iteration termination condition is met, then output the final fitted circle. ,in, The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates The radius of the final fitted circle.
[0074] Among them, based on the fitted edge point set The final fitted circle is obtained using the LM circle fitting algorithm, as follows: 6.1) The candidate circle model with the highest model score is used as the fitted circle for the first round of iteration.
[0075] 6.2) Execute step Round of iteration to obtain the first The fitted circle for each iteration includes: 6.2.1) Construct the loss function based on the Huber kernel, as shown in the following formula: in, For loss function, Represents the first edge point in the set of fitted edge points. Geometric residuals of each edge point Take the mold. , For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations. The first experience value, and , It represents the standard deviation of the geometric residuals of all edge points in the fitted edge point set.
[0076] The Huber weights are obtained by taking the derivative of the loss function, and are expressed as follows: in, To fit the set of edge points, the first... Huber weights of edge points.
[0077] 6.2.2) Multi-source weight fusion: For each edge point in the fitted edge point set, the corresponding confidence weight, model score weight, and Huber weight are fused to construct the total weight. Then, the weight of the i-th edge point in the fitted edge point set is... The total weight of each edge point : In the formula, As the first weighting coefficient, This is the second weighting coefficient. It is the third weighting coefficient, and in this embodiment... , , This enhances the robustness of weight fusion.
[0078] 6.2.3) Calculate the first edge point based on the total weight of each edge point in the fitted edge point set and the loss function. The optimization objective function for each iteration is defined by the following formula: in, For the first The objective function is optimized through rounds of iteration.
[0079] 6.2.4) Weighted LM Optimization: Construct a weighted normal optimization equation, as shown in the following formula: in, To fit the diagonal matrix formed by the total weights of all edge points in the edge point set, For Jacobian matrices, For transpose, Let λ be the geometric residual vector, and λ be the damping factor. Let be the identity matrix, Δ be the parameter increment, and , For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The incremental value of the radius between the fitted circles in each iteration. , This represents the number of iterations at which the iteration terminates during the process of generating the fitted circle.
[0080] The dimension of the Jacobian matrix is... 3 corresponds to three partial derivatives, namely, the partial derivatives of the geometric residuals with respect to the center of the circle. Direction coordinates, center of circle Direction coordinates and radius The Jacobian matrix, formed by taking the partial derivatives, is used to reflect the sensitivity of the geometric residual to parameter changes. The geometric residual vector is a vector composed of the geometric residuals of all edge points in the fitted edge point set, with dimensions of . λ is the damping factor, which can effectively reduce jumps in fitting parameters and fitting divergence. The solution is obtained by minimizing the objective function. .
[0081] 6.2.5) Solve for the Δ that minimizes the objective function using the weighted normal optimization equation, combined with the first... Fitting circle of round iteration , obtained the Fitting circle of round iteration The formula is as follows: .
[0082] 6.3) Place (Return to step 6.2) until the second iteration termination condition is met, and output the final fitted circle. ,in, The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates Let be the radius of the final fitted circle. The second iteration terminates when the second preset number of iterations is reached (e.g., 200 iterations), or when the change in the objective function reaches a certain threshold. Stop iteration when For the first The objective function of round-by-round iteration is optimized. For the first The objective function is optimized through rounds of iteration.
[0083] S7. Using the full field-of-view error compensation model, multi-level error compensation is performed on the measurement error of the final fitted circle to obtain the final circle measurement result of the optical element under test.
[0084] In one embodiment, the full field-of-view error compensation model performs the following operations: S7.1, Construction of the entire field of view in the visual measurement system Using a grid, sample one image from each grid using a standard glass sphere and measure the corresponding final fitted circle. Calculate the... Measurement error per grid , The radius of a standard glass sphere. For the first The radius of a standard glass sphere measured by a grid. ; S7.2 Calculate the radial distances between the field of view center of the visual measurement system and the center of the standard glass spheres measured by each grid to construct the corresponding physical prior error function. Construct a non-homogeneous linear equation to solve for the coefficients of the physical prior error function, where: The formula for the physical prior error function is as follows: in, express The physical prior error, This represents the radial distance from the center of the field of view of the vision measurement system to the center of the standard glass sphere being measured using the current grid. This represents the zero-bias error term of the vision measurement system; This represents the magnification error term of the vision measurement system; This represents the radial distortion term of the visual measurement system; This represents the higher-order radial error term of the vision measurement system; This represents the residual higher-order error term of the vision measurement system; The formula for the non-homogeneous linear equation is as follows: in, For all grids The constructed variable matrix has dimensions of ; for The vector formed Let be a vector consisting of the physical prior errors corresponding to all grids, with dimension . , For transpose; S7.3 Build and train the SVR model to obtain the trained SVR model; S7.4 Construct an online drift error model based on exponential moving average to obtain the drift error of the standard glass ball at the corresponding time. S7.5 Calculate the radial distance between the center of the final fitted circle of the optical element under test and the center of the field of view. Forming a six-tuple Inputting the data into the trained SVR model yields the system residuals of the optical element under test. , The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates This represents the radial distance between the center of the final fitted circle after normalization and the center of the field of view. For edge quality credibility, For model consistency and credibility, To assess the reliability of the fit stability; S7.6 Calculate the physical prior error of the optical element under test based on the solved physical prior error function, and take the sum of the physical prior error of the optical element under test, the system residual and the drift error of the standard glass ball at the current moment as the final prediction error of the optical element under test. Then, compensate the final prediction error of the optical element under test to the radius of the final fitted circle to obtain the final circle measurement result of the optical element under test.
[0085] In one embodiment, the training process of the SVR model is as follows: S7.3.1 Calculate the edge quality confidence level based on the mean and standard deviation of the fusion confidence levels of the sub-pixel edge points corresponding to all edge points in the fitted edge point set. The formula is as follows: in, This represents the mean of the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. The standard deviation represents the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. Represents an exponential function; S7.3.2 Calculate the mean of the comprehensive scores of all edge points in the fitted edge point set as the model consistency reliability. ; S7.3.3 Calculate the stability reliability of the fit based on the mean square error of all edge points in the fitted edge point set. The formula is as follows: in, This represents the mean square error of the geometric residuals of all edge points in the fitted edge point set. This is the second experience value; S7.3.4 Obtaining the Reconstructed Feature Sample Set , For the first The center of a standard glass sphere measured by a grid. Direction coordinates For the first The center of a standard glass sphere measured by a grid. Direction coordinates From the center of the field of view of the normalized visual measurement system to the first The radial distance between the centers of a standard glass sphere measured by a grid. To determine the reliability of the normalized edge quality, To determine the consistency reliability of the normalized model, The normalized fit stability reliability; S7.3.5. Based on the measurement error and physical prior error of each reconstructed feature sample in the reconstructed feature sample set, calculate the corresponding system residual, and use the system residual of each reconstructed feature sample in the reconstructed feature sample set as the output target of the SVR model. Then, the system residual of the first reconstructed feature sample in the reconstructed feature sample set... The system residual of a reconstructed feature sample , For the first The physical prior error of each reconstructed feature sample; S7.3.6 Construct an SVR model and optimize the hyperparameter space of the SVR model within a preset parameter search range using the Bayesian optimization algorithm. Perform parameter optimization until the termination condition of the third iteration is met, thus obtaining the optimal hyperparameter optimization space. ,in, As a penalty factor, For kernel parameters, Insensitive interval The optimal penalty factor is... For optimal kernel parameters, This is the optimal insensitive interval; S7.3.7, Optimization Space Based on Optimal Hyperparameters The SVR model is trained using the reconstructed feature sample set to obtain a trained SVR model.
[0086] In one embodiment, an online drift error model is constructed based on exponential moving average to obtain the drift error of the standard glass ball at a corresponding time, as follows: S7.4.1 Constructing an online drift error model based on exponential moving average: in, Standard glass beads Online drift error at any moment Standard glass beads Online drift error at any moment Standard glass beads The drift error in time, The weights for the drift error; S7.4.2, Place the standard glass beads Time drift error Substituting into the online drift error model, a standard glass sphere is obtained. Online drift error at time , The radius of a standard glass sphere. for The radius of the standard glass sphere measured at any given time; S7.4.3, Place the standard glass beads Online drift error at time Reassigned to the standard glass ball Time drift error .
[0087] Specifically, a multi-level error compensation model is used to compensate for the measurement error of the final fitted circle, as follows: 7.1) Calibration data grid sampling based on the entire field of view: Constructing a calibration data grid based on the entire field of view of the industrial camera. Using a grid, an image is sampled from each grid using a high-precision standard glass sphere, and the corresponding final fitted circle is measured. The i-th grid is then calculated. Measurement error per grid , The radius of a standard glass sphere. For the first The radius of a standard glass sphere measured by a grid. , The number of grids, i.e. Specifically, for example, if the grid size is 2... 2 pixels (preferably a square grid with a side length equal to the diameter of a standard glass sphere), full field of view width and height 4096. 3000 pixels, then the number of grids in the width direction of the entire field of view. =2048, the number of grid cells in the height direction of the entire field of view. =1500. Following a preset sampling strategy, a standard glass sphere is placed at different positions within the field of view, using the center of the industrial camera's field of view as the origin, along zigzag and square-shaped trajectories. Measurements are performed using steps S2 to S6 to obtain the radius of the final fitted circle of the standard glass sphere, which is then used as the radius of the measured standard glass sphere. The center of the industrial camera's field of view is taken as the center of the vision measurement system's field of view.
[0088] 7.2) Construction of Physical Prior Error Function: The radial distances between the field of view center of the industrial camera and the center of the standard glass spheres measured at each grid are calculated to construct the corresponding physical prior error function, as shown in the following formula: in, express The physical prior error, This represents the radial distance from the center of the industrial camera's field of view to the center of the standard glass sphere measured by the current grid. This represents the zero-bias error term of the visual measurement system, i.e., the error at the center of the field of view; The magnification error term of the vision measurement system can represent the linear change of measurement error with radial distance. This represents the radial distortion term of the visual measurement system, primarily reflecting barrel and pincushion distortion. This represents the higher-order radial error term of the vision measurement system, used to represent the asymmetric error of the vision measurement system. It represents the residual higher-order error term of the vision measurement system and can be used to compensate for calibration errors and assembly errors.
[0089] Using the center of the field of view of an industrial camera as the center, images of standard glass spheres are sampled at radial intervals of more than 5 grids. The coefficients of each term of the physical prior error function are calculated. The terms of the physical prior error function are solved by constructing a non-homogeneous linear equation. The formula for the non-homogeneous linear equation is as follows: in, For all grids The constructed variable matrix has dimensions of ; for The vector formed Let be a vector consisting of the physical prior errors corresponding to all grids, with dimension . .
[0090] Transform the equations to solve The coefficients of each term in the physical prior error function can be obtained. .
[0091] The residual distortion of telecentric lenses, including higher-order radial distortion and lens assembly adjustment errors, can cause measurement errors to vary with the field of view radius. Modeling the physical prior errors of the vision measurement system facilitates the solution.
[0092] 7.3) Construct and train the SVR model to obtain a trained SVR model. The training process of the SVR model is as follows: 7.3.1) Calculate edge quality confidence level The formula is as follows: in, in, This represents the mean of the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. The standard deviation represents the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. For the first The reliability of fusion of sub-pixel edge points express The cardinality, that is The number of elements in the matrix. This is determined by mean and dispersion analysis based on the fusion confidence distribution of sub-pixel edge points output by S4.
[0093] 7.3.2) Calculate the consistency credibility of the model The formula is as follows: in, To fit the set of edge points, the first... The average score of each edge point is obtained by calculating the average score of the interior points in the final fitted circle output from step S5.
[0094] 7.3.3) Calculate the reliability of the fit stability The formula is as follows: in, in, This represents the mean square error of the geometric residuals of all edge points in the fitted edge point set. Represents the set of fitted edge points. Geometric residuals of each edge point As the second empirical value, it is taken in this embodiment. Based on the geometric residual distribution output by S6, the average geometric error is calculated from the geometric residuals, and the reliability decay mechanism in the error propagation law is used to construct the fitting stability reliability.
[0095] 7.3.4) Sample Data Feature Construction: Based on the radial distance from the center of the industrial camera's field of view to the center of the standard glass spheres measured in each grid, and simultaneously considering the edge quality reliability... Model consistency credibility and the reliability of fit stability After normalization, the reconstructed feature sample set is formed as follows: , The normalized field of view center of the industrial camera to the first The radial distance between the centers of a standard glass sphere measured by a grid. To determine the reliability of the normalized edge quality, To determine the consistency reliability of the normalized model, To assess the reliability of the normalized fit stability, For the first The center of a standard glass sphere measured by a grid. Direction coordinates For the first The center of a standard glass sphere measured by a grid. Direction coordinates.
[0096] 7.3.5) Based on the measurement error and physical prior error of each reconstructed feature sample in the reconstructed feature sample set, calculate the corresponding system residual, and use the system residual of each reconstructed feature sample in the reconstructed feature sample set as the output target of the SVR model. Then, the system residual of the first reconstructed feature sample in the reconstructed feature sample set... The system residual of a reconstructed feature sample , For the first The physical prior error of each reconstructed feature sample.
[0097] 7.3.6) Construct an SVR model and optimize the hyperparameter space of the SVR model within a preset parameter search range using the Bayesian optimization algorithm. Perform parameter optimization until the termination condition of the third iteration is met, thus obtaining the optimal hyperparameter optimization space. ,in, The optimal penalty factor is... For optimal kernel parameters, This represents the optimal insensitive interval. Existing technologies construct SVR models based on the radial basis function (RBF), and the hyperparameter optimization space of the SVR model... The main optimizations target three types of hyperparameters, including the penalty factor. nuclear parameters and insensitive intervals The technology is well-known to those skilled in the art and will not be elaborated upon here.
[0098] In this embodiment, the preset parameter search range for the hyperparameter optimization space of the SVR model is: , , Within the preset parameter search range, perform iterative optimization based on the Bayesian optimization algorithm until the third iteration termination condition is met (such as reaching the third preset iteration number or the system error converging to a preset error threshold). This serves as the optimal hyperparameter optimization space for the SVR model.
[0099] 7.3.7) Optimization Space Based on Optimal Hyperparameters The SVR model is trained using a reconstructed feature sample set, and the trained SVR model is used as the final model for online prediction.
[0100] 7.4) Online drift error model: An online drift error model is constructed based on exponential moving average. It is mainly used to represent the drift error generated by the visual measurement system over time. Online drift sample collection involves automatically sampling and measuring the radius of a standard glass ball at fixed intervals during the operation of the visual measurement system.
[0101] Constructing an online drift error model based on exponential moving average: in, Standard glass beads Online drift error at any moment Standard glass beads Online drift error at any moment Standard glass beads The drift error in time, As the weight of the drift error, In this embodiment, take .
[0102] standard glass beads Time drift error Substituting into the online drift error model, a standard glass sphere is obtained. Online drift error at time And reassign the value to the standard glass ball. Time drift error , for The radius of a standard glass sphere measured at a specific time.
[0103] 7.5) Calculate the radial distance between the center of the final fitted circle and the center of the field of view. Forming a six-tuple Inputting the data into the trained SVR model yields the system residuals of the optical element under test. , This is the radial distance between the center of the final fitted circle after normalization and the center of the field of view.
[0104] 7.6) Final Error Compensation: Calculate the final prediction error of the optical element under test and compensate it to the radius of the final fitted circle to obtain the final circle measurement result of the optical element under test. The calculation is as follows: in, in, For the final prediction error, The radius of the final fitted circle, This represents the physical prior error of the optical element under test. The system residual of the optical element under test, This represents the drift error of the standard glass ball at the current moment, which is also the value after being reassigned.
[0105] Calculate edge quality confidence respectively Model consistency credibility and the reliability of fit stability As sample weights in the SVR model training process, they participate in error learning, achieving full field-of-view error compensation at multiple levels, including physical prior error, system residual, and drift error.
[0106] To facilitate understanding, the method of this invention will be verified through specific experiments below.
[0107] This embodiment uses the Optuna hyperparameter optimization framework and the scikit-learn machine learning library in a Python environment to train an SVR model using the OpenCV library. The preset number of iterations for SVR model training is 1000 rounds. The optimizer used is the SMO optimizer built into OpenCV, and the hyperparameter search range is the preset parameter search range.
[0108] Figure 2 In the figure, (a) is an image of the optical element under test (in this embodiment, the optical element under test is a glass ball), and (b) shows the outline of the final fitted circle (red circle). Figure 3 Repeated measurements were performed on four different glass spheres. The error precision (after removing outliers) of the diameter data from the repeated measurements in Figures (a) to (d) were ±0.1 μm, ±0.15 μm, ±0.15 μm, and ±0.1 μm, respectively. The experimental results show that this method can effectively reduce measurement errors. It can be controlled within ±0.2μm to achieve submicron level measurement.
[0109] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0110] The embodiments described above are merely specific and detailed examples of the embodiments described in this application, and should not be construed as limiting the scope of the application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A circle measurement method based on reliability transfer and multi-level error compensation, characterized in that: Includes the following steps: S1. Set up a vision measurement system to acquire images of the optical component under test and form an image of the optical component under test; S2. Extract sub-pixel edge regions from the image of the optical element under test based on the adaptive dynamic ROI algorithm; S3. Use a sub-pixel edge extraction algorithm to extract sub-pixel edge points in the sub-pixel edge region to obtain a candidate edge point set. Each sub-pixel edge point in the candidate edge point set carries coordinates and fusion confidence. S4. Based on several calibration board images acquired by the visual measurement system, the camera intrinsic parameters are obtained using Zhang's calibration method. Based on the camera intrinsic parameters, the coordinate correction mapping of the candidate edge point set is performed to obtain the corrected edge point set. S5. Construct an edge point filtering model based on the corrected edge point set to obtain a fitted edge point set; S6. Obtain the final fitted circle using the LM circle fitting algorithm based on the set of fitted edge points; S7. Using the full field-of-view error compensation model, multi-level error compensation is performed on the measurement error of the final fitted circle to obtain the final circle measurement result of the optical element under test.
2. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 1, characterized in that: The vision measurement system includes an industrial camera, a telecentric lens, and a telecentric parallel light source. The telecentric lens is connected to the industrial camera, and the optical axis of the telecentric parallel light source is parallel to the optical axis of the telecentric lens. The telecentric parallel light source is used to provide backlight illumination for the optical element under test. By adjusting the distance between the telecentric lens and the optical element under test, the system focuses and captures an image of the optical element under test.
3. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 1, characterized in that: The adaptive dynamic ROI algorithm performs the following operations: S2.1 Perform noise filtering on the image of the optical component under test; S2.
2. Based on the Hough circle detection algorithm, coarsely locate the image of the optical element under test after noise filtering to obtain the target circular region; S2.
3. Adaptively extract sub-pixel edge regions based on the target circular region, i.e., the coordinates of the center point of the sub-pixel edge region are... Width is Height is ,in, The center of the target circular region Direction coordinates The center of the target circular region Direction coordinates The radius of the target circular region. For the preset width increment threshold, To preset the height increment threshold, and , .
4. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 1, characterized in that: The sub-pixel edge extraction algorithm performs the following operations: S3.
1. Gaussian smoothing is applied to the sub-pixel edge region to form a smooth image, and the gradient, first derivative and second derivative of each pixel of the smooth image are calculated using the Gaussian derivative method. S3.2 Construct the Hessian matrix of each pixel based on the second derivative of each pixel in the smoothed image; S3.
3. Based on the Hessian matrix of each pixel, use the Steger algorithm to extract sub-pixel edge points to form a sub-pixel edge point set; S3.
4. Obtain the fusion credibility of each sub-pixel edge point in the sub-pixel edge point set using a fusion credibility evaluation model. The fusion credibility evaluation model performs the following operations: S3.4.
1. Calculate the magnitude of the gradient of the corresponding sub-pixel edge point based on the first derivative of each pixel in the smooth image, and then normalize it to obtain the gradient strength confidence of the corresponding sub-pixel edge point. S3.4.2 Calculate the Hessian response confidence level of each sub-pixel edge point; S3.4.3 Calculate the standard deviation of the normal direction angle of all sub-pixel edge points in the preset neighborhood of each sub-pixel edge point, and obtain the direction consistency confidence of the corresponding sub-pixel edge point based on the standard deviation of the normal direction angle. S3.4.
4. The gradient intensity confidence, Hessian response confidence, and orientation consistency confidence of the corresponding sub-pixel edge points are weighted and fused to obtain the fused confidence of the corresponding sub-pixel edge points. S3.
5. Retain sub-pixel edge points with a fusion confidence level greater than the confidence level threshold to form a candidate edge point set.
5. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 1, characterized in that: The set of correction edge points is represented as follows: in, To correct the set of edge points, The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates The first coordinate after coordinate correction mapping Sub-pixel edge points Direction coordinates For the first The reliability of fusion of sub-pixel edge points This is the set of indices for sub-pixel edge points in the candidate edge point set.
6. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 5, characterized in that: The method for constructing an edge point filtering model based on the corrected edge point set to obtain a fitted edge point set is as follows: S5.1 Construct the first edge point set based on the corrected edge point set. : in, For the first set of edge points, the th The edge gradient intensity at the i-th edge point, i.e., the edge gradient intensity at the i-th edge point The magnitude of the gradient at each sub-pixel edge point; S5.2, From the set of first edge points Calculate the parameters of the initial circle by randomly selecting three non-collinear edge points. Based on the parameters of the initial circle Get the first Candidate circle models generated by round iteration : in, The center of the initial circle Direction coordinates The center of the initial circle Direction coordinates The radius of the initial circle, For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The center of the candidate circle model generated by the round iteration Direction coordinates For the first The radius of the candidate circle model generated by the round of iterations. , Let be the number of iterations at which the iteration terminates during the generation of the candidate circle model, and , , ; S5.3 Calculate the first edge point in the first edge point set. The edge point to the first The radial distance of the center of the candidate circle model generated by the round iteration Then the first In the first set of edge points in the round of iteration Distance residual of each edge point ; S5.4, the first edge point set... Normalize the edge gradient intensity of the nth edge point to obtain the nth edge point in the first set of edge points. Gradient weights at each edge point ; S5.5, Obtain the first edge point from the first edge point set. Credibility weight of each edge point ; S5.6 Calculate the first edge point in the first edge point set based on the Gaussian decay model. Distance weight of each edge point ; S5.
7. The gradient weight, confidence weight, and distance weight of the corresponding edge points in the first edge point set are weighted and fused to obtain the comprehensive score of the corresponding edge points. The edge points with a comprehensive score greater than the score threshold are taken as inliers to form an inlier set. S5.8, The sum of the comprehensive scores of all edge points in the interior point set is taken as the first... Model scoring of candidate circle models generated in rounds of iteration; S5.9 Determine if the termination condition of the first iteration is met. If yes, proceed to step S5.10; otherwise, set... Return to step S5.2; S5.
10. Select the set of interior points of the candidate circle model with the highest model score as the set of fitting edge points. , means as follows: in, The set of interior points of the candidate circle model with the highest model score. The model score weights for each edge point , This is the set of indices of all edge points in the set of interior points of the candidate circle model with the highest model score.
7. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 6, characterized in that: The LM circle fitting algorithm performs the following operations: S6.
1. Select the candidate circle model with the highest model score as the fitted circle for the first iteration; S6.2, Execute the following... Round of iteration to obtain the first The fitted circle from each iteration is as follows: S6.2.
1. Construct a loss function based on the Huber kernel and obtain the Huber weights by taking the derivative of the loss function. Then, the first weight in the set of fitted edge points... Huber weights of edge points The formula is as follows: in, Represents the first edge point in the set of fitted edge points. Geometric residuals of each edge point Take the mold. The first experience value; S6.2.2, The confidence weight, model score weight and Huber weight of the corresponding edge points in the fitted edge point set are weighted and fused to obtain the total weight of the corresponding edge points; S6.2.3 Calculate the first edge point based on the total weight of each edge point in the fitted edge point set and the loss function. The optimization objective function for each iteration is given by the following formula: in, For loss function, For the first The objective function of round-by-round iterations is to optimize the function. For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations. To fit the set of edge points, the first... The total weight of each edge point , This represents the number of iterations at the termination point during the process of generating the fitted circle. S6.2.4 Construct the weighted normal optimization equation, as shown in the following formula: in, To fit the diagonal matrix formed by the total weights of all edge points in the edge point set, For Jacobian matrices, For transpose, Let λ be the geometric residual vector, and λ be the damping factor. Let be the identity matrix, Δ be the parameter increment, and , For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The center of the fitted circle between rounds of iteration The increment value of the direction coordinate. For the first Round iteration and the first The incremental value of the radius between the fitted circles in each iteration; S6.2.5, Solve for the Δ that minimizes the objective function using the weighted normal optimization equation, and then combine it with the first... Fitting circle of round iteration , obtained the Fitting circle of round iteration , For the first The center of the fitted circle in the round iteration Direction coordinates For the first The center of the fitted circle in the round iteration Direction coordinates For the first The radius of the fitted circle in the round of iterations; S6.3, Place Return to step S6.2 and continue until the second iteration termination condition is met, then output the final fitted circle. ,in, The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates The radius of the final fitted circle.
8. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 1, characterized in that: The full field-of-view error compensation model performs the following operations: S7.1, Construction of the entire field of view in the visual measurement system Using a grid, sample one image from each grid using a standard glass sphere and measure the corresponding final fitted circle. Calculate the... Measurement error per grid , The radius of a standard glass sphere. For the first The radius of a standard glass sphere measured by a grid. ; S7.2 Calculate the radial distances between the field of view center of the visual measurement system and the center of the standard glass spheres measured by each grid to construct the corresponding physical prior error function. Construct a non-homogeneous linear equation to solve for the coefficients of the physical prior error function, where: The formula for the physical prior error function is as follows: in, express The physical prior error, This represents the radial distance from the center of the field of view of the vision measurement system to the center of the standard glass sphere being measured using the current grid. This represents the zero-bias error term of the vision measurement system; This represents the magnification error term of the vision measurement system; This represents the radial distortion term of the visual measurement system; This represents the higher-order radial error term of the vision measurement system; This represents the residual higher-order error term of the vision measurement system; The formula for the nonhomogeneous linear equation is as follows: in, For all grids The constructed variable matrix has dimensions of ; for The vector formed Let be a vector consisting of the physical prior errors corresponding to all grids, with dimension . , For transpose; S7.3 Build and train the SVR model to obtain the trained SVR model; S7.4 Construct an online drift error model based on exponential moving average to obtain the drift error of the standard glass ball at the corresponding time. S7.5 Calculate the radial distance between the center of the final fitted circle of the optical element under test and the center of the field of view. Forming a six-tuple Inputting the data into the trained SVR model yields the system residuals of the optical element under test. , The center of the final fitted circle Direction coordinates The center of the final fitted circle Direction coordinates This represents the radial distance between the center of the final fitted circle after normalization and the center of the field of view. For edge quality credibility, For model consistency and credibility, To assess the reliability of the fit stability; S7.6 Calculate the physical prior error of the optical element under test based on the solved physical prior error function, and take the sum of the physical prior error of the optical element under test, the system residual and the drift error of the standard glass ball at the current moment as the final prediction error of the optical element under test. Then, compensate the final prediction error of the optical element under test to the radius of the final fitted circle to obtain the final circle measurement result of the optical element under test.
9. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 8, characterized in that: The training process of the SVR model is as follows: S7.3.1 Calculate the edge quality confidence level based on the mean and standard deviation of the fusion confidence levels of the sub-pixel edge points corresponding to all edge points in the fitted edge point set. The formula is as follows: in, This represents the mean of the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. The standard deviation represents the fusion confidence of sub-pixel edge points corresponding to all edge points in the fitted edge point set. Represents an exponential function; S7.3.2 Calculate the mean of the comprehensive scores of all edge points in the fitted edge point set as the model consistency reliability. ; S7.3.3 Calculate the stability reliability of the fit based on the mean square error of all edge points in the fitted edge point set. The formula is as follows: in, This represents the mean square error of the geometric residuals of all edge points in the fitted edge point set. This is the second experience value; S7.3.4 Obtaining the Reconstructed Feature Sample Set , For the first The center of a standard glass sphere measured by a grid. Direction coordinates For the first The center of a standard glass sphere measured by a grid. Direction coordinates From the center of the field of view of the normalized visual measurement system to the first The radial distance between the centers of a standard glass sphere measured by a grid. To determine the confidence level of the normalized edge quality, To determine the consistency reliability of the normalized model, The normalized fit stability reliability; S7.3.
5. Based on the measurement error and physical prior error of each reconstructed feature sample in the reconstructed feature sample set, calculate the corresponding system residual, and use the system residual of each reconstructed feature sample in the reconstructed feature sample set as the output target of the SVR model. Then, the system residual of the first reconstructed feature sample in the reconstructed feature sample set... The system residual of a reconstructed feature sample , For the first The physical prior error of each reconstructed feature sample; S7.3.6 Construct an SVR model and optimize the hyperparameter space of the SVR model within a preset parameter search range using the Bayesian optimization algorithm. Perform parameter optimization until the termination condition of the third iteration is met, thus obtaining the optimal hyperparameter optimization space. ,in, As a penalty factor, For kernel parameters, Insensitive interval The optimal penalty factor is... For optimal kernel parameters, This is the optimal insensitive interval; S7.3.7, Optimization Space Based on Optimal Hyperparameters The SVR model is trained using the reconstructed feature sample set to obtain a trained SVR model.
10. The circle measurement method based on reliability transfer and multi-level error compensation as described in claim 8, characterized in that: The online drift error model, constructed based on exponential moving average, is used to obtain the drift error of the standard glass ball at a given time, as detailed below: S7.4.1 Constructing an online drift error model based on exponential moving average: in, Standard glass beads Online drift error at any moment Standard glass beads Online drift error at any moment Standard glass beads The drift error in time, The weights for the drift error; S7.4.2, Place the standard glass beads Time drift error Substituting into the online drift error model, a standard glass sphere is obtained. Online drift error at time , The radius of a standard glass sphere. for The radius of the standard glass sphere measured at any given time; S7.4.3, Place the standard glass beads Online drift error at time Reassigned to the standard glass ball Time drift error .