A method for calculating parallelism of a detector and a system thereof
By combining prior weights and Huber dynamic weights, the problem of outlier interference in detector parallelism calculation is solved, achieving high-precision plane fitting, which is suitable for precision optical measurement of high-resolution detectors.
Patent Information
- Application Number
- CN202511518881.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing technologies struggle to effectively suppress outlier interference when calculating detector parallelism, resulting in low accuracy of the fitted plane and failing to meet high-precision requirements.
By combining prior weights with Huber dynamic weights, the weights are dynamically adjusted by obtaining the physical reliability of the pixels on the detector surface and the iterative residuals, thereby achieving dual suppression of outliers.
It significantly improves the robustness and accuracy of plane fitting, ensuring high-precision calculation results in the presence of outliers and noise, and meeting the precision optical measurement requirements of high-resolution detectors.
Smart Images

Figure CN120991786B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of optical detection, in particular to a method for calculating parallelism of a detector and a system thereof. BACKGROUND
[0002] The demand for "large field of view, high sensitivity, high resolution" detection is increasingly urgent in the fields of astronomical survey, high-resolution remote sensing, medical imaging, high-energy physics, etc. However, the traditional single-chip detector is difficult to achieve ultra-large array or ultra-high resolution due to limitations of material growth, manufacturing process and physical properties. To break through the limitations, the splicing technology emerges as the times require. The surface flatness of the splicing detector is a key indicator that determines its performance, and directly affects the detection accuracy, imaging quality and system reliability. Calculating the upper and lower surface parallelism is a key link to solve the surface flatness problem of the splicing detector, and its importance lies in multi-dimensional support precision control and performance guarantee. The parallelism calculation provides a quantitative basis for accurate calibration. In the process of splicing and adjusting the optical detector, the support structure can be adjusted or micro-displacement compensation can be used to avoid the loss of control of the flatness caused by hidden parallelism defects. Especially for high-resolution detectors such as 4k x 4k, the parallelism error needs to be controlled within seconds to meet the needs of precision optical measurement. The core of parallelism calculation is to fit the three-dimensional planes of the upper and lower surfaces of the detector to solve the included angle of the normal vectors of the two planes. The current mainstream technology is difficult to balance the anti-interference ability and fitting accuracy due to the characteristics of point cloud data and the defects of fitting algorithm.
[0003] In the prior art, the traditional weighted least squares fitting is used to improve the fitting accuracy of the key area. Fixed weights are preset for points in different positions in the point cloud, and then the plane is solved by minimizing the weighted residual sum of squares. In the prior art, the Huber robust fitting adjusts the weights dynamically by using the Huber segmented loss function for the outliers in the point cloud. When the residual is less than or equal to the threshold, the square loss is used; when the residual is greater than the threshold, the linear loss is used, which can reduce the weight of outliers. The plane parameters are optimized by iterative weighted least squares until convergence.
[0004] However, the weight of the weighted least squares in the prior art is fixed and cannot dynamically respond to outliers. If the pixel becomes an outlier due to sudden noise, the high weight will still cause fitting deviation, which is difficult to meet the high-precision requirement. The Huber fitting only adjusts the weight dynamically by the residual, without combining the prior information of the detector pixels, resulting in insufficient weight differentiation and low accuracy of the fitted plane.
[0005] Therefore, there is an urgent need for a method for calculating the parallelism of a detector and a system thereof to solve the technical problems of outlier interference and low accuracy of the fitted plane in the prior art. SUMMARY
[0006] The application aims to provide a detector parallelism calculation method and system, which can solve at least one of the above technical problems. The specific scheme is as follows:
[0007] A detector parallelism calculation method, comprising the following steps:
[0008] Obtaining at least four positioning point coordinates of the surface below the detector, at least three reference point coordinates of the upper surface, and the coordinates of all pixel point clouds of the upper surface;
[0009] Removing duplicate data and calibrating the coordinates of the reference points of the upper surface and the coordinates of all pixel point clouds of the upper surface;
[0010] Obtaining the plane parameters of the lower surface according to the positioning points;
[0011] Obtaining the parameters of the coarse plane of the upper surface according to the reference points;
[0012] Calculating the distance of each pixel to the coarse plane to obtain the prior weight;
[0013] According to the prior weight and the Huber dynamic weight calculated based on the residual, iteratively fitting the data of the upper surface pixel point cloud after removing duplicate data and calibrating the coordinates to obtain the parameters of the fine plane of the upper surface;
[0014] According to the plane parameters of the lower surface and the parameters of the fine plane of the upper surface, calculating the angle of the upper surface and the lower surface of the detector.
[0015] Further, the removing duplicate data of the reference points of the upper surface and the coordinates of all pixel point clouds of the upper surface comprises: using the x-y coordinate double threshold based neighborhood deduplication method to remove duplicate data.
[0016] Further, the coordinate calibration comprises: taking the positioning points of the lower surface as the global reference, and calibrating the coordinates of the reference points of the upper surface and all pixel point clouds of the upper surface.
[0017] Further, the calculating the distance of each pixel to the coarse plane to obtain the prior weight comprises:
[0018] Calculating the vertical distance of each pixel to the coarse plane;
[0019] According to the inverse relationship of the distance, generating the normalized prior weight.
[0020] Further, the obtaining the parameters of the fine plane of the upper surface comprises:
[0021] Taking the parameters of the coarse plane as the initial value, calculating the residual of each pixel point in the current iteration.
[0022] calculating a Huber dynamic weight according to the residual;
[0023] multiplying the Huber dynamic weight with a prior weight to obtain a fusion weight;
[0024] updating the plane parameters of the upper surface by using a weighted least square method according to the fusion weight until a convergence condition is met to obtain the parameters of the fine plane of the upper surface.
[0025] Further, the convergence condition comprises a core convergence condition and an auxiliary stop condition:
[0026] the core convergence condition is that a variation of a plane normal vector of two adjacent iterations is less than a preset tolerance;
[0027] the auxiliary stop condition is that a preset maximum iteration number is reached.
[0028] Further, the method for obtaining the parameters of the coarse plane of the upper surface and the method for obtaining the plane parameters of the lower surface are that solving by using a least square method.
[0029] The application further provides a calculation system for parallelism of a detector, comprising:
[0030] a data acquisition module, configured to obtain three-dimensional coordinates of at least four positioning points of a lower surface of a detector, three-dimensional coordinates of at least three reference points of an upper surface of the detector, and three-dimensional coordinates of all pixel point clouds of the upper surface of the detector;
[0031] a coarse plane fitting module, configured to obtain parameters of a coarse plane of the upper surface by using a least square method based on the at least three reference points of the upper surface;
[0032] a prior weight generation module, configured to generate a prior weight reflecting physical credibility of a pixel based on a distance of the pixel to the coarse plane;
[0033] a weighted robust fitting module, configured to fuse the prior weight and a Huber dynamic weight calculated based on a residual to perform weighted robust least square iterative fitting on all pixel point clouds of the upper surface to obtain parameters of a fine plane of the upper surface;
[0034] a parallelism calculation module, configured to calculate parallelism of upper and lower surfaces of the detector based on the parameters of the fine plane of the upper surface and the plane parameters of the lower surface.
[0035] Further, the weighted robust fitting module comprises:
[0036] a Huber dynamic weight calculation submodule, configured to dynamically calculate a Huber dynamic weight by using a Huber segmented loss function according to a current iteration residual.
[0037] a weight fusion sub-module, configured to multiply the prior weight and the Huber dynamic weight to obtain a fusion weight;
[0038] an iterative fitting sub-module, configured to update parameters of the fine plane of the upper surface based on the fusion weight by using a weighted least squares method iteratively until a convergence condition is met.
[0039] Further, the data acquisition module comprises:
[0040] a de-duplication sub-module, configured to perform de-duplication processing on the upper surface of the entire pixel point cloud based on an x-y coordinate double-threshold neighborhood de-duplication method;
[0041] a coordinate calibration sub-module, configured to perform coordinate calibration on the reference point of the upper surface and data of the entire pixel point cloud of the upper surface based on the positioning point of the lower surface.
[0042] Compared with the prior art, the above scheme of the embodiments of the present application has at least the following beneficial effects:
[0043] 1. The method and system for calculating the parallelism of a detector according to the present application, by fusing the prior weight reflecting the physical reliability of pixels with the Huber dynamic weight based on the adaptive adjustment of the iterative residual, the final fusion weight is constructed, and the double suppression of outliers is realized. The influence of outliers is greatly weakened due to the low prior weight caused by the far distance from the coarse plane and the low Huber dynamic weight caused by the large residual, which effectively avoids the deviation caused by the fixed weight of the traditional weighted least squares and the problem of insufficient weight differentiation due to the lack of prior information in single Huber fitting, thereby significantly improving the robustness and precision of plane fitting.
[0044] 2. The method and system for calculating the parallelism of a detector according to the present application, the prior weight provides an objective physical basis for weight allocation and anchors the overall shape trend of the detector; the Huber dynamic weight calibrates the local detail deviation in the iterative process. The fusion of the two makes the weight of the pixels in the flat area and with small residual high, which dominates the fitting; the weight of the edge or slightly deviated pixels is moderate, which retains the contribution. This synergistic mechanism ensures that the fitted plane can reflect the global trend and accurately capture the local flat characteristics, achieving the optimal balance between global and local.
[0045] 3. The method and system for calculating the parallelism of a detector according to the present application, the judgment threshold in the Huber dynamic weight is not a fixed value, but is dynamically calculated based on the absolute median deviation (MAD) of each iteration residual, which makes the threshold adaptive to the error distribution fluctuation of the detector pixel point cloud at different fitting stages, ensuring the scientificity and real-time of the outlier judgment standard, and further enhancing the adaptability of the algorithm and the reliability of the final result. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0047] Figure 1 This is a flowchart illustrating a method for calculating detector parallelism provided in an embodiment of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail 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 in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or device. Without further limitation, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the product or device that includes that element.
[0050] The embodiments of this application are described in detail below with reference to the accompanying drawings.
[0051] Example 1:
[0052] like Figure 1 As shown in the figure, this application provides a method for calculating detector parallelism, including the following steps:
[0053] S1. Obtain the coordinates of at least four positioning points on the lower surface of the detector, the coordinates of at least three reference points on the upper surface, and the coordinate data of all pixel point clouds on the upper surface.
[0054] In this embodiment, the coordinates of four positioning points on the lower surface of the detector, the coordinates of three reference points on the upper surface, and the coordinate data of all 9564 pixel point clouds on the upper surface are collected using a two-dimensional planar scanner, a comparator stand, and three measuring probes in the prior art.
[0055] In the technical solution of this application embodiment, the three reference points on the upper surface are the minimum and sufficient condition for defining the coarse plane of the upper surface. The fourth point among the four positioning points on the lower surface is used to verify whether the assumption of the plane of the lower surface is valid; if the four points are perfectly coplanar, then the plane fitted by the three points will naturally pass precisely through the fourth point. If the fourth point deviates significantly from the plane determined by the first three points, it indicates that there is a non-negligible deformation on the lower surface, or that there is a significant error at a certain measurement point. The number of positioning points and reference points can be increased according to the actual situation. Increasing the number of positioning points and reference points will lead to increased measurement time cost, increased measurement complexity, or the introduction of new errors; however, increasing the number of positioning points and reference points can make the acquired data smoother and improve resolution. Therefore, this application does not limit this, and the number of positioning points and reference points can be set according to specific circumstances.
[0056] Coordinates of the four positioning points on the lower surface: , .in, Indicates the lower surface of the detector The three-dimensional coordinates of each positioning point, i.e., the three-dimensional coordinates of the vertex; Indicates the lower surface number Each positioning point Axis coordinates; Indicates the lower surface number Each positioning point Axis coordinates; Indicates the lower surface number Each positioning point Axis coordinates. Coordinates of the three reference points on the upper surface: , ( ).in, Indicates the first layer on the upper surface of the detector The three-dimensional coordinates of each reference point; Indicates the first of the upper surface benchmarks Axis coordinates; Indicates the first of the upper surface benchmarks Axis coordinates; Indicates the first of the upper surface benchmarks Axis coordinates. Data for all pixel point clouds on the upper surface: ). Indicates the first layer on the upper surface of the detector The three-dimensional coordinates of a pixel point cloud; Indicates the upper surface of the detector A pixel point cloud Axis coordinates; Indicates the upper surface of the detector A pixel point cloud Axis coordinates; Indicates the upper surface of the detector A pixel point cloud Axis coordinates.
[0057] S2. For the coordinates of all pixel point clouds on the upper surface, perform duplicate data removal and coordinate calibration sequentially. This application provides a preferred technical solution, employing a neighborhood deduplication method based on dual thresholds for x and y coordinates to remove duplicate data. The collected 9564 pixel point clouds on the upper surface are sorted in ascending order of x-axis and y-axis coordinates, ensuring that adjacent pixel points are continuously distributed on the x-y plane. Both x and y coordinate thresholds are set to 5 μm. Using the first point as a reference, the subsequent sorted pixel points are traversed, and the x-axis and y-axis coordinate differences between each subsequent point and the reference point are calculated sequentially. If both differences are less than the corresponding thresholds, the pixel is determined to be a duplicate and discarded. For example, if a point's Δx = 3 μm and Δy = 4 μm are both less than 5 μm, it is determined to be a duplicate and discarded. Here, Δx and Δy represent the x-axis and y-axis coordinate differences, respectively.
[0058] Using the coordinate system established by the four positioning points on the lower surface as the global reference, the rigid transformation matrix between the three reference point cloud data points on the upper surface and the coordinate system of the lower surface is calculated. The rigid transformation matrix is then applied to unify the coordinate systems of the reference points on the upper surface and the pixel point cloud through rigid transformation, thereby eliminating the systematic errors of translation and rotation caused by the installation and adjustment of the measurement and acquisition equipment, and completing the coordinate calibration.
[0059] S3. Obtain the planar parameters of the lower surface based on the positioning points. Construct equations based on the four positioning points of the lower surface, and transform the equations into matrix form. Solve for the matrix of the lower surface plane using the ordinary least squares method in existing technology to obtain the planar parameters of the lower surface.
[0060] The expression for the normal vector obtained by fitting the four positioning points on the lower surface is:
[0061]
[0062] in, This represents the normal vector of the lower surface; Represents the normal vector of the lower surface. Axial direction component; Represents the normal vector of the lower surface. Axial direction component; Represents the normal vector of the lower surface. Axial direction components, in the embodiments of this application The value of is -1, that is, when the plane parametric expression is written in standard form, The axial component is -1.
[0063] The expression of the plane parameters of the lower surface is:
[0064]
[0065] wherein, represents the plane equation of the plane parameters of the lower surface; represents the constant term of the lower surface plane equation.
[0066] S4, according to the reference points, the parameters of the rough plane of the upper surface are obtained. According to three upper surface reference points , ) constructs the upper surface rough plane equation, and converts the upper surface rough plane equation into a matrix form, uses the ordinary least square method to solve the matrix of the upper surface rough plane, and obtains the parameters of the rough plane of the upper surface. In the embodiment of the application, the rough plane is the upper surface fitted, and at this time, it is the first fitting and thus the rough plane.
[0067] The matrix of the parameters of the rough plane of the upper surface is:
[0068]
[0069] wherein, represents the coefficient matrix of the upper surface rough plane fitting, represents the dependent variable vector of the upper surface rough plane fitting.
[0070] The expression of the parameters of the rough plane of the upper surface is:
[0071]
[0072] wherein, represents the parameter vector of the upper surface rough plane; represents the coefficient of the term in the upper surface rough plane equation; represents the coefficient of the term in the upper surface rough plane equation; represents the constant term of the upper surface rough plane equation.
[0073] The upper surface rough plane equation is:
[0074]
[0075] wherein, represents the upper surface rough plane equation.
[0076] S5, the distance of each pixel to the rough plane is calculated, and the prior weight is obtained.
[0077] The embodiment of the application provides a preferred technical scheme, calculates the vertical distance of each pixel to the rough plane; generates normalized prior weights according to the inverse relationship of the distance.
[0078] The vertical distance of each pixel to the rough plane is calculated, and the expression of the vertical distance is:
[0079]
[0080] Wherein, represents the vertical distance of the mth pixel point on the upper surface to the rough plane. represents the coefficient of the term in the equation of the rough plane of the upper surface.
[0081] The embodiment of the application provides a preferred technical scheme, the distance of the vertical distance is corrected, and a small value is added; wherein, represents the small value, and zero division is avoided. The corrected vertical distance is obtained, and the expression is:
[0082]
[0083] Wherein, represents the corrected vertical distance of the mth pixel point to the rough plane.
[0084] The weight distribution is generated according to the inverse of the corrected vertical distance, and the prior weight is normalized, and the expression is:
[0085]
[0086] Wherein, represents the prior weight of the mth pixel point on the upper surface; m represents the traversal index variable of the pixel point cloud on the upper surface; and N represents the total number of the effective pixel point cloud on the upper surface after being removed and calibrated. represents the corrected vertical distance of the mth pixel point to the rough plane.
[0087] The dynamic weight in the prior art can suppress outliers based on iterative residuals, but does not consider the physical credibility difference of pixels on the detector surface. The technical scheme provided by the embodiment of the application converts the physical credibility of the detector pixels into quantifiable fixed weights by using the prior weight scheme, provides objective physical basis for weight distribution, and makes up for the defects of single dynamic weight lacking prior information.
[0088] S6. Based on the prior weights and Huber dynamic weights calculated from the residuals, iteratively fit the data of the upper surface pixel point cloud after removing duplicate data and calibrating the coordinates to obtain the parameters and normal vector of the fine plane of the upper surface.
[0089] Using the parameters of the coarse plane as initial values, calculate the residuals for each pixel in the current iteration. Initialization: Using the surface roughness parameters as initial values, the residuals are calculated iteratively. In the first... In this iteration, the expression for the residual of a pixel is:
[0090]
[0091] Where t represents the iteration number index; This represents the residual of the k-th pixel on the upper surface during the t-th iteration; In the plane equation at the t-th iteration The coefficient of the term; In the plane equation at the t-th iteration The coefficient of the term; Let represent the constant term in the plane equation at the t-th iteration.
[0092] According to residuals Calculate Huber's dynamic weights. The expression for Huber's dynamic weights is:
[0093]
[0094] in, This represents the Huber dynamic weight of the k-th pixel on the upper surface in the t-th iteration. This represents the threshold for Huber's dynamic weights.
[0095] The technical solutions of the embodiments of this application, The value is determined based on the real-time error distribution characteristics of the pixel point cloud on the upper surface of the detector. An iterative adaptive statistical calculation method is adopted to ensure that the threshold is highly compatible with the residual law of the current fitting stage. It is dynamically updated during the iterative process, and is carried out in the t-th iteration of the fine fitting of the upper surface.
[0096] First, based on the current planar parameters, calculate the residuals for all upper surface pixels. Then, perform statistical processing on the residuals, taking the absolute values of each residual, sorting them, and extracting the median (| The median absolute median deviation (MAD) of the residuals is calculated based on this median. The calculation of MAD requires the introduction of a normality correction factor of 1.4826, i.e., MAD = 1.4826 × median (| The role of the normal distribution correction coefficient is to make MAD equivalent to the standard deviation σ under the normal distribution, and to ensure that the statistical scale conforms to the error law of precision measurement. Finally, MAD is multiplied by the Huber function standard coefficient 1.345 to obtain the Huber threshold value of the tth iteration , that is =1.345×MAD, the selection basis of the coefficient 1.345 is that under the normal distribution error scenario, the coefficient can make the threshold cover about 95% of the normal residuals, and only the outliers beyond the range start the linear loss weight adjustment, realizing the dual goals of retaining high precision characteristics of normal points and suppressing interference of abnormal points. After each iteration, the above process needs to be re-executed to generate the threshold corresponding to the new iteration. The determination method of the Huber dynamic weight adapts to the error fluctuation of the detector pixel point cloud in different fitting stages, ensuring that the Huber dynamic weight always has reliable abnormal value judgment basis, and finally supporting the anti-interference and fitting accuracy of the weighted robust least squares algorithm.
[0097] According to the multiplication of the prior weight and the Huber dynamic weight, the fusion weight is obtained. The expression of the fusion weight is:
[0098]
[0099] Among them, represents the final fusion weight of the kth pixel point of the upper surface in the tth iteration.
[0100] According to the fusion weight, the plane parameters of the upper surface are iteratively updated by using the weighted least squares method until the convergence condition is met, and the parameters and normal vector of the precise plane of the upper surface are obtained.
[0101] The fusion weight is normalized to ensure that the sum of the fusion weights is 1. The weighted least squares equation set is constructed, and the iterative update is solved until the convergence condition is met, and the parameters of the precise plane of the upper surface are obtained.
[0102] The expression of the weighted least squares equation set is:
[0103]
[0104] The expression of the parameter vector of the precise plane of the upper surface is:
[0105]
[0106] Among them, represents the plane parameter vector of the upper surface in the t+1th iteration; represents the coefficient of the term in the plane equation in the t+1th iteration; denotes the coefficient of the constant term in the plane equation at the t+1th iteration. denotes the coefficient of the constant term in the plane equation at the t+1th iteration. denotes the coefficient of the constant term in the plane equation at the t+1th iteration.
[0107] denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface =
[0108] denotes the parameter of the fine plane of the upper surface denotes the parameter of the fine plane of the upper surface
[0109] denotes the parameter of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface denotes the normal vector of the fine plane of the upper surface
[0110] The convergence condition of the data of the upper surface pixel point cloud in the technical scheme of the embodiment of the present application is divided into two types, i.e., a core convergence condition and an auxiliary stop condition.
[0111] The core convergence condition is that the variation of the plane normal vector of the adjacent two iterations is less than a preset tolerance, i.e., the length variation of the normal vector of the t+1th iteration is calculated with the normal vector of the tth iteration, if the variation satisfies the condition of being less than the preset tolerance, the preset tolerance is in the embodiment of the present application, it is determined that the iteration converges, the parameter updating is stopped, and the parameter of the fine plane of the upper surface is output. When the variation of the plane normal vector is small enough, it indicates that the fitted plane is close to the real physical form of the upper surface of the detector, and the improvement of the plane precision by continuing the iteration is negligible, which meets the requirement of the fitting stability of the precise optical measurement.
[0112] The auxiliary stop condition is that the preset maximum iteration number is reached, in order to avoid the iteration from falling into an infinite loop, the maximum iteration number of 30 times is preset as the auxiliary stop condition in the weighted robust fitting process. If the iteration number t reaches the maximum iteration number, the core convergence condition that the variation of the normal vector is less than the tolerance is still not met, the iteration is forced to stop to ensure the calculation efficiency. According to the actual situation, other numerical maximum iteration numbers can also be preset, which is not limited in the present application.
[0113] S7, according to the normal vector of the lower surface, the normal vector of the fine plane, the angle of the upper surface and the lower surface of the detector is calculated. The expression of the angle of the upper surface and the lower surface of the detector is:
[0114]
[0115] wherein, represents the angle of the angle between the upper surface and the lower surface of the detector; represents the radian form of the angle θ between the normal vectors of the upper surface and the lower surface.
[0116] The expression for unit conversion to angular seconds is:
[0117]
[0118]
[0119] wherein, represents the degree form of the angle θ between the normal vectors of the upper surface and the lower surface; represents the angular second form of the angle θ between the normal vectors of the upper surface and the lower surface.
[0120] The technical scheme of the embodiments of the present application obtains the coordinate data of the four positioning points of the lower surface, the three reference points of the upper surface and the entire pixel point cloud of the upper surface, and completes the de-duplication and coordinate calibration. The ordinary least squares fitting is used for the four positioning points of the lower surface plane fitting to obtain the lower surface plane parameters and the normal vector. The ordinary least squares fitting is used for the three reference points to obtain the coarse plane parameters, the vertical distance of each pixel to the coarse plane is calculated, and the prior weight is generated and normalized based on the distance inverse. The upper surface fine fitting is an iterative process. Firstly, the parameters and the number of iterations are initialized, the current residual is calculated , the Huber dynamic weight is calculated again, and the final weight is obtained by fusion. The weighted least squares equation set is solved, and the parameters are updated continuously. After each iteration, convergence judgment is performed. If the condition is met, the fine plane parameters and the normal vector are output, otherwise iteration is performed. Finally, the parallelism is calculated and the result is output.
[0121] The technical scheme of the embodiment of the application adopts prior weights and Huber dynamic weights and performs multiplication fusion. The prior weights are generated based on the distance of the pixels to the coarse plane to reflect the physical credibility of the pixels. The physical credibility of the pixels cannot be distinguished by the traditional method, which leads to the interference of outliers with the fitting accuracy. The Huber dynamic weights are used to dynamically adjust the weights according to the iteration residual error to suppress the influence of abnormal points. The Huber fitting only depends on the residual error and lacks the prior judgment of the physical position of the pixels, which is prone to misjudgment. The double-weight fusion of the prior weights and the Huber weights is performed to realize the double suppression of outliers and solve the technical problem that the single-weight method cannot simultaneously process static abnormalities and dynamic noise.
[0122] Embodiment 2
[0123] The embodiment of the application also provides a calculation system for the parallelism of a detector, which comprises a data acquisition module, a coarse plane fitting module, a prior weight generation module, a weighted robust fitting module and a parallelism calculation module. The data acquisition module is used to acquire the three-dimensional coordinates of at least four positioning points on the lower surface of the detector, the three-dimensional coordinates of at least three reference points on the upper surface and the three-dimensional coordinates of all pixel point clouds on the upper surface. The coarse plane fitting module is used to fit the coarse plane parameters of the upper surface by using the least square method based on the at least three reference points on the upper surface. The prior weight generation module is used to generate the prior weights reflecting the physical credibility of the pixels based on the distance of the pixels to the coarse plane. The weighted robust fitting module is used to fuse the prior weights and the Huber dynamic weights calculated based on the residual error, and perform weighted robust least square iteration fitting on all pixel point clouds on the upper surface to obtain the fine plane parameters of the upper surface. The parallelism calculation module is used to calculate the parallelism of the upper and lower surfaces of the detector based on the fine plane parameters of the upper surface and the plane parameters of the lower surface.
[0124] The weighted robust fitting module comprises a Huber dynamic weight calculation submodule, a weight fusion submodule and an iteration fitting submodule. The Huber dynamic weight calculation submodule is used to dynamically calculate the Huber dynamic weights by using the Huber segmented loss function according to the current iteration residual error. The weight fusion submodule is used to multiply the prior weights and the Huber dynamic weights to obtain the final fusion weights. The iteration fitting submodule is used to iteratively update the fine plane parameters of the upper surface based on the final fusion weights by using the weighted least square method until the convergence condition is met.
[0125] The data acquisition module comprises a de-duplication submodule and a coordinate calibration submodule. The de-duplication submodule is used to perform de-duplication processing on all pixel point clouds on the upper surface based on the x-y coordinate double-threshold neighborhood de-duplication method. The coordinate calibration submodule is used to perform coordinate calibration on the reference points and all pixel point clouds on the upper surface based on the positioning points on the lower surface.
[0126] The embodiment of the application verifies the effectiveness of the technical solution of the application through comparative experiments, and specific data are shown in Table 1.
[0127] Table 1 Comparison of experimental results
[0128]
[0129]
[0130] Through 12 sets of comparative experiments, the performances of three methods, namely, the weighted least square method, the Huber method and the method of the application, are compared under different outlier proportions of 0%, 6%, 12%, 18% and different noise intensities of 0.06 μm, 0.12 μm and 0.24 μm, and the core evaluation indexes are the average parallelism error and the average RMSE.
[0131] In the absence of outliers, the basic fitting accuracy of the method of the application is equivalent to that of the prior art method, and no additional deviation is introduced due to the complexity of the algorithm. In the presence of outliers, compared with the weighted least square method: in all scenes containing outliers, the parallelism error of the method of the application is significantly lower. For example, under the condition of 12% outliers and 0.24 μm noise, the error of the weighted least square method is 0.282 arcseconds, while the error of the method of the application is only 0.127 arcseconds, and the accuracy is improved by more than 50%. Compared with the fitting of the Huber method, the Huber method is very sensitive to outliers, and its parallelism error increases sharply with the increase of the proportion of outliers, generally between 0.5-0.7 arcseconds; and under the same conditions, the error of the method of the application is always stable at a very low level of 0.13-0.15 arcseconds, and the stability is far superior to that of the Huber method. The method of the application can still calculate an extremely accurate plane normal vector and parallelism even in the case of serious pollution of data by outliers, resulting in high RMSE. This proves that the method of the application: even if it cannot completely repair the coordinates of each outlier, it can still minimize the influence of the outlier on the plane parameters through the weight mechanism. The method of the application is a high-precision plane fitting and parallelism calculation method especially suitable for real complex measurement environment, which greatly improves the calculation accuracy and reliability in data containing outliers without sacrificing the accuracy of pure data.
[0132] Finally, it should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system or device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0133] The above examples are only used to illustrate the technical solutions of the present application, but not to limit the same; although the present application has been described in detail with reference to the foregoing examples, it should be understood by those of ordinary skill in the art that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of calculating the parallelism of a probe, characterized by, The method comprises the following steps: obtaining the coordinates of at least four positioning points under the surface of the detector, the coordinates of at least three reference points on the upper surface, and the coordinates of all pixel point clouds on the upper surface; performing duplicate data removal and coordinate calibration on the reference points on the upper surface and the coordinates of all pixel point clouds on the upper surface; obtaining the plane parameters of the lower surface according to the positioning points; obtaining the parameters of the coarse plane of the upper surface according to the reference points; calculating the distance of each pixel to the coarse plane to obtain prior weights; performing iterative fitting on the data of the upper surface pixel point cloud after duplicate data removal and coordinate calibration according to the prior weights and Huber dynamic weights calculated based on residuals to obtain the parameters of the fine plane of the upper surface; calculating the angle of the upper surface and the lower surface of the detector according to the plane parameters of the lower surface and the parameters of the fine plane of the upper surface.
2. The computational method of claim 1, wherein, The duplicate data removal on the reference points on the upper surface and the coordinates of all pixel point clouds on the upper surface comprises: performing duplicate data removal processing by using a neighborhood de-duplication method based on x-y coordinate double thresholds.
3. The computational method of claim 2, wherein, The coordinate calibration comprises: taking the positioning points of the lower surface as a global reference to perform coordinate calibration on the reference points on the upper surface and the data of all pixel point clouds on the upper surface.
4. The computational method of claim 1, wherein, The calculation of the distance of each pixel to the coarse plane to obtain prior weights comprises: calculating the vertical distance of each pixel to the coarse plane; generating normalized prior weights according to the inverse relationship of the distance.
5. The computational method of claim 4, wherein, The obtaining of the parameters of the fine plane of the upper surface comprises: calculating the residuals of each pixel point in the current iteration with the parameters of the coarse plane as the initial value; calculating Huber dynamic weights according to the residuals; multiplying the prior weights and the Huber dynamic weights to obtain fusion weights; iteratively updating the plane parameters of the upper surface by using a weighted least squares method according to the fusion weights until a convergence condition is met to obtain the parameters of the fine plane of the upper surface.
6. The computational method of claim 5, wherein, The convergence condition comprises: a core convergence condition and an auxiliary stop condition: the core convergence condition is that the change of the plane normal vector of adjacent two iterations is less than a preset tolerance; the auxiliary stop condition is that a preset maximum iteration number is reached.
7. The computational method of claim 1, wherein, The method of obtaining the parameters of the coarse plane of the upper surface and the method of obtaining the plane parameters of the lower surface are solved by using a least squares algorithm.
8. A computing system for implementing the calculation of the parallelism of a probe according to any one of claims 1-7, characterized in that, The method comprises: a data acquisition module configured to obtain the three-dimensional coordinates of at least four positioning points on the lower surface of the detector, the three-dimensional coordinates of at least three reference points on the upper surface, and the three-dimensional coordinates of all pixel point clouds on the upper surface; a coarse plane fitting module configured to fit the parameters of the coarse plane of the upper surface based on the at least three reference points on the upper surface by using a least squares method; a prior weight generation module configured to generate prior weights reflecting the physical credibility of pixels based on the distance of the pixels to the coarse plane; a weighted robust fitting module configured to fuse the prior weights and Huber dynamic weights calculated based on residuals to perform weighted robust least squares iterative fitting on all pixel point clouds on the upper surface to obtain the parameters of the fine plane of the upper surface. The parallelism calculation module is configured to calculate parallelism of the upper surface and the lower surface of the detector based on the parameters of the fine plane of the upper surface and the plane parameters of the lower surface.
9. The computing system of claim 8, wherein, The weighted robust fitting module comprises: A Huber dynamic weight calculation submodule is configured to dynamically calculate a Huber dynamic weight based on a Huber segmented loss function and a current iteration residual; A weight fusion submodule is configured to multiply the prior weight and the Huber dynamic weight to obtain a fusion weight; An iteration fitting submodule is configured to iteratively update the parameters of the fine plane of the upper surface based on the fusion weight and a weighted least square method until a convergence condition is met.
10. The computing system of claim 8, wherein, The data acquisition module comprises: A de-duplication submodule is configured to perform de-duplication processing on all pixel point clouds of the upper surface based on an x-y coordinate double-threshold neighborhood de-duplication method; A coordinate calibration submodule is configured to perform coordinate calibration on reference points of the upper surface and data of all pixel point clouds of the upper surface based on positioning points of the lower surface.
Citation Information
Patent Citations
Point cloud splicing method and system based on three-dimensional sensor and storage medium
CN116310250A
High-precision plane fitting method for multi-noise point cloud
CN119991943A