A method for locating the center of a light spot against imaging noise interference
By setting a grayscale threshold and using iterative calculation, the problem of noise interference in spot center positioning was solved, especially the vertical coordinate deviation caused by CCD crosstalk, thus achieving high-precision spot center positioning.
Patent Information
- Application Number
- CN202311100395.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-08-30
AI Technical Summary
In the process of locating the center of the light spot, existing technologies suffer from imaging noise interference, especially large deviations in the vertical coordinate caused by CCD crosstalk, resulting in low accuracy in locating the center of the light spot.
By setting a grayscale threshold to correct the grayscale value of the spot image, the initial center and radius are calculated using the grayscale centroid method, and the image grayscale value is iteratively calculated based on the spot radius and correction coefficient until the iteration termination condition is met, thus obtaining the accurate center coordinates of the spot.
It achieves high-precision positioning of the spot center under noise interference, reduces longitudinal deviation, and improves the accuracy of spot center positioning.
Smart Images

Figure CN117132644B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of laser technology and relates to a method for locating the center of a laser spot to resist imaging noise interference. Background Technology
[0002] Laser beam center detection and localization are crucial aspects of laser beam characteristics. Common spot detection methods include mechanical measurements such as the sleeve method and knife-edge method, as well as direct or indirect imaging detection methods. Imaging detection methods for spot center are relatively simple and easily achieve sub-pixel level high-precision spot center detection and localization. However, during the acquisition of spot images through imaging detection, interference such as detector noise and background radiation is unavoidable, leading to significant errors in spot center localization. Therefore, it is necessary to suppress noise interference and employ appropriate methods to locate the spot center even under noise-affected conditions.
[0003] Salt and pepper noise is a typical and common type of random noise. This noise's grayscale values fall at the high and low ends of the image's grayscale range, exhibiting a distinct contrast between bright and dark areas. It significantly damages the image's feature information, such as... Figure 1A As shown.
[0004] Crosstalk noise appears as bright lines perpendicular to the light spot position when a CCD is subjected to high-intensity irradiation. Once crosstalk occurs, it has the same shape, and the gray values of adjacent rows are the same, but adjacent columns are different, such as... Figure 1B As shown.
[0005] The article "A High-Precision Method for Detecting the Center of Laser Image Spots" published by Zhang Shaotang et al. in Laser Journal 2018(8):p153-156 preprocesses the laser image spot to achieve effective differentiation between the target spot and the background. It uses a polynomial interpolation algorithm to detect the center of the laser image spot, which has high requirements for the shape and energy distribution of the spot.
[0006] The article “Research on High-Precision Positioning Algorithm for Laser Spot Center” published by Chen He et al. in the Journal of Beijing Institute of Technology, 2016, 36(2):p181-185, uses Gaussian fitting and rectangular region to optimize the gray-scale centroid positioning algorithm. The vector window detects noise, and the window size adapts to the noise intensity. It is less affected by the environment but has a large computational load.
[0007] In the article "A Laser Spot Center Localization Algorithm Based on Brightness Threshold" published in the Journal of Testing Technology, 2017, 31(3):p223-226, Guo Yujing et al. proposed a laser spot center localization algorithm based on brightness threshold, which has low computational cost but low accuracy. Summary of the Invention
[0008] (I) Purpose of the Invention
[0009] The purpose of this invention is to provide a simple, easy-to-implement, and highly accurate method for locating the center of a light spot that is affected by imaging noise, especially the large deviation of the vertical coordinate of the light spot center caused by CCD crosstalk.
[0010] (II) Technical Solution
[0011] To address the aforementioned technical problems, this invention provides a method for locating the center of a light spot to resist imaging noise interference, comprising the following steps:
[0012] Step 1: Correct the grayscale value of the spot image according to the grayscale threshold to suppress some of the salt-and-pepper noise.
[0013] If the image resolution is m×n and the grayscale value of each pixel is G(x,y), then the formula for calculating the image grayscale correction value G0'(x,y) is:
[0014]
[0015] Where T is the image grayscale threshold. Choosing a threshold T that is too low or too high will affect the accuracy of spot center localization, especially hindering the detection of spot radius. A threshold that is too low will not suppress noise, while a threshold that is too high will eliminate the edge data of the spot. In this invention, the image grayscale threshold T is calculated using the following formula:
[0016]
[0017] Among them, G max (x,y) represents the maximum gray value in the spot image, and e is the natural constant.
[0018] Step 2: Calculate the initial center and radius of the light spot using the gray-scale centroid method.
[0019] The initial center of the light spot (x0, y0) and the initial radius of the light spot (r) x0 ,r y0 The formula for calculating ) is:
[0020]
[0021]
[0022] The third step addresses the characteristic of CCD imaging crosstalk occurring in the direction perpendicular to the spot position, using the initial spot center x0 and the lateral radius r... x0 Using the initial value as the initial value, iterative calculation is performed to obtain the center coordinates (x, y) of the light spot in each iteration. i ,y i ), especially the ordinate y i It keeps getting closer to the actual value.
[0023] The center of the light spot in the i-th iteration (x) i ,y i ) and spot radius (r xi ,r yi The calculation formula is:
[0024]
[0025]
[0026] Among them, G i '(x,y) represents the image grayscale correction value at the i-th iteration, and the spot center (x,y) calculated in the previous iteration. i-1 ,y i-1 ) and the lateral radius r of the light spot x(i-1) Using x as the reference, traverse all pixels, and when the pixel distance (x) i-1 ,y i-1 Greater than 1 to 3 times r x(i-1) Its grayscale value is set to 0, and the calculation formula is:
[0027]
[0028] Where ω is the correction coefficient, ω∈[1,3], and r is the distance from any pixel (x,y) to the center of the light spot obtained in the previous iteration (x,y). i-1 ,y i-1 The distance to ) is calculated using the following formula:
[0029]
[0030] Fourth step, as the iteration proceeds, the ordinate y of the light spot center... i The trend of approximating the true value becomes increasingly slower, as the difference in the ordinate of the center of the spot between two consecutive measurements (y... i -y i-1 ) and (y i-1 -y i-2 When the ratio of (x) to the current spot center is less than the termination threshold, the iterative calculation terminates. i ,y i The final coordinates of the light spot center are ( ). The formula for calculating the termination condition is:
[0031]
[0032] Where σ is the termination threshold, σ∈[0.001,0.01], which can be selected according to the actual situation.
[0033] (III) Beneficial Effects
[0034] The spot center localization method for resisting imaging noise interference provided by the above technical solution has the following beneficial effects:
[0035] (1) The method of the present invention addresses the noise characteristics of salt-and-pepper noise and crosstalk in spot images, especially the characteristic that crosstalk remains unchanged between adjacent rows. It calculates the initial spot center (x0, y0) and spot radius (r) through initial grayscale threshold correction. x0 ,r y0 Based on this, with the initial light spot center x0 and the horizontal radius r x0 Using the initial value as the basis, iterative calculations are performed to make the spot center location result as close as possible to the actual spot center, which can solve the problem of large spot center location deviation in the existing gray-scale centroid method under image noise interference.
[0036] (2) The initial gray threshold T can be flexibly adjusted according to the spot intensity and noise distribution in the actual obtained spot image.
[0037] (3) During iterative calculation, the selection of image grayscale correction coefficient ω and iteration termination threshold σ will affect the calculation accuracy and calculation time. They can be adjusted according to actual needs to balance accuracy and time requirements. Attached Figure Description
[0038] Figure 1A This is a schematic diagram of salt-and-pepper noise in a light spot image.
[0039] Figure 1B This is a schematic diagram of crosstalk noise in a light spot image.
[0040] Figure 2 This is a schematic diagram of the calculation process for the center of the light spot to resist imaging noise interference in this invention.
[0041] Figure 3 This is the original light spot image.
[0042] Figure 4 It is the intensity curve of the initial spot center and the spot center in the X and Y directions.
[0043] Figure 5 It is the final calculated intensity curve of the light spot center in the X and Y directions. Detailed Implementation
[0044] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0045] The present invention provides a spot center localization method against imaging noise interference. By setting an appropriate grayscale threshold, some low-intensity salt-and-pepper noise interference is suppressed. The initial coordinates and radius of the spot center are calculated using the grayscale centroid method. Based on the characteristic that the grayscale values of adjacent rows of crosstalk lines in the spot image remain unchanged, the grayscale values of the corrected image are iteratively calculated using the initial coordinates of the spot center as the starting point, based on the spot radius and correction coefficient. This allows the detected value of the spot center coordinates with a large initial longitudinal deviation to continuously approach the true value until the iteration termination condition is met, thus obtaining more accurate spot center coordinates. This achieves simple, easy-to-implement, and highly accurate spot center localization against imaging noise interference.
[0046] In this embodiment, the original light spot image is as follows: Figure 3 As shown, the image resolution is 1292×964, and the actual center coordinates of the light spot, as measured by standard equipment, are (644, 509). The initial grayscale threshold T, the iteratively calculated image grayscale correction coefficient ω, and the iteration termination threshold σ are set as follows:
[0047] (1) The grayscale threshold is set to T = 30;
[0048] (2) The correction factor is taken as ω = 1.5;
[0049] (3) The iteration termination threshold is set to σ = 0.001.
[0050] Reference Figure 2 The process shown in this embodiment, the positioning method, is as follows:
[0051] The gray values of the spot image are corrected based on the gray threshold T, and the corrected gray values G0'(x,y) of each pixel can be calculated.
[0052]
[0053] The initial spot center (x0, y0) and radius (r) were calculated using the gray-scale centroid method. x0 ,r y0 ).
[0054]
[0055]
[0056] The intensity curves of the initial spot center and the spot center in the X and Y directions are as follows: Figure 4 As shown.
[0057] Iterative calculation, iteratively calculating the center of the light spot (x) i ,y i ):
[0058] Calculate any pixel (x, y) back to the previous iteration's calculation of the spot center (x). i-1 ,yi-1 The distance r of ).
[0059]
[0060] Traversing all pixels of the light spot image will satisfy the condition r > 1.5r. x(i-1) The pixel grayscale value is assigned to 0.
[0061]
[0062] Calculate the center of the light spot (x) i ,y i ).
[0063]
[0064] Determine whether the termination condition is met.
[0065]
[0066] In this embodiment, the termination condition is met after 7 iterations, and the iteration calculation is terminated. At this time, the coordinates of the light spot center are (645, 511), and the intensity curves of the light spot center in the X and Y directions are as follows. Figure 5 As shown.
[0067] The spot center localization result described in this invention is compared with the actual spot center and with the spot center localization result obtained by the gray-scale centroid method as follows:
[0068] The true coordinates of the spot center are (644, 509). Using the grayscale centroid method, the center coordinates of the spot are located as (646, 486), with a deviation of (2, 23). It can be seen that the vertical deviation is relatively large, at 23 pixels. Further, using the method described in this invention, the center coordinates of the spot are located as (645, 511), with a deviation of (1, 2).
[0069] In summary, the spot center localization method provided by this invention, which is designed to address the characteristics of salt-and-pepper noise and crosstalk noise in spot images, especially the characteristic that the gray values of adjacent rows in crosstalk remain unchanged, uses initial gray threshold correction and iterative calculation of image gray correction based on spot radius and correction coefficient to make the spot center localization result as close as possible to the actual spot center. This solves the problem of large longitudinal deviation in spot center localization under image noise interference, especially crosstalk noise interference, in existing gray centroid methods.
[0070] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for locating the center of a light spot against imaging noise interference, characterized in that, The method comprises the following steps: Firstly, the gray value of the light spot image is corrected according to the gray threshold value, and part of the salt and pepper noise is suppressed; Secondly, the initial center and radius of the light spot are calculated by using the gray centroid method; Thirdly, the initial value of the horizontal coordinate of the light spot initial center and the horizontal radius are taken as the initial value, and the iterative calculation is carried out, so that the light spot center coordinate approaches the true value; Fourthly, the termination condition is met, the calculation is terminated, and the light spot center coordinate is obtained. In the third step, the spot center coordinates (x i ,y i ) and the spot radius (r xi , r yi ) of the i-th iteration are calculated according to the following formulas: G i (x, y) is the image gray correction value at the i-th iteration; In the third step, the center of the spot (x i-1 , y i-1 ) and the transverse radius r x(i-1) of the spot calculated in the previous iteration are used as the reference, and all the pixels are traversed. When the distance (x i-1 , y i-1 ) of a pixel is greater than 1-3 times r x(i-1) , the gray value of the pixel is assigned as 0, and the calculation formula is as follows: Where ω is the correction coefficient, ω∈[1, 3], and r is the distance from any pixel (x, y) to the center of the light spot calculated in the previous iteration (x, y). i-1 , y i-1 The distance.
2. The spot center localization method against imaging noise interference as described in claim 1, characterized in that, In the first step, the image resolution is m*n, and the gray value of each pixel is G(x, y). The calculation formula of the image gray correction value G0'(x, y) is: Wherein T is the image gray threshold value.
3. The method of claim 2, wherein the method further comprises: determining a center of the light spot based on the first and second sets of data. 3 In the first step, the calculation formula of T is: where G max (x, y) is the maximum gray value in the light spot image, e is a natural constant.
4. The method of claim 3, wherein the anti-imaging noise interference is removed by a method comprising: In the second step, the initial spot center (x0, y0) and the spot radius (r x0 , y0 ) are calculated according to the following formulas, respectively: 。 5. The method of claim 4, wherein the method further comprises: determining a center of the light spot based on the first and second sets of data. 5 In the third step, the initial spot center horizontal coordinate x0, the horizontal radius r x0 , and the initial spot center vertical coordinate y0are used as initial values, and the spot center coordinates (x i ,y i ) are iteratively calculated so that the spot center coordinates (x i ,y ) obtained in each iteration approach the actual values.
6. The method of claim 5, wherein the anti-imaging noise interference is removed by a method comprising: In the third step, the calculation formula of r is: 。 7. The method of claim 6, wherein the method further comprises: determining a center of the light spot based on the first and second sets of data. 7 In the fourth step, the iteration is terminated when the ratio of the difference between the current and previous longitudinal coordinate of the spot center (y i - y i-1 ) and (y i-1 - y i-2 ) is less than a termination threshold, and the current spot center (x i , y i ) is the final spot center coordinate. In the fourth step, the iteration is terminated when the ratio of the difference between the current and previous longitudinal coordinate of the spot center (y i - y i-1 ) and (y i-1 - y i-2 ) is less than a termination threshold, and the current spot center (x i , y i ) is the final spot center coordinate.
8. The method of claim 7, wherein the method further comprises: determining a center of the light spot based on the first and second sets of data. 8 In the fourth step, the calculation formula of the termination condition is: Wherein, σ is the termination threshold value, and σ∈[0.001, 0.01].
Citation Information
Patent Citations
Virtual reality space locating feature point selection method
CN106599930A
Method for positioning sub-pixel centers of light spots based on pixel movement and cutting
US20220272293A1