A method for fast Gaussian fitting and peak extraction in confocal tomography

By using the fast Gaussian fitting method in confocal tomography scanning, the weight matrix is ​​constructed and linearly fitted, the problem of difficulty in quickly extracting the peak of the light intensity signal in the prior art is solved, and efficient and accurate surface profile measurement is achieved.

CN117520814BActive Publication Date: 2025-03-14HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311435670.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2025-03-14
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

During confocal tomography scanning, it is difficult for the prior art to quickly and accurately extract the peak of the light intensity signal, resulting in limited accuracy and efficiency of surface profile measurement.

Method used

The fast Gaussian fitting method is used to construct the weight matrix by traversing the single-point tomography data, convert the Gaussian fit into a linear fit, and solve it with linear weighted least squares method to obtain the axial response curve, thereby extracting the position of the peak.

Benefits of technology

The peak value of the light intensity signal is quickly and accurately extracted, which improves the accuracy and efficiency of surface profile measurement and reduces processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117520814B_ABST
    Figure CN117520814B_ABST
Patent Text Reader

Abstract

A method for fast Gaussian fitting and peak extraction of confocal tomography scanning, which relates to a method for fast Gaussian fitting and peak extraction. The present invention is to solve the problem that there is no method that can quickly and accurately extract the peak value of light intensity. The steps of the present invention include step 1, traversing the single-point tomography data to obtain the maximum value, comparing each number in the single-point tomography data with half of the maximum value, and constructing a weight matrix using the comparison result; step 2, converting the Gaussian fitting of the data into a linear fitting of the data, combining the weight matrix with the linear weighted least squares method to solve the parameters of the fitting curve, and obtaining the axial response curve of the single point through transformation; step 3, using vectorized calculation to perform least squares solution on the tomography data of multiple points, and simultaneously obtaining the axial response curves of multiple points; step 4, obtaining the position of the curve peak corresponding to each point according to the axial response curve. The present invention belongs to the field of optical measurement technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for extracting peak values ​​through rapid Gaussian fitting, and belongs to the technical field of optical measurement. Background Art

[0002] In the process of confocal tomography scanning, it is necessary to use the laser to focus on different depths under a fixed field of view for scanning, remove the interference of out-of-focus light through the pinhole, and obtain the light intensity signal at the focus point. When measuring the surface profile, for different scanning depths at the same position, the signal of the reflected light received by the photosensitive plane will be the strongest only when the laser is focused exactly on the surface position. Therefore, determining the position of the peak value of the light intensity signal in the depth direction is of great significance for accurately restoring the geometric morphology of the surface profile. In addition, for confocal tomography scanning, the more scanning layers and the higher the scanning resolution, the larger the amount of data it contains and the longer the processing time, but the valid data often only accounts for a small part.

[0003] Therefore, how to provide a fast method that can accurately extract the light intensity peak value is an urgent problem that those skilled in the art need to solve. Summary of the invention

[0004] The present invention aims to solve the problem that there is no method capable of extracting the light intensity peak value quickly and accurately at present, and further proposes a method for extracting the peak value by fast Gaussian fitting of confocal tomography scanning.

[0005] The technical solution adopted by the present invention to solve the above problems is: the steps of the present invention include:

[0006] Step 1, traverse the single-point tomography data to obtain the maximum value, compare each number in the single-point tomography data with half of the maximum value, and use the comparison results to construct a weight matrix;

[0007] Step 2: Convert the Gaussian fit of the data into a linear fit of the data, and use the linear weighted least square method in combination with the weight matrix to solve the parameters of the fitting curve, and obtain the axial response curve of a single point through transformation;

[0008] Step 3, using vectorized calculation to perform least squares solution on the multi-point tomographic data, and simultaneously obtain the multi-point axial response curves;

[0009] Step 4: Obtain the position of the curve peak corresponding to each point according to the axial response curve.

[0010] Furthermore, when constructing the weight matrix in step 1, when the value of the tomographic data is greater than half of the maximum value, the corresponding weight is set to 1; when the value of the tomographic data is less than half of the maximum value, the corresponding weight is an extremely small number.

[0011] Furthermore, the minimum number is less than 0.01.

[0012] Furthermore, in step b, a logarithmic method is used to convert the Gaussian fit into a linear fit.

[0013] Furthermore, in step b, when the fitting curve is transformed into a single-point axial response curve, it is necessary to obtain the standard deviation and mean of the single-point axial response curve through the parameters of the fitting curve.

[0014] Furthermore, the vectorized calculation method used in step 3 is matrix operation, and its specific steps are:

[0015] Step 301: rearrange a three-dimensional matrix of size x*y*z with x rows, y columns and z layers into a two-dimensional matrix of size s*z, where s=x*y;

[0016] Step 302: fix the first dimension s of the two-dimensional array, perform linear weighted least squares fitting on the second dimension z, and obtain parameters of s fitting curves;

[0017] Step 303: perform reverse deduction according to the rearranged order to obtain x*y fitting curves.

[0018] The beneficial effects of the present invention are: BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of the present invention;

[0020] Figure 2 It is a schematic diagram of the fitting results of the present invention. DETAILED DESCRIPTION

[0021] Specific implementation method 1: Combination Figure 1 and Figure 2 This embodiment is described. The method for extracting peak values ​​by fast Gaussian fitting of confocal tomography scanning described in this embodiment is implemented by the following steps:

[0022] Step 1, traverse the single-point tomography data to obtain the maximum value, compare each number in the single-point tomography data with half of the maximum value, and use the comparison results to construct a weight matrix;

[0023] Step 2: Convert the Gaussian fit of the data into a linear fit of the data, and use the linear weighted least square method in combination with the weight matrix to solve the parameters of the fitting curve, and obtain the axial response curve of a single point through transformation;

[0024] Step 3, using vectorized calculation to perform least squares solution on the multi-point tomographic data, and simultaneously obtain the multi-point axial response curves;

[0025] Step 4: Obtain the position of the curve peak corresponding to each point according to the axial response curve.

[0026] Specific implementation method 2: Combination Figure 1 and Figure 2 To illustrate the present embodiment, in step 1 of a method for fast Gaussian fitting to extract peak values ​​of a confocal tomography scan described in the present embodiment, when constructing a weight matrix, when the value of the tomography data is greater than half of the maximum value, its corresponding weight is set to 1; when the value of the tomography data is less than half of the maximum value, its corresponding weight is an extremely small number, and the extremely small number is less than 0.01.

[0027] Specific implementation method three: Combination Figure 1 and Figure 2 To illustrate the present embodiment, in step b of a method for fast Gaussian fitting to extract peak values ​​of a confocal tomography scan described in the present embodiment, a logarithmic method is used to convert the Gaussian fitting into a linear fitting; when the fitting curve is transformed into a single-point axial response curve, it is necessary to obtain the standard deviation and mean of the single-point axial response curve through the parameters of the fitting curve.

[0028] Specific implementation method four: Combination Figure 1 and Figure 2 To illustrate this embodiment, the vectorized calculation method used in step 3 of the method for fast Gaussian fitting and peak extraction of confocal tomography scanning described in this embodiment is matrix operation, and the specific steps are:

[0029] Step 301: rearrange a three-dimensional matrix of size x*y*z with x rows, y columns and z layers into a two-dimensional matrix of size s*z, where s=x*y;

[0030] Step 302: fix the first dimension s of the two-dimensional array, perform linear weighted least squares fitting on the second dimension z, and obtain parameters of s fitting curves;

[0031] Step 303: perform reverse deduction according to the rearranged order to obtain x*y fitting curves.

[0032] Example

[0033] The specific steps of the method for fast Gaussian fitting and peak extraction of confocal tomography scanning described in the present invention are as follows:

[0034] Step a, set the number of scan rows X and columns Y to 256 and 256, and the number of scan layers Z to 100. After the scan, the tomographic scan data data[X,Y,Z] is obtained. Traverse the single-point tomographic data data[xi,yi,Z] with the specified number of rows xi and columns yi to obtain the maximum value Imax[xi,yi]. Compare each number data[xi,yi,zi] in the single-point tomographic data with 0.5*Imax[xi,yi], and use the comparison results to construct the weight matrix W[X,Y,Z]: when data[xi,yi,zi]<0.5*Imax[xi,yi], W[xi,yi,zi]=0.001, when data[xi,yi,zi]>0.5*Imax[xi,yi], W[xi,yi,zi]=1;

[0035] Step b: Convert the Gaussian fit of the data into a linear fit of the data:

[0036] The formula for the Gaussian function is:

[0037]

[0038] By taking the logarithm we get:

[0039]

[0040] After logarithmization, the polynomial equation is obtained. The linear weighted least square method is used to solve the polynomial coefficients in combination with the weight matrix W[X, Y, Z]. The mean and standard deviation are obtained through transformation to obtain the axial response curve of a single point.

[0041] Step c, rearrange data[X,Y,Z] into data[S,Z], where S=X*Y=65536; perform least squares solution on data[S,Z] using matrix calculation to obtain parameters of S fitting curves, and obtain axial response curves of S pixels through transformation; perform reverse deduction according to the rearrangement order and recombine into X*Y axial response curves;

[0042] Step d: obtaining the position of the curve peak corresponding to each point according to the axial response curve.

[0043] The above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement made to the above embodiments without departing from the content of the technical solution of the present invention, based on the technical essence of the present invention, within the spirit and principles of the present invention, still fall within the protection scope of the technical solution of the present invention.

Claims

1. A method for extracting peak values ​​by fast Gaussian fitting of confocal tomography, characterized in that: The method for extracting peak values ​​by fast Gaussian fitting of confocal tomography is achieved by the following steps: Step 1, traverse the single-point tomography data to get the maximum value, compare each number in the single-point tomography data with half of the maximum value, and use the comparison results to construct a weight matrix; set the number of scan rows X and columns Y to 256 and 256, and the number of scan layers Z to 100; then after the scan, the tomography scan data data[X,Y,Z] is obtained; traverse the single-point tomography data data[xi,yi,z] with the specified number of rows xi and columns yi to get the maximum value Imax[xi,yi]; compare each number data[xi,yi,zi] in the single-point tomography data with 0.5*Imax[xi,yi], and use the comparison results to construct a weight matrix W[X,Y,Z]: when data[xi,yi,zi]<0.5*Imax[xi,yi], W[xi,yi,zi]=0.001, when data[xi,yi,zi]>0.5*Imax[xi,yi], W[xi,yi,zi]=1; Step 2: Convert the Gaussian fit of the data into a linear fit of the data, and use the linear weighted least squares method in combination with the weight matrix to solve the parameters of the fitting curve, and obtain the axial response curve of a single point through transformation; convert the Gaussian fit of the data into a linear fit of the data: After taking the logarithm of the Gaussian function, a polynomial equation is obtained. The polynomial coefficients are solved by the linear weighted least square method in combination with the weight matrix W[X, Y, Z]. The mean and standard deviation are obtained by transformation, and the axial response curve of a single point is obtained. The standard deviation and mean of the axial response curve of a single point are obtained by fitting the parameters of the curve. Step 3, use vectorized calculation to perform least squares solution on multi-point tomographic data, and obtain multi-point axial response curves at the same time; rearrange data[X,Y,Z] into data[S,Z], where S=X*Y=65536; use matrix calculation to perform least squares solution on data[S,Z], obtain the parameters of S fitting curves, and obtain the axial response curves of S pixel points through transformation; reverse inference is performed according to the rearrangement order, and recombined into X*Y axial response curves; The vectorized calculation method used is matrix operation, and its specific steps are: Step 301: rearrange a three-dimensional matrix of size X*Y*Z with X rows, Y columns and Z layers into a two-dimensional matrix of size S*Z, where S=X*Y; Step 302, fix the first dimension S of the two-dimensional array, perform linear weighted least squares fitting on the second dimension Z, and obtain parameters of S fitting curves; Step 303: reverse the order of rearrangement to obtain X*Y fitting curves; Step 4: Obtain the position of the curve peak corresponding to each point according to the axial response curve.

2. The method for extracting peak values ​​by fast Gaussian fitting of confocal tomography according to claim 1, characterized in that: When constructing the weight matrix in step 1, when the value of the tomographic data is greater than half of the maximum value, the corresponding weight is set to 1; when the value of the tomographic data is less than half of the maximum value, the corresponding weight is an extremely small number.

3. The method for extracting peak values ​​by fast Gaussian fitting of confocal tomography according to claim 2, characterized in that: The extremely small number is less than 0.01.

Citation Information

Patent Citations

  • Maximum value compensation algorithm for extracting peak position of confocal axial response curve

    CN108875124A

  • Method for extracting perfusion time intensity curve based on wide beam contrast imaging

    WO2015131453A1