Calculation method and system for parallelism of detector biplane joint optimization
By employing a dual-plane joint optimization method for the detector, combining prior weights and Huber dynamic weights, the parameters of the upper and lower surface planes are simultaneously optimized. This solves the problem of amplified parallelism calculation errors in existing technologies, achieving higher accuracy and more stable parallelism calculations.
Patent Information
- Application Number
- CN202511509949.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-22
AI Technical Summary
In existing technologies, the planar fitting technology of splicing detectors is difficult to simultaneously take into account the anti-interference ability and fitting accuracy of the algorithm. Moreover, as the splicing scale increases, the number of positioning points and reference points multiplies, leading to nonlinear amplification of parallelism error. Existing methods cannot effectively suppress the influence of outliers.
A dual-plane joint optimization method for the detector is adopted. By constructing a prior weight based on the initial average trend surface of the two surfaces and combining iterative residual Huber dynamic weights, the objective function of dual-plane joint optimization is solved iteratively. The parameters of the upper and lower surface planes are obtained simultaneously, thereby reducing the influence of outliers.
This method achieves higher precision plane fitting results, reduces the overall error in parallelism calculation, improves the adaptability and reliability of the method under different measurement environments and detector models, and ensures the accuracy and stability of parallelism calculation.
Smart Images

Figure CN120997277A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical detection technology, and more specifically, to a method and system for calculating the parallelism of a detector with dual-plane joint optimization. Background Technology
[0002] With the increasing demand for large field-of-view, high-sensitivity, and high-resolution detection, single-chip detectors, limited by material growth, manufacturing processes, and physical properties, struggle to achieve ultra-large arrays or ultra-high resolution. To overcome these limitations, stitching technology has emerged. The surface flatness of the stitched detector is a core performance indicator, directly impacting detection accuracy, imaging quality, and system reliability. The core of parallelism calculation lies in fitting the three-dimensional planes of the detector's upper and lower surfaces and solving for the angle between the normal vectors of the two planes. Currently, existing plane fitting techniques mainly face interference from point cloud data noise and outliers, making it difficult to simultaneously ensure both the algorithm's anti-interference capability and fitting accuracy.
[0003] Among related technologies, the main technical solutions include traditional weighted least squares fitting and robust fitting methods. Traditional weighted least squares fitting solves the plane by pre-setting fixed weights for different points in the point cloud and minimizing the sum of squared weighted residuals. However, its fixed weights cannot dynamically handle outliers caused by sudden noise during measurement. If such outliers are given high weights, it will lead to significant deviations in the fitted plane. Huber robust fitting uses a piecewise loss function to dynamically adjust the weights. When the residual is greater than a set threshold, the weight of that point is reduced, thereby suppressing the influence of outliers. However, this method only relies on the posterior information of the iterative residuals and fails to incorporate the prior knowledge of the physical location of the detector pixels, resulting in insufficient weight discrimination and lower-than-expected fitting accuracy in complex noise scenarios. Furthermore, in existing technical solutions, the increased stitching scale leads to a doubling of the number of positioning points and reference points. Step-by-step fitting causes the cross-surface error propagation chain to lengthen, ultimately resulting in a nonlinear amplification of the parallelism error. Large-area arrays introduce global stress warping, and the upper and lower surfaces no longer satisfy the assumption that the morphology of a single surface can represent the whole, causing the single-surface outlier suppression strategy to fail.
[0004] Therefore, a method and system for calculating the parallelism of a detector with joint optimization of two planes are proposed to solve one of the aforementioned technical problems. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for calculating the parallelism of a detector with joint optimization of two planes, which can solve at least one of the technical problems mentioned above. The specific solution is as follows: According to a specific embodiment of this application, a method for calculating the parallelism of a detector with dual-plane joint optimization includes the following steps: Acquire 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 coordinates of the point cloud of all pixels on the upper surface; The coordinates of the reference points on the upper surface and the coordinates of all the pixel point clouds on the upper surface are subjected to duplicate data removal and coordinate calibration. Based on the positioning point on the lower surface and the reference point on the upper surface, the initial plane parameters of the lower surface and the initial plane parameters of the upper surface are calculated respectively, and the initial average trend surface of the two surfaces is constructed. Prior weights are obtained based on the distance from each pixel on the upper surface to the initial average trend surface of the two surfaces; Using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, and utilizing the prior weights, the objective function for dual-plane collaborative optimization is solved iteratively, while simultaneously obtaining the plane parameters of the lower surface and the upper surface. The angle between the upper and lower surfaces of the detector is obtained based on the lower surface plane parameters and the upper surface plane parameters.
[0006] Further, the step of using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as initial values for iteration, and utilizing the prior weights to iteratively solve the dual-plane collaborative optimization objective function, and to solve for the lower surface plane parameters and the upper surface plane parameters, includes: Using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, calculate the residuals of all data points in the current iteration; The Huber dynamic weights are calculated based on the absolute median difference of the upper surface pixel residuals and the Huber threshold. The prior weights are fused with the Huber dynamic weights to obtain the pixel dynamic fusion weights; Based on the pixel dynamic fusion weights, the preset data type weights, and the residuals of all data points, the dual-plane collaborative optimization objective function is obtained. The objective function of the dual-plane collaborative optimization is solved iteratively, and the parameters of the lower and upper surface planes are updated based on the solution results.
[0007] Further, updating the lower surface plane parameters and upper surface plane parameters based on the solution results includes: Obtain the updated lower surface normal vector, upper surface normal vector, and the change in normal vector from the previous iteration; When the change in the lower surface normal vector and the change in the upper surface normal vector are both less than the preset tolerance, the iteration is determined to be converged, and the current lower surface plane parameters and upper surface plane parameters are output.
[0008] Furthermore, the objective function of the dual-plane collaborative optimization is to minimize the weighted sum of squared residuals of the lower surface positioning points, the upper surface reference points, and the upper surface pixel point cloud.
[0009] Further, fusing the prior weights with the Huber dynamic weights to obtain pixel dynamic fusion weights includes: The prior weight of each pixel is multiplied with the corresponding Huber dynamic weight to obtain the initial fusion weight; The initial fusion weights are normalized to obtain the pixel dynamic fusion weights used in this iteration.
[0010] Further, the step of calculating the Huber dynamic weight based on the residuals of the upper surface pixels and the Huber threshold includes: The Huber threshold is adaptively calculated based on the statistical distribution of the residuals of all upper surface pixels in the current iteration. Based on the Huber threshold and the residual size of each pixel, the corresponding Huber dynamic weight is calculated using a piecewise function method.
[0011] Furthermore, the dual-plane collaborative optimization objective function includes: The weighting coefficients for the data types assigned to the lower surface positioning points, upper surface reference points, and upper surface pixel point clouds are different; among them, the weighting coefficient of the lower surface positioning points is the largest, followed by the weighting coefficient of the upper surface pixel point clouds, and the weighting coefficient of the upper surface reference points is the smallest.
[0012] Furthermore, the process of removing duplicate data and calibrating the coordinates of the reference points on the upper surface and the coordinates of all pixel point clouds on the upper surface includes: A neighborhood deduplication method based on dual thresholds of x and y coordinates is used to remove duplicate data. Using the positioning point on the lower surface as a global reference, coordinate calibration is performed on the reference point on the upper surface and the data of all pixel point clouds on the upper surface.
[0013] Furthermore, the construction of the initial average trend surface of the two surfaces includes: The arithmetic mean of the corresponding coefficients of the initial plane parameters of the lower surface and the initial plane parameters of the upper surface is taken to obtain the plane equation coefficients of the initial average trend surface of the two surfaces.
[0014] According to a specific embodiment of this application, this application also provides a system for calculating the parallelism of a detector with joint optimization of two planes, comprising: 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 preprocessing module is used to remove duplicate data and calibrate the coordinates of 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 trend surface construction module is used to calculate the initial plane parameters of the lower surface and the initial plane parameters of the upper surface based on the positioning point of the lower surface and the reference point of the upper surface, respectively, and construct the initial average trend surface of the two surfaces. The prior weight generation module is used to obtain prior weights reflecting the physical credibility of pixels based on the distance of each pixel on the upper surface to the initial average trend surface of the two surfaces. The collaborative fitting module is used to iteratively solve the dual-plane collaborative optimization objective function using the initial plane parameters of the lower and upper surfaces as the initial values of the iteration, and to solve for the plane parameters of the lower and upper surfaces using the prior weights. The parallelism calculation module is used to calculate the parallelism between the upper and lower surfaces of the detector based on the lower surface plane parameters and the upper surface plane parameters.
[0015] Compared with the prior art, the above-described solutions of this application have at least the following beneficial effects: 1. This application provides a method and system for calculating the parallelism of a detector's dual-plane joint optimization. The technical solution of this application constructs prior weights based on the initial average trend surface of the dual surfaces and fuses them with Huber dynamic weights based on iterative residuals. Through a dual suppression mechanism combining static physical reliability and dynamic fitting deviation evaluation, the influence of outliers can be identified and weakened more accurately and comprehensively. This overcomes the shortcomings of fixed weights in traditional weighted least squares fitting and the lack of prior information in single Huber fitting, thereby obtaining higher-precision plane fitting results.
[0016] 2. This application provides a method and system for calculating the parallelism of a detector based on joint optimization of two planes. The technical solution of this application differs from the method of step-by-step independent fitting of the upper and lower surfaces. It employs a unified objective function for joint optimization of the two planes, simultaneously solving for the optimal plane parameters of the upper and lower surfaces during a single iteration. This collaborative method eliminates the risk of the lower surface fitting error being transmitted to the upper surface through coordinate calibration during step-by-step fitting, ensuring the inherent mathematical correlation between the parameters of the two surfaces and reducing the overall calculation error of parallelism at the model level.
[0017] 3. This application provides a method and system for calculating the parallelism of detector dual-plane joint optimization. The threshold of the Huber dynamic weight in the technical solution of this application is not a fixed value, but is adaptively calculated based on the statistical distribution of the residual in each iteration. It can adapt to the error fluctuation of the detector pixel point cloud at different fitting stages, ensure the scientificity and real-time nature of the outlier judgment standard, and further improve the adaptability and reliability of the method under different measurement environments and detector models. Attached Figure Description
[0018] 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: Figure 1 This is a flowchart illustrating a method for calculating the parallelism of a detector with dual-plane joint optimization, as shown in an embodiment of this application. Detailed Implementation
[0019] 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.
[0020] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.
[0021] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0022] It should be understood that although the terms first, second, third, etc., may be used in the embodiments of this application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, first may also be referred to as second without departing from the scope of the embodiments of this application, and similarly, second may also be referred to as first.
[0023] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article 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 an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.
[0024] The optional embodiments of this application are described in detail below with reference to the accompanying drawings.
[0025] like Figure 1 As shown, a method for calculating the parallelism of a detector with dual-plane joint optimization includes the following steps: 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 coordinates of all pixel point clouds on the upper surface.
[0026] 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.
[0027] In the technical solution of this application embodiment, the three reference points on the upper surface are the minimum and sufficient conditions 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, it can make the collected 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.
[0028] 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; 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.
[0029] 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; , , These represent the first and second layers of the upper surface of the detector, respectively. The x-axis, y-axis, and z-axis coordinates of a pixel point cloud.
[0030] S2. For the coordinates of all pixel point clouds on the upper surface, remove duplicate data and calibrate the coordinates in sequence.
[0031] 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 from the data. The collected point cloud of 9564 pixels on the upper surface is sorted in ascending order of x-axis and y-axis coordinates, ensuring that adjacent pixels are continuously distributed on the x-y plane. Both x- and y-axis thresholds are set to 5 μm. Using the first point as a reference, subsequent sorted pixels 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 considered a duplicate and discarded. For example, if a point has Δx = 3 μm and Δy = 4 μm between it and the reference point, both less than 5 μm, it is considered a duplicate and discarded. Here, Δx and Δy represent the x-axis and y-axis coordinate differences, respectively.
[0032] 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.
[0033] S3. Based on the positioning point on the lower surface and the reference point on the upper surface, calculate the initial plane parameters of the lower surface and the initial plane parameters of the upper surface respectively, and construct the initial average trend surface of the two surfaces.
[0034] Select any three non-collinear points from the four positioning points on the lower surface, and use the least squares method to fit the initial plane parameters of the lower surface: .in, Indicates the initial planar parameters of the lower surface; , Let x and y represent the coefficients of the x and y terms in the equation of the initial plane of the lower surface, respectively. This represents the constant term in the equation of the initial plane of the lower surface. In this embodiment, the initial normal vector corresponding to the initial plane parameters of the lower surface is: .in, The initial normal vector represents the initial plane parameters of the lower surface; , These represent the x and y coordinates of the initial normal vector of the initial plane parameters of the lower surface, respectively.
[0035] Based on the three reference points on the upper surface, the initial plane parameters of the upper surface are obtained by fitting using the least squares method: .in, Indicates the initial planar parameters of the upper surface; , Let x and y represent the coefficients of the x and y terms in the initial plane equation of the upper surface, respectively. This represents the constant term in the equation of the initial plane of the upper surface. In this embodiment, the initial normal vector corresponding to the initial plane parameters of the upper surface is: .in, The initial normal vector represents the initial plane parameters of the upper surface; These represent the x and y coordinates of the initial normal vector of the initial plane parameters of the upper surface, respectively.
[0036] This application provides a preferred technical solution, which calculates the average value of the initial plane parameters of the lower surface and the initial plane parameters of the upper surface ( , , Construct the initial average trend surface equation for the two surfaces. The initial average trend surface equation of the two surfaces is used as the basis for calculating the prior weights. Among them, , , These represent the coefficients of the x-term, y-term, and constant term of the initial average trend surface equation for the two surfaces, respectively.
[0037] The technical solution of this application embodiment constructs an initial average trend surface for both surfaces, providing a unified and objective physical benchmark for obtaining prior weights in subsequent technical solutions. The initial average trend surface uses the average of the initial plane parameters of the lower and upper surfaces, a selection based on the synergy of the two surfaces, error robustness, and physical characteristics. First, the average value reflects the synergistic flatness trend of the two surfaces, adapting to the core requirement of parallelism calculation. The technical solution of this application embodiment solves for the relative parallelism of the two surfaces, essentially evaluating the relative positional relationship of the two surfaces, rather than the absolute shape of a single surface. The plane parameters of the initial average trend surface balance the initial tilt characteristics of the two surfaces, and its normal vector direction is close to the average direction of the normal vectors of the two surfaces, ensuring that the pixel distance calculation is not biased towards either surface. This allows the prior weights to objectively reflect the reliability of the pixel in the relative structure of the two surfaces, rather than the local deviation of a single surface, which is highly consistent with the core objective of parallelism calculation focusing on the relative relationship of the two surfaces, thereby improving the accuracy and precision of parallelism measurement.
[0038] S4. Based on the vertical distance from each pixel on the upper surface to the initial average trend surface of the two surfaces, obtain the prior weights that reflect the physical credibility of the pixels.
[0039] Calculate the vertical distance from each pixel on the upper surface to the initial average trend surface of the two surfaces. The expression for the vertical distance is: in, This represents the vertical distance from the k-th pixel on the upper surface to the initial average trend surface of the two surfaces.
[0040] This application provides a preferred technical solution for correcting vertical distance by adding minute values. ;in, To represent minute values, avoid division by zero. The corrected vertical distance is obtained using the following expression: in, Indicates the corrected number The vertical distance from each pixel to the coarse plane.
[0041] Prior weights are generated based on the corrected inverse vertical distance ratio and normalized to ensure that the sum of the prior weights of all pixels is 1, thereby quantifying the physical credibility of pixels.
[0042] The expression for the prior weights is: in, Indicates the first of the upper surface The prior weights of the pixels; m represents the index variable of the pixel point cloud on the upper surface; This represents the vertical distance from the m-th pixel on the corrected upper surface to the initial average trend surface of the two surfaces.
[0043] The technical solution of this application embodiment requires prior weights to quantify the physical reliability of pixels. Reliability is determined by the vertical distance from the pixel to a reference plane. If only a single initial plane of the lower or upper surface is used as a reference, the pixel distance calculation will be distorted due to the inherent spacing or local deviation of the two surfaces. The data type weights preset on the initial average trend surface of the two surfaces reflect the macroscopic flatness trend of the upper and lower surfaces of the detector through the initial morphological characteristics of the lower and upper surfaces. This allows the distance from the pixel to the initial average trend surface of the two surfaces to directly reflect the degree of deviation of the corresponding pixel from the overall structure of the two surfaces. This provides a reasonable basis for the quantization logic of prior weights: pixels closer to the initial average trend surface of the two surfaces have higher weights, and pixels farther from the initial average trend surface of the two surfaces have lower weights. This effectively filters out sudden noise far from the overall morphology of the two surfaces.
[0044] S5. Using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, and utilizing the prior weights, iteratively solve the dual-plane collaborative optimization objective function, and simultaneously obtain the plane parameters of the lower surface and the plane parameters of the upper surface.
[0045] S501. Using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, calculate the residuals of all data points in the current iteration.
[0046] All data points in this application embodiment include: lower surface positioning points, upper surface reference points, and upper surface pixels.
[0047] The residual of the lower surface positioning point is expressed as: .in, This represents the residual at the positioning point on the lower surface.
[0048] The residual of the upper surface reference point is expressed as: .in, This represents the residual at the reference point on the upper surface.
[0049] The expression for the pixel residuals on the upper surface is: .in, This represents the pixel residual on the upper surface.
[0050] S502. Calculate Huber dynamic weights based on the absolute median difference of the pixel residuals on the upper surface.
[0051] The Huber threshold is adaptively calculated based on the statistical distribution of the residuals of all upper surface pixels in the current iteration.
[0052] Based on the Huber threshold and the residual size of each pixel, the corresponding Huber dynamic weight is calculated using a piecewise function method.
[0053] Based on the real-time error distribution characteristics of the upper surface pixel point cloud, an iterative adaptive statistical calculation method is adopted to extract the absolute values of all pixel residuals in the current iteration. After sorting the absolute values, the median is taken to calculate the absolute median difference of the upper surface pixel residuals. The expression for the absolute median difference is: MAD = 1.4826 × The expression for the Huber threshold is: =1.345×MAD Where MAD represents the absolute median difference of the pixel residuals on the upper surface; 1.4826 represents the median; 1.4826 represents the normality correction coefficient. Indicates the first Huber threshold for the next iteration.
[0054] The normality correction coefficient makes the absolute median difference of the upper surface pixel residuals equivalent to the standard deviation σ. The normality correction coefficient is chosen because, under normality error scenarios, it allows the Huber threshold to be minimized. It covers approximately 95% of the normal residuals, and only initiates linear loss weight adjustment for outliers outside this range. This achieves the dual goals of preserving high accuracy for normal points and suppressing interference from outliers. Furthermore, the above process needs to be repeated after each iteration to generate the Huber threshold for the new iteration. It adapts to the error fluctuations of pixel point clouds at different fitting stages and determines the real-time error distribution characteristics of pixel point clouds on the upper surface of the detector.
[0055] Based on the Huber threshold and the residual size of each pixel, the corresponding Huber dynamic weight is calculated using a piecewise function. The expression for the Huber dynamic weight is: in, This represents Huber's dynamic weight.
[0056] S503. The prior weights are fused with the Huber dynamic weights to obtain the pixel dynamic fusion weights.
[0057] The prior weight of each pixel is multiplied by the corresponding Huber dynamic weight to obtain the initial fusion weight.
[0058] The expression for the initial fusion weights is: in, This represents the initial fusion weights.
[0059] The initial fusion weights are normalized to ensure that the sum of the initial fusion weights is 1, and the pixel dynamic fusion weights used for this iteration are obtained.
[0060] When fusing prior weights and Huber dynamic weights, the final pixel dynamic fusion weight is obtained by multiplying the two. Prior weights filter outliers with abnormal physical locations from the distance dimension of the global trend surface, while Huber dynamic weights filter outliers with abnormal fitting deviations from the dimension of the current iteration residual, thus doubly reducing the weight of outliers. At the same time, prior weights can anchor the global trend of the two surfaces, avoiding fitting deviations from the overall shape of the detector, while Huber dynamic weights can optimize local detail deviations and correct local errors in the trend surface. The combined pixel dynamic fusion weights of the two can achieve the unification of global trend and local details.
[0061] S504. Solve the dual-plane collaborative optimization objective function based on the pixel dynamic fusion weights, the preset data type weights, and the residuals of all data points.
[0062] In this embodiment of the application, the preset data type weights are: ω1=0.4, ω2=0.1, ω3=0.5.
[0063] Where ω1 represents the weight coefficient of the pixel point cloud on the upper surface; ω2 represents the weight coefficient of the reference point on the upper surface; and ω3 represents the weight coefficient of the positioning point on the lower surface.
[0064] This application also provides a preferred embodiment in which the data type weighting coefficients assigned to the lower surface positioning points, the upper surface reference points, and the upper surface pixel point cloud are different. The lower surface positioning points have the highest accuracy and serve as a global reference, therefore they have the largest weighting coefficient; the upper surface pixel point cloud has a large amount of information, including detailed information, therefore its weighting coefficient is second; the upper surface reference points serve as auxiliary calibration points, therefore their weighting coefficient is the smallest.
[0065] Set the initial iteration count, initial plane parameters of the upper surface, and initial plane parameters of the lower surface, i.e., the iteration count t=0, and set... = , = Iterative optimization and parameter updates are performed. Based on the residuals, absolute median difference, and Huber threshold of all data points in the current iteration, the objective function for biplane collaborative optimization is obtained. The expression for the objective function for biplane collaborative optimization is: Where F represents the objective function for biplane collaborative optimization; , These represent the lower surface plane parameters and the upper surface plane parameters to be solved, respectively. Indicates the accuracy of the positioning points on the lower surface; This indicates the accuracy of the upper surface reference point. (In this embodiment of the application) This indicates that the positioning points on the lower surface have uniform accuracy. This indicates that the reference point on the upper surface is a precision measurement point.
[0066] In this application's technical solution, the dual-plane collaborative optimization objective function can eliminate the error accumulation problem and ensure the collaborative correlation of the upper and lower surface plane parameters. If the lower surface plane parameters are fitted first, and then the upper surface parameters are fitted with the upper surface data, the error from the two fittings is easily transmitted to the upper surface through coordinate calibration, and the dual surface parameters lack direct correlation, ultimately amplifying the parallelism calculation error. However, the dual-plane collaborative optimization objective function incorporates the lower and upper surface plane parameters into the same optimization framework, and solves for the lower and upper surface plane parameters simultaneously in a single iteration. It can utilize the complementarity of the dual surface data to offset the fitting deviation of a single surface, avoid error transmission across surfaces, and ensure that the dual surface parameters always maintain consistency with the actual physical shape of the detector, providing a high-precision parameter basis for direct parallelism calculation.
[0067] Meanwhile, the dual-plane collaborative optimization objective function can efficiently integrate weights from multiple data types, significantly improving outlier suppression capabilities. By allocating weight coefficients for different data types, the dual-plane collaborative optimization objective function highlights the benchmark role of the lower surface positioning points and the information advantage of the upper surface pixel point cloud, while retaining the auxiliary calibration value of the upper surface benchmark points. Furthermore, embedding the pixel dynamic fusion weights into the dual-plane collaborative optimization objective function achieves dual suppression of outliers. Outliers, due to their distance from the initial average trend plane of the two surfaces and their large iterative residuals, have their contribution to the objective function significantly weakened. Normal pixels, with their high weights and small residuals, can dominate parameter optimization, thus solving the defect of outliers biasing planar parameters in traditional single-surface fitting and ensuring the reliability of the fitted parameters.
[0068] Furthermore, the dual-plane collaborative optimization objective function balances global trends and local details, ensuring fitting stability. By integrating the global baseline characteristics of the lower surface positioning points, the local calibration characteristics of the upper surface reference points, and the detailed representation characteristics of the pixel point cloud, the dual-plane collaborative optimization objective function avoids the fitting process from shifting to local anomaly regions. Moreover, the fixed allocation of data type weights ensures that high-confidence data dominates the iteration direction, making the fitting plane both conform to the macroscopic flatness trend of the upper and lower surfaces of the detector and accurately reflect pixel-level local details, avoiding global trend distortion or loss of local details.
[0069] Find the objective function of the two-plane co-optimization respectively and The partial derivatives are calculated and set to zero. This yields a system of equations based on a dual-plane collaborative optimization objective function, namely a six-variable linear system with six unknowns. The optimization objective of finding the dual-plane parameters that minimize the overall fitting error is transformed into a mathematical problem of solving a deterministic linear system. This ensures that the technical solution provided in this application can synchronously and globally optimize the determination of the planar parameters of the upper and lower surfaces of the detector, solving the technical problem of high-precision parallelism calculation.
[0070] The expression for the system of six linear equations in six variables is: The six-variable linear equation system is solved by Cholesky decomposition, and the lower and upper surface plane parameters are updated based on the solution results.
[0071] Get the updated parameters , Based on the updated plane parameters, calculate the normal vectors of the upper and lower surfaces. Lower surface normal vector: , Normal vector of the upper surface: The normal vectors of the lower and upper surfaces are normalized.
[0072] S505. Based on the solution results, update the lower surface plane parameters and the upper surface plane parameters.
[0073] Obtain the updated lower surface normal vector, upper surface normal vector, and the change in normal vector from the previous iteration.
[0074] When the change in the lower surface normal vector and the change in the upper surface normal vector are both less than the preset tolerance, the iteration is determined to be converged, and the current lower surface plane parameters and upper surface plane parameters are output.
[0075] Based on the updated lower and upper surface plane parameters, calculate the changes in the lower and upper surface normal vectors compared to the normal vectors of the previous iteration. Specifically, calculate the change in the magnitude of the normal vector in the (t+1)th iteration compared to the normal vector in the tth iteration. If this change is less than a preset tolerance of 10... -8 If the iteration converges, the parameter updates are stopped, and the current lower and upper surface plane parameters are output. In other words, when the change in the plane normal vector is sufficiently small, it indicates that the fitted plane has approximated the true physical shape of the detector's upper surface, and further iterations will have negligible impact on the plane's accuracy, meeting the requirements of precision optical measurement for fitting stability.
[0076] In practical applications, an auxiliary stopping condition can be preset. When a preset maximum number of iterations is reached, the iteration will stop to prevent it from entering an infinite loop. For example, a maximum of 30 iterations can be preset as an auxiliary stopping condition. If the iteration count t reaches this maximum value and the core convergence condition that the change in the normal vector is less than the preset tolerance is still not met, the iteration will be forcibly stopped to ensure computational efficiency. Other maximum iteration counts can also be preset according to actual needs; this application does not limit this.
[0077] S6. Obtain the angle between the upper and lower surfaces of the detector based on the lower surface plane parameters and the upper surface plane parameters.
[0078] The expression for the angle between the upper and lower surfaces of the detector is: in, This indicates the angle between the upper and lower surfaces of the detector; The radian measure of the angle θ between the normal vectors of the upper and lower surfaces; This represents the final obtained lower surface normal vector; This represents the final obtained upper surface normal vector.
[0079] The expression for converting units to arcseconds is: in, An angular representation of the angle θ between the normal vectors of the upper and lower surfaces; An arcsecond representation of the angle θ between the normal vectors of the upper and lower surfaces.
[0080] The technical solution of this application provides a more reliable physical benchmark for weight generation by constructing an initial average trend surface of two surfaces; the collaborative optimization framework ensures synchronous optimization of the parameters of the two surfaces and avoids error accumulation; the reasonable allocation of data type weights and the mutual support and cooperation among various technical solutions, along with the calculation method of dual-plane joint optimization, significantly improve the accuracy of the parallelism calculation method and solve the problem of error accumulation caused by step-by-step fitting in the prior art.
[0081] The technical solution of this application uses prior weights based on the initial average trend surface of the dual surfaces to filter out anomalous outliers from the physical location dimension, and Huber dynamic weights based on iterative residuals to filter out anomalous outliers from the fitting deviation dimension. The fusion of these dual weights achieves full coverage suppression of both types of outliers, overcoming the limitation of single weights in accurately identifying latent outliers and making outlier suppression more precise. Prior weights can anchor the global trend of the dual surfaces, preventing the fitting from deviating from the overall shape of the detector. Huber dynamic weights can optimize local detail deviations and correct local errors in the trend surface, ensuring the fitting plane conforms to global flatness while retaining local detail characteristics, resulting in higher fitting accuracy. By simultaneously optimizing the upper and lower surface parameters through a dual-plane collaborative fitting model and directly establishing normal vector correlation to solve for parallelism, the accuracy requirements of precision measurement and the efficiency requirements of engineering applications are balanced, resulting in higher computational efficiency.
[0082] This application also provides system embodiments that follow the above embodiments, for implementing the method steps described in the above embodiments. The interpretation of the same names is the same as that in the above embodiments, and they have the same technical effects as those in the above embodiments, so they will not be repeated here.
[0083] A system for jointly optimizing the parallelism of a detector's two planes includes: 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 the point cloud of all pixels on the upper surface.
[0084] The preprocessing module is used to remove duplicate data and calibrate the coordinates of the pixel point cloud on the upper surface.
[0085] The trend surface construction module is used to calculate the initial plane parameters of the lower surface and the initial plane parameters of the upper surface based on the positioning point of the lower surface and the reference point of the upper surface, respectively, and construct the initial average trend surface of the two surfaces.
[0086] The prior weight generation module is used to obtain prior weights that reflect the physical credibility of pixels based on the distance of each pixel on the upper surface to the initial average trend surface of the two surfaces.
[0087] The collaborative fitting module is used to iteratively solve the dual-plane collaborative optimization objective function using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, and to solve for the plane parameters of the lower surface and the upper surface.
[0088] The parallelism calculation module is used to calculate the parallelism between the upper and lower surfaces of the detector based on the lower surface plane parameters and the upper surface plane parameters.
[0089] In this embodiment of the invention, the effectiveness of the technical solution of the invention is verified through comparative experiments. Specific data are shown in Table 1: Table 1 Comparison of Experimental Results The comparative experimental data from 12 sets show that, even without outliers, the technical solution of this application maintains extremely high benchmark accuracy. As the proportion of outliers increases, the advantages of the technical solution become increasingly apparent. When the outlier proportion is 6%, under 0.06μm noise, the parallelism error calculated by the technical solution of this application is 0.166 arcseconds, far lower than the 0.335 arcseconds of weighted least squares and the 0.522 arcseconds of Huber's method, representing an accuracy improvement of over 50%. When the outlier proportion increases to 12% and 18%, under various noise combinations, the parallelism error calculated by the technical solution of this application is consistently the smallest or closest to the smallest among the three methods.
[0090] The RMSE of the technical solution in this application is slightly higher than that of traditional methods, indicating that the technical solution prioritizes ensuring the accuracy of the final target parallelism, i.e., the angle between the normal vectors, rather than simply pursuing the RMSE of the surface fit for all data points. This solves the technical problem in existing technologies where, in measurements with outliers, blindly pursuing a low RMSE can lead to the fitting plane being skewed by the outliers, thus sacrificing parallelism accuracy.
[0091] Finally, it should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0092] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for calculating the parallelism of a detector with dual-plane joint optimization, characterized in that, Includes the following steps: Acquire 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 coordinates of the point cloud of all pixels on the upper surface; The coordinates of the reference points on the upper surface and the coordinates of all the pixel point clouds on the upper surface are subjected to duplicate data removal and coordinate calibration. Based on the positioning point on the lower surface and the reference point on the upper surface, the initial plane parameters of the lower surface and the initial plane parameters of the upper surface are calculated respectively, and the initial average trend surface of the two surfaces is constructed. Prior weights are obtained based on the distance from each pixel on the upper surface to the initial average trend surface of the two surfaces; Using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, and utilizing the prior weights, the objective function for dual-plane collaborative optimization is solved iteratively, while simultaneously obtaining the plane parameters of the lower surface and the upper surface. The angle between the upper and lower surfaces of the detector is obtained based on the lower surface plane parameters and the upper surface plane parameters.
2. The calculation method according to claim 1, characterized in that, The step of using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as initial values for iteration, and utilizing the prior weights to iteratively solve the dual-plane collaborative optimization objective function, and solving for the lower surface plane parameters and the upper surface plane parameters, includes: Using the initial plane parameters of the lower surface and the initial plane parameters of the upper surface as the initial values for iteration, calculate the residuals of all data points in the current iteration; The Huber dynamic weights are calculated based on the absolute median difference of the upper surface pixel residuals and the Huber threshold. The prior weights are fused with the Huber dynamic weights to obtain the pixel dynamic fusion weights; Based on the pixel dynamic fusion weights, the preset data type weights, and the residuals of all data points, the dual-plane collaborative optimization objective function is obtained. The objective function of the dual-plane collaborative optimization is solved iteratively, and the parameters of the lower and upper surface planes are updated based on the solution results.
3. The calculation method according to claim 2, characterized in that, The step of updating the lower surface plane parameters and the upper surface plane parameters based on the solution results includes: Obtain the updated lower surface normal vector, upper surface normal vector, and the change in normal vector from the previous iteration; When the change in the lower surface normal vector and the change in the upper surface normal vector are both less than the preset tolerance, the iteration is determined to be converged, and the current lower surface plane parameters and upper surface plane parameters are output.
4. The calculation method according to claim 2, characterized in that, The objective function for dual-plane collaborative optimization is to minimize the weighted sum of squared residuals of the lower surface positioning points, the upper surface reference points, and the upper surface pixel point cloud.
5. The calculation method according to claim 2, characterized in that, The step of fusing the prior weights with the Huber dynamic weights to obtain pixel dynamic fusion weights includes: The prior weight of each pixel is multiplied with the corresponding Huber dynamic weight to obtain the initial fusion weight; The initial fusion weights are normalized to obtain the pixel dynamic fusion weights used in this iteration.
6. The calculation method according to claim 2, characterized in that, The step of calculating the Huber dynamic weight based on the residuals of the upper surface pixels and the Huber threshold includes: The Huber threshold is adaptively calculated based on the statistical distribution of the residuals of all upper surface pixels in the current iteration. Based on the Huber threshold and the residual size of each pixel, the corresponding Huber dynamic weight is calculated using a piecewise function method.
7. The calculation method according to claim 2, characterized in that, The dual-plane collaborative optimization objective function includes: The weighting coefficients for the data types assigned to the lower surface positioning points, upper surface reference points, and upper surface pixel point clouds are different; among them, the weighting coefficient of the lower surface positioning points is the largest, followed by the weighting coefficient of the upper surface pixel point clouds, and the weighting coefficient of the upper surface reference points is the smallest.
8. The calculation method according to claim 1, characterized in that, The process of removing duplicate data and calibrating the coordinates of the reference points on the upper surface and the coordinates of all pixel point clouds on the upper surface includes: A neighborhood deduplication method based on dual thresholds of x and y coordinates is used to remove duplicate data. Using the positioning point on the lower surface as a global reference, coordinate calibration is performed on the reference point on the upper surface and the data of all pixel point clouds on the upper surface.
9. The calculation method according to claim 1, characterized in that, The construction of the initial average trend surface of the dual surfaces includes: The arithmetic mean of the corresponding coefficients of the initial plane parameters of the lower surface and the initial plane parameters of the upper surface is taken to obtain the plane equation coefficients of the initial average trend surface of the two surfaces.
10. A system for implementing the parallelism of a detector dual-plane joint optimization according to the calculation method of any one of claims 1-9, characterized in that, include: 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 preprocessing module is used to remove duplicate data and calibrate the coordinates of 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 trend surface construction module is used to calculate the initial plane parameters of the lower surface and the initial plane parameters of the upper surface based on the positioning point of the lower surface and the reference point of the upper surface, respectively, and construct the initial average trend surface of the two surfaces. The prior weight generation module is used to obtain prior weights reflecting the physical credibility of pixels based on the distance of each pixel on the upper surface to the initial average trend surface of the two surfaces. The collaborative fitting module is used to iteratively solve the dual-plane collaborative optimization objective function using the initial plane parameters of the lower and upper surfaces as the initial values of the iteration, and to solve for the plane parameters of the lower and upper surfaces using the prior weights. The parallelism calculation module is used to calculate the parallelism between the upper and lower surfaces of the detector based on the lower surface plane parameters and the upper surface plane parameters.
Citation Information
Patent Citations
Parallelism measuring method for weak-rigidity planar component
CN112902900A
Point cloud plane parameter optimization method based on combination of IPOPT and residual error
CN120672621A
Method and apparatus for calibrating an electronic camera
WO2008011989A2
Registration method and system
WO2024098428A1