Cut light spot center positioning method under overexposure condition based on linear array CMOS (Complementary Metal Oxide Semiconductor)
Through the inverse tangent function axis-shift symmetry processing and least squares fitting, the problem of accuracy in spot center positioning under overexposure conditions is solved, precise positioning under high brightness and flooded waveforms is achieved, and the adaptability and positioning accuracy of the linear array CMOS imaging system are improved.
Patent Information
- Application Number
- CN202510863713.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-14
AI Technical Summary
The existing spot center positioning method cannot effectively locate the center of the clipped spot under overexposure conditions, especially the traditional method based on the Gaussian distribution assumption fails when the spot is clipped.
Under overexposure conditions based on linear array CMOS, an inverse tangent function axis-shift symmetry processing is used, combined with bidirectional differential denoising and least squares fitting, to establish an inverse tangent function edge model, and fit the spot waveform characteristics during the measurement process of the laser triangulation displacement sensor to locate the position.
In the case of high-brightness overexposure and flooded waveforms, the center of the light spot is accurately located, which improves the adaptability and positioning accuracy of the imaging system and reduces the requirements for the performance of the imaging device.
Smart Images

Figure CN120782869A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of optical measurement, and particularly relates to a method for positioning the center of a clipped top light spot under overexposure condition based on a linear array CMOS. BACKGROUND
[0002] The light spot center positioning algorithm is widely used in the fields of optical measurement, image processing and computer vision, especially in lasers, microscopes and optical systems, for accurately positioning the center position of the light spot. The purpose of these algorithms is to find the geometric center of the light spot in the digital image, and then obtain sub-pixel level accuracy.
[0003] The current laser light point center positioning method is divided into light intensity distribution method and geometric contour fitting method, and the common methods include maximum brightness method, centroid method, Gaussian fitting, etc.
[0004] The maximum brightness method directly takes the position of the brightest pixel in the light spot as the center of the light spot. This method is simple and has high computational efficiency. It is simple to implement and extremely fast in calculation, but has low precision, is only suitable for cases where the light spot is very clear and has no obvious noise, and cannot achieve sub-pixel positioning.
[0005] The Gaussian fitting algorithm assumes that the intensity distribution of the light spot conforms to the Gaussian distribution model, and estimates the center position and standard deviation of the light spot by using the least squares fitting method of the Gaussian function. However, when the light spot appears overexposure and clipping, its intensity distribution no longer conforms to the Gaussian distribution, and the fitting algorithm will fail to position the center.
[0006] The traditional positioning method is based on the assumption that the energy of the light spot is Gaussian distributed. When the light signal is too strong, the CMOS sensor will generate an analog voltage signal that exceeds the dynamic range of the ADC. The ADC has a fixed maximum convertible voltage value, which is determined by the resolution and reference voltage of the ADC. If the voltage of the input signal exceeds this maximum value, the ADC will not be able to correctly record the signal that exceeds the part, resulting in the output signal reaching the maximum value and no longer increasing, forming a clipped waveform. On the image, this phenomenon usually manifests as a high brightness area (e.g., a strong light source or a high reflection area) becoming pure white, losing detailed information, and not conforming to the Gaussian distribution model. The maximum brightness method, centroid method, and Gaussian fitting are not applicable at this time.
[0007] In order to solve the above problems, the present application develops a method for positioning the center of a clipped top light spot under overexposure condition based on a linear array CMOS. SUMMARY
[0008] In view of the above defects of the prior art, the technical problems to be solved by the present application include:
[0009] How to design a light spot center positioning method to solve the above technical problems.
[0010] To achieve the above object, the present application provides a light spot center positioning method based on linear array CMOS under overexposure condition, which comprises the following steps: after the arctangent function is processed by shift axis symmetry, the edge shape model of the arctangent function after shift axis symmetry is used to fit and position various waveform features appearing in the measurement process of laser triangulation displacement sensor; the method comprises three steps of waveform preprocessing, arctangent function edge model establishment and fitting positioning.
[0011] Further, the waveform preprocessing step comprises: the light spot waveform of CMOS imaging is sampled and coded by ADC to output in the form of digital image, to obtain the light intensity ADC value corresponding to each pixel; the envelope of the light spot waveform is extracted; and bidirectional differential denoising is performed.
[0012] Further, the bidirectional differential denoising is to find the maximum value of the gray scale in the field of the pixel point by difference comparison, and the width of the field is the number of comparison points.
[0013] Further, the bidirectional differential denoising is specifically as follows: if the linear array CMOS has n pixels, the width is set to 2 pixels, then from the third pixel, the four pixel values before and after the third pixel are compared, if all the four pixel values are greater than the third pixel, the amplitude and pixel index of the third pixel are retained, if not, the third pixel is discarded, and the four comparison of the next pixel point is continued, until the comparison of the n-2th pixel is completed, and all local maximum values are returned to obtain the envelope of the original waveform.
[0014] Further, the arctangent function edge model establishment is as follows:
[0015] The elementary arctangent function is f(x)=arctan(x), and the arctangent function obtained after shift axis symmetry processing is:
[0016] f(x)=a·arctan(b·(x-c) 2 +d)+e,
[0017] wherein a is the function amplitude gain; e is the value range increment, which can make the value range of the function fall in the non-negative region, since the value range of f(x)=arctan(x) is [-π / 2,π / 2], the lower limit of the value range of f(x)=a·arctan(b·(x-c) 2 +d) is -aπ / 2, if the value range of the fitting function falls in the non-negative region, e must be π / 2a, and a and e jointly determine the value range of the function.
[0018] Further, in the inverse tangent function, when x = 0, c = 0, f(0) = a arctan(d) + e corresponds to the difference between the maximum and minimum values of the gray scale in the waveform, i.e. c is the offset in the x-axis direction of the independent variable, i.e. the positioning center x-maxQ of the waveform; d is the offset in the y-axis direction of the function, and d and b jointly act on the intersection of the function curve and the x-axis , i.e. the center width D.
[0019] Further, the fitting positioning is to perform least squares fitting on the preprocessed discrete waveform data on the basis of the established edge model.
[0020] Further, the fitting positioning includes: the gray scale distribution of the denoised light spot is G, the sampling data points {(xi, Gi)} are obtained, where xi represents the pixel position, and Gi is the corresponding light spot gray scale sampling value; the residual between the sampling value and the fitting value is r(p) = F(x, p) - G(x), p is the parameter set {a, b, c, d, e} of the inverse tangent edge model; and the target of the fitting positioning is to find a set of parameters, so that the sum of squares of residuals is minimized.
[0021] Further, in the fitting positioning, a set of parameters is found through iteration, so that the sum of squares of residuals is minimized.
[0022] Further, the iteration is specifically:
[0023] For each iteration k, the current residual vector r(k) is calculated
[0024]
[0025] The Jacobian matrix is calculated, and the elements are:
[0026]
[0027] The calculation matrix and the calculation vector are constructed
[0028] H = J(p k ) T J(p k )
[0029] b = -J(p k ) T J(p k )
[0030] Next, the linear equation is solved:
[0031] (H + λ k I)Δp k = b
[0032] where I is the identity matrix, lambda k is the current damping factor;
[0033] The calculation result can make the parameter p updated, if
[0034] |S(p k+1 )-S(p k | < epsilon
[0035] The iteration is stopped, epsilon is a very small but not 0 value, and the final parameter vector p k+1 is the iteration result.
[0036] Compared with the prior art, the technical effect of the present application is that:
[0037] In view of the problem that the center of the top-cut light spot loses the original Gaussian distribution feature due to overexposure in the prior art, and the intensity distribution-based method cannot locate the center of the top-cut light spot, the present application adopts the arc tangent function of shift axis symmetry processing as a fitting function, and the center of the top-cut light spot is fitted by least square fitting. The light spot center can still be accurately positioned in the case of high light overexposure, normal and submerged waveforms. The imaging conditions and the requirement for the performance of the imager are reduced, so that the linear array CMOS imaging system has stronger adaptability.
[0038] In view of the problem that the accurate solution of the least square fitting needs the fitting initial parameters similar to the approximate solution, and there is no initial parameter calculation formula related to the physical features (such as peak value, half width and center) of the light spot for the arc tangent function of shift axis symmetry processing, the present application establishes an edge model of the arc tangent function, and the model provides a set of initial fitting parameter calculation formula with physical meaning consistent with the features of the light spot. The fitting initial parameter calculation formula similar to the approximate solution is provided for the least square fitting, so that the accuracy of the fitting of the light spot center is improved, and overfitting and fitting failure are prevented.
[0039] In view of the problem that the original light spot data collected by the linear array CMOS contains noise and multiple peaks, which will affect the positioning accuracy of the fitting algorithm, the present application finds the maximum value of the gray scale in the field of the pixel point through difference comparison by the overall idea of bidirectional difference, sets a suitable neighborhood width, that is, the number of pixel points, if the width is set to 3 pixels, the difference comparison operation is performed three times before and after the fourth pixel, and the cycle is sequentially traversed to the n-3th pixel, and all local maximum values are returned. The noise of the original waveform signal is filtered out, and the waveform features are retained without making the edge blurred. Sufficient data is provided for fitting and positioning. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is the flowchart of the embodiment of the present application;
[0041] Figure 2is a schematic diagram of the waveform preprocessing step of the embodiment of the present application;
[0042] Figure 3 is a schematic diagram of the result of the waveform preprocessing step of the embodiment of the present application;
[0043] Figure 4 is a function diagram of the embodiment of the present application;
[0044] Figure 5 is a schematic diagram of the light spot section of the embodiment of the present application;
[0045] Figure 6 is a fitting function diagram of the embodiment of the present application;
[0046] Figure 7 is a schematic diagram of the parameters of each of the fitting function of the embodiment of the present application;
[0047] Figure 8 is a waveform diagram of the embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical content of the present application will be more clear and convenient to understand by introducing the preferred embodiments of the present application with reference to the accompanying drawings of the specification. The present application can be embodied in many different forms, and the protection scope of the present application is not limited to the embodiments mentioned in the text.
[0049] The present application discloses a kind of based on linear array CMOS under overexposure condition top cutting light spot center positioning algorithm, core is in the edge shape model of arctangent function after symmetry processing by moving axis, it can be fitted and positioned to various waveform characteristics in the measurement process of laser triangulation displacement sensor. Overall flow includes waveform preprocessing, arctangent function edge model establishment, fitting positioning 3 parts.The basic flow chart of algorithm is as shown in Figure 1 .
[0050] First, waveform preprocessing is carried out, and its characteristics and implementation steps include:
[0051] The ADC samples and encodes the spot waveform of the CMOS imaging to output a digital image, obtaining the light intensity ADC value corresponding to each pixel. The linear array CMOS collects one-dimensional waveform data, i.e. the intensity distribution of the cross section of the spot. The original waveform has not been smoothed and retains all the original information and noise. In order to separate the spot signal and the background noise, the envelope of the spot waveform is extracted. The overall idea of the bidirectional difference is to find the maximum value of the gray scale in the field of the pixel point by difference comparison. The width of the field, i.e. the number of comparison points, cannot be too large or too small. If it is too large, the edge feature will be lost, and if it is too small, part of the noise will be retained. Specifically, if the linear array CMOS has n pixels, the width is set to 2 pixels, and from the third pixel, the value of the four pixels before and after it is compared. If they are all greater than the four pixels, the amplitude of the pixel point and the pixel index are retained. If they are less than the four pixels, the amplitude of the pixel point and the pixel index are discarded. The four comparison of the next pixel point is continued until the comparison of the n-2 pixel point is completed. All local maximum values are returned to obtain the envelope of the original waveform. The envelope data is less than the original data points, but still reflects the distribution of the light intensity and removes the influence of the noise signal. This step is shown in Figure 2 and Figure 3 .
[0052] Next, the establishment of the arctangent function edge model is shown in Figure 4 . The model provides a fitting function and initial parameters for least squares fitting. Specifically, the elementary arctangent function is f(x) = arctan(x), and after the shift-symmetry processing, the function is:
[0053] f(x) = a arctan(b (x-c 2 +d) + e
[0054] The laser triangulation displacement sensor with a point laser as the light source uses a linear array CMOS as the imaging element. The reflected spot moves on the linear array CMOS with the axial movement of the measured object. The waveform captured by the linear array CMOS is actually the cross section of the spot, as shown in Figure 5 . The energy distribution shape of the spot cross section can be simulated by the arctangent function after shift-symmetry transformation. Therefore, an arctangent function edge model is considered to fit and locate the center of the spot. The fitting function is f(x) = a arctan(b (x-c 2 +d) + e Figure 6 , as shown in
[0055] Specifically, f(x) = a arctan(b (x-c 2 +d) + e
[0056] a is the function amplitude gain; e is the value domain increment, which can make the value domain of the function fall in the non-negative region, since the value domain range of f(x) = arctan(x) is [-π / 2, π / 2], the value domain range of f(x) = a arctan(b(x-c) + e) is [-aπ / 2, aπ / 2], if the value domain of the fitting function falls in the non-negative region, e must be π / 2a, a and e jointly determine the value domain range of the function. When x = 0 and c = 0, f(0) = a arctan(d) + e corresponds to the difference between the maximum and minimum gray values in the waveform, that is, the maximum gray value is aπ / 2 + e, and the minimum gray value is -aπ / 2 + e 2 +e, and the minimum gray value is -aπ / 2 + e c is the offset of the independent variable x-axis direction, that is, the positioning center x-maxQ of the waveform; d is the offset of the function y-axis direction, d and b jointly act on the intersection of the function curve and the x-axis , that is, the center width D. Thus, the relationship between the fitting function parameters and the light spot characteristics of the linear array CMOS imaging is established, so the fitting parameters can be calculated by the least square fitting, and the light spot waveform center can be solved.
[0057] On the basis of the established edge model, the preprocessed discrete waveform data is subjected to least square fitting. As shown in Figure 7 and Figure 8 , the denoising processed light spot gray value distribution is G, and the sampling data points {(xi, Gi)} are obtained, wherein xi represents the pixel position, and Gi is the corresponding light spot gray value sampling value. The residual between the sampling value and the fitting value is r(p) = F(x, p) - G(x), and p is the set of arctangent edge model parameters {a, b, c, d, e}. The goal is to find a set of parameters, so that the sum of squares of residuals is the minimum, which is the least square problem.
[0058] The arctangent function edge model is a nonlinear model, and the least square method needs to be solved by an iterative optimization algorithm to gradually approach the optimal solution.
[0059] The iterative process in this paper adopts the Levenberg-Marquardt method. For each iteration k, the current residual vector
[0060] The Jacobian matrix is calculated, and the elements are:
[0061]
[0062] The calculation matrix and the calculation vector are constructed
[0063] H = J(p k ) T J(p k )
[0064] b = -J(p k )T J(p k )
[0065] Next, solve the linear equations:
[0066] (H+λ k I)Δp k = b
[0067] where I is the identity matrix, λ k is the current damping factor. The result updates the parameters p, if
[0068] |S(p k+1 )-S(p k )|<∈
[0069] then stop the iteration, ∈ is a very small but not zero value, the final parameter vector p k+1 is the approximate solution of the least square problem.
[0070] The convergence and efficiency of the iterative algorithm highly depend on the selection of the initial parameters, a good initial value can help the algorithm quickly converge to the global optimal solution. The established arctangent edge model not only provides a nonlinear fitting model, but also gives the calculation formula of the initial fitting parameters:
[0071]
[0072] maxG is the peak value of the waveform, x_maxG is the pixel index where the peak value is located, L G is the peak width.
[0073] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The specification and examples given are exemplary only and the true scope and spirit of the application is indicated by the claims which follow. It will be appreciated by those skilled in the art that changes could be made to the embodiments described above, without departing from the broad discipline or principles of the application. It is understood, therefore, that this application is not limited to the particular embodiments described herein, but it is intended to cover modifications within the spirit and scope of the present application, including customized and enhanced methods and apparatuses. It is therefore desired that the present application be construed as broadly as possible.
[0074] It is understood that the application is not limited to the exact construction and arrangement of parts described herein and illustrated in the drawings, which may be varied in specific ways without departing from the application. The scope of the present application is limited only by the claims appended hereto.
Claims
1. A method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS, characterized by: After the inverse tangent function is processed by axis-shift symmetry, various waveform features appearing in the measurement process of the laser triangulation displacement sensor are fitted and located according to the edge shape model after the inverse tangent function is processed by axis-shift symmetry. It includes three steps: waveform preprocessing, arc tangent function edge model establishment, and fitting positioning.
2. A method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS, characterized by: The waveform preprocessing step includes: ADC sampling and encoding the spot waveform of CMOS imaging and outputting it in digital image form, obtaining the light intensity ADC value corresponding to each pixel, extracting the envelope of the spot waveform, and performing bidirectional differential denoising.
3. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 2, wherein: The bidirectional differential denoising is to find the maximum grayscale value in a pixel area by performing differential comparison, and the width of the area is the number of comparison points.
4. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 3, characterized in that: Specifically, the bidirectional differential denoising method is as follows: if the linear array CMOS has a total of n pixels and the width is set to 2 pixels, then starting from the third pixel, it is compared with the two pixels before and after it, a total of four pixels. If all are greater than the four pixels, the amplitude of the pixel point and its pixel index are retained; if less than, they are discarded, and the next pixel point is compared four times until the comparison is completed at the n-2th pixel. All local maxima are returned to obtain the envelope of the original waveform.
5. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 1, wherein: The inverse tangent function edge model is established as: The elementary inverse tangent function is f(x) = arctan(x), and the inverse tangent function obtained by axis-shifting symmetry is: f(x)=a·arctan(b·(x-c) 2 +d)+e, Where a is the function amplitude gain; e is the range increment, which can make the range of the function fall in the non-negative region. Since the range of f(x)=arctan(x) is [-π / 2,π / 2], f(x)=a·arctan(b·(xc) 2 +d) is -aπ / 2. If the fitting function range is to fall in the non-negative region, e=π / 2a. a and e together determine the range of the function.
6. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 5, characterized in that: In the inverse tangent function, when x=0, c=0, f(0)=a·arctan(d)+e corresponds to the difference between the maximum and minimum grayscale values in the waveform, that is, c is the offset of the independent variable in the x-axis direction, that is, the positioning center x-maxQ of the waveform; d is the offset of the function in the y-axis direction, d and b act together on the intersection of the function curve and the x-axis That is the center width D.
7. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 6, characterized in that: The fitting is to perform least square fitting on the pre-processed discrete waveform data based on the established edge model.
8. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 7, characterized in that: The fitting positioning includes: the grayscale distribution of the light spot after denoising is G, the sampling data point {(xi, Gi)}, where xi represents the pixel position and Gi is the corresponding light spot grayscale sampling value; the residual between the sampling value and the fitting value is r(p) = F(x, p) - G(x), where p is the inverse tangent edge model parameter set {a, b, c, d, e}; the goal of the fitting positioning is to find a set of parameters so that the sum of the squares of the residuals Minimum.
9. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 8, characterized in that: In the fitting positioning, a set of parameters is found through iteration so that the sum of squares of the residuals Minimum.
10. The method for locating the center of a clipped spot under overexposure conditions based on a linear array CMOS according to claim 9, characterized in that: The iteration is specifically: For each iteration k, calculate the current residual vector Compute the Jacobian matrix, whose elements are: Constructing calculation matrices and calculation vectors H=J(p k ) T J(p k ) b=-J(p k ) T J(p k ) Next, solve the linear system of equations: (H+λ k I)Δp k =b where I is the identity matrix, λ k is the current damping factor; The calculation result can update the parameter p if |S(p k+1 )-S(p k )|<∈ Then the iteration stops, ∈ is a small value but not 0, and the final parameter vector p k+1 is the iteration result.