Real-time light spot image bottom noise correction method and device, equipment and storage medium
By calculating the deviation of pixel points in real time in the CCD camera and adapting to the correction mode, the noise floor correction is performed on the dynamic spot image, which solves the image blur and noise floor problems, and improves the quality of the spot image and the accuracy of analysis.
Patent Information
- Application Number
- CN202510236445.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-30
AI Technical Summary
When the prior art captures dynamic spot images in real time, the frame rate, exposure time of the CCD camera is not suitable for the spot movement speed, resulting in blurred image, and electronic noise and thermal noise introduce noise floor, reducing image quality and affecting spot feature analysis.
By reading the real-time spot image of the CCD, the deviation between the pixel value of each pixel point and the reference noise floor is calculated, and the strong correction mode or weak correction mode is adaptively matched to the real-time spot image.
Effectively remove noise floor interference, so that the spot image more accurately reflects the true spot information, and provides a more reliable data basis for subsequent analysis and processing.
Smart Images

Figure CN120070245A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of laser technology, and further to the field of optical image processing, and in particular to a real-time spot image background noise correction method, device, equipment and storage medium. Background Art
[0002] Dynamic beam quality assessment requires real-time capture of dynamic spot images, but in actual operation, capturing dynamic spot images usually forms a smear on the photosensitive element due to the incompatibility between the frame rate and exposure time of the CCD camera and the speed of the spot movement, making the spot image blurred. In addition, the electronic noise of the CCD camera device itself and the thermal noise of the sensor will inevitably introduce background noise, causing the grayscale value of the image to fluctuate, blurring the boundary of the spot, reducing the contrast and clarity of the spot image, and thus affecting the key parameters such as the spot position, shape, and intensity. The above problems seriously affect the quality of the spot image, and thus affect the accuracy of the subsequent spot feature analysis and processing results.
[0003] Although there are some correction methods for image background noise, they are often insufficient in terms of real-time performance and cannot meet the needs of fast processing of real-time spot images. At the same time, some correction methods have poor adaptability in complex environments and it is difficult to effectively remove diverse background noise interference, making the accurate acquisition and processing of real-time spot images an important issue that needs to be urgently solved in this field. Summary of the invention
[0004] In view of this, the present disclosure provides a real-time spot image noise correction method, device, equipment and storage medium.
[0005] According to a first aspect of the present disclosure, a real-time spot image background noise correction method is provided, the method comprising: Read the real-time spot image of CCD to obtain the pixel value Pr of each pixel; Calculate the deviation d between the pixel value Pr of each pixel and the corresponding reference noise floor μ; According to the deviation d, the correction mode is adaptively matched to perform background noise correction on the real-time spot image; wherein: the correction mode includes: a strong correction mode and a weak correction mode.
[0006] In some implementations of the first aspect, the reference noise floor is obtained by the following steps: Continuously collect the noise-free image of CCD when there is no spot signal; For each frame of the background noise image, traverse all pixels, record the pixel value of each pixel and calculate the statistical characteristics of the pixel values of all pixels; Assign different weights to the statistical features of the corresponding pixels of multiple frames of background noise images, perform weighted mean calculation, and obtain the reference background noise μ for each pixel; Among them, the statistical features include: the mean, median, standard deviation, skewness, and peak value of pixel values.
[0007] In some realizable ways of the first aspect, the method of adaptively matching the correction mode according to the deviation d and performing background noise correction on the real-time spot image includes: If , then it is determined that the pixel point is noise, and the strong correction mode is matched; If , then it is determined that the pixel point is the edge part of the spot, and the weak correction mode is matched; If , then it is determined that the pixel point is the spot part, and no correction mode matching is performed.
[0008] In some realizable ways of the first aspect: The strong correction mode includes: For pixel points, calculate the corresponding first correction value and second correction value, and perform weighted summation on the first correction value and the second correction value to obtain the correction parameter under the current strong correction mode, and use the correction parameter to perform this round of strong correction; The weak correction mode includes: For pixel points, calculate the corresponding first correction value and second correction value, and perform weighted summation on the first correction value and the second correction value to obtain the correction parameter under the current weak correction mode, and use the correction parameter to perform this round of weak correction.
[0009] In some realizable ways of the first aspect, the method of calculating the corresponding first correction value and second correction value for pixel points, performing weighted summation on the first correction value and the second correction value to obtain the correction parameter under the current strong correction mode, and using the correction parameter to perform this round of strong correction includes: For pixel points: Calculate the first correction value: P c1 = Pr - μ; Calculate the statistical feature μ n of its neighborhood. If , then calculate the second correction value: P c2 = Pr - ɑμ; where ɑ is the first influence factor and ɑ > 0; Perform weighted summation on the first correction value and the second correction value P = wP c1 - (1 - w)P c2 , to obtain the correction parameter under the current strong correction mode; where w is the weight coefficient; Judge the deviation d. If it is a positive value, subtract the corresponding strong correction parameter from the pixel value Pr of each pixel point in the real-time spot image. Otherwise, add the corresponding strong correction parameter to obtain the corrected pixel value, and complete the current round of strong correction.
[0010] In some realizable ways of the first aspect, for pixel points, calculate the corresponding first correction value and second correction value, and perform weighted summation on the first correction value and the second correction value to obtain the correction parameter in the current weak correction mode. Using the correction parameter to perform the current round of weak correction includes: For pixel points: Calculate the first correction value: P c1 = Pr - βμ; where β is an adjustment factor, 0 < β < 1, ; Calculate the statistical feature μ of its neighborhood n , if , then calculate the second correction value: P c2 = Pr - γμ; where γ is the second influence factor, 0 < γ < 1, ; Perform weighted summation on the first correction value and the second correction value P = wP c1 - (1 - w)P c2 , to obtain the correction parameter in the current weak correction mode; where w is the weight coefficient; Judge the deviation d. If it is a positive value, subtract the corresponding weak correction parameter from the pixel value Pr of each pixel point in the real-time spot image. Otherwise, add the corresponding weak correction parameter to obtain the corrected pixel value, and complete the current round of weak correction.
[0011] In some realizable ways of the first aspect, the method further includes: Continuously collect the historical background noise images of the CCD when there is no spot signal; Use the statistical features and weights of the corresponding pixel points in the continuous frame background noise images as samples, and use the reference background noise μ corresponding to each pixel point as the sample label to generate a training set and train an adaptive correction model; Use the adaptive correction model to read the real-time spot image of the CCD and perform background noise correction on the real-time spot image.
[0012] According to the second aspect of the present disclosure, there is provided a real-time spot image background noise correction device, the device includes: A first processing module, configured to read the real-time spot image of the CCD to obtain the pixel value Pr of each pixel point; A second processing module, configured to calculate the deviation d between the pixel value Pr of each pixel point and the corresponding reference background noise μ; A third processing module, configured to adaptively match a correction mode according to the deviation d and perform background noise correction on the real-time spot image; wherein: the correction mode includes: a strong correction mode and a weak correction mode.
[0013] According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method as described above.
[0014] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, and the computer instructions are used to cause the computer-readable storage medium to execute the method as described above.
[0015] In the present disclosure, noise pixel points are located according to the deviation between the pixel value and the background noise, and the correction mode is adaptively matched. Targeted correction is performed on pixel points affected to different degrees, effectively removing background noise interference, so that the spot image can more accurately reflect the true information of the spot, providing a more reliable data basis for subsequent analysis and processing based on the spot image.
[0016] It should be understood that the content described in the summary of the invention section is not intended to limit the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In combination with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. In the drawings, the same or similar reference numerals represent the same or similar elements, wherein: Figure 1 Shows a flowchart of a method for correcting background noise of a real-time spot image provided by an embodiment of the present disclosure; Figure 2 Shows a diagram of a device for correcting background noise of a real-time spot image according to an embodiment of the present disclosure; Figure 3 Shows an exemplary electronic device diagram capable of implementing the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some but not all of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0019] In addition, the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0020] In response to the problems mentioned in the background art, the present disclosure provides a real-time spot image background noise correction method, device, equipment, and storage medium.
[0021] Specifically, read the real-time spot image of the CCD to obtain the pixel value Pr of each pixel point; calculate the deviation d between the pixel value Pr of each pixel point and the corresponding reference background noise μ; adaptively match the correction mode according to the deviation d, and perform background noise correction on the real-time spot image; where: the correction mode includes: a strong correction mode, a weak correction mode.
[0022] In this way, background noise interference can be effectively removed, enabling the spot image to more accurately reflect the true information of the spot, and providing a more reliable data basis for subsequent analysis and processing based on the spot image.
[0023] The real-time spot image background noise correction method, device, equipment, and storage medium provided by the present disclosure will be described in more detail below with reference to the accompanying drawings and specific embodiments.
[0024] Figure 1 The flowchart of a real-time spot image background noise correction method provided by an embodiment of the present disclosure is shown; as Figure 1 shown, the real-time spot image background noise correction method 100 may include:
[0025] S110, read the real-time spot image of the CCD to obtain the pixel value Pr of each pixel point.
[0026] S120, calculate the deviation d between the pixel value Pr of each pixel point and the corresponding reference background noise μ.
[0027] Among them, the reference background noise is obtained through the following steps: Continuously collect the background noise images of the CCD when there is no spot signal. For each frame of the background noise image, traverse all pixel points, record the pixel values of each pixel point, and calculate the statistical features of the pixel values of all pixel points; the statistical features include: the mean, median, standard deviation, skewness, and peak value of the pixel values; assign different weights to the statistical features of the corresponding pixel points of multiple frames of background noise images, and perform weighted mean calculation to obtain the reference background noise μ of each pixel point; among them, the weighted mean calculation can be ordinary weighted mean calculation or exponential weighted mean calculation.
[0028] S130, adaptively match the correction mode according to the deviation d, and perform background noise correction on the real-time spot image.
[0029] Among them: the correction mode includes: strong correction mode, weak correction mode.
[0030] For the pixel value Pr of each pixel point in the real-time spot image, calculate its deviation d from the corresponding reference background noise μ; If , then it is determined that this pixel point is noise, and the strong correction mode is matched; if , then it is determined that this pixel point is the edge part of the spot, and the weak correction mode is matched; if , then it is determined that this pixel point is the spot part, and no correction mode matching is performed; k 1 <k 2 .
[0031] Among them, the strong correction mode includes: For pixel points, calculate the first correction value: P c1 = Pr - μ; at the same time, calculate the statistical feature μ n of its neighborhood. If , then calculate the second correction value: P c2 = Pr - ɑμ, where ɑ is the first influence factor and ɑ > 0; perform weighted summation on the first correction value and the second correction value P = wP c1 - (1 - w)P c2 , to obtain the correction parameter under the current strong correction mode; among them, w is the weight coefficient; Judge the deviation d. If it is positive, subtract the corresponding strong correction parameter from the pixel value Pr of each pixel point in the real-time spot image, otherwise add the corresponding strong correction parameter to obtain the corrected pixel value, and complete this round of strong correction.
[0032] Among them, the weak correction mode includes: For pixel points, calculate the first correction value: P c1 = Pr - βμ, where β is the adjustment factor, 0 < β < 1, ; Meanwhile, calculate the statistical feature μ of its neighborhood n If , then calculate the second correction value: P c2 = Pr - γμ, where γ is the second influence factor, 0 < γ < 1, ; Perform weighted summation on the first correction value and the second correction value P = wP c1 - (1 - w)P c2 , to obtain the correction parameter in the current weak correction mode; where w is the weight coefficient; Judge the deviation d. If it is positive, subtract the corresponding weak correction parameter from the pixel value Pr of each pixel point in the real-time spot image. Otherwise, add the corresponding weak correction parameter to obtain the corrected pixel value, and complete this round of weak correction.
[0033] Set k 3 < k 4 , so that the strong correction mode is more sensitive to neighborhood changes and more accurate in correction when processing pixel points with relatively small deviations; the weak correction mode has a higher tolerance for neighborhood differences when processing pixel points with large deviations, which helps to maintain the stability and naturalness of the image.
[0034] It should be noted that the above reference background noise μ is obtained by weighted calculation of the statistical features of the corresponding pixel points of multiple frames of background noise images. The deviation d is calculated by subtracting the corresponding reference background noise μ from the pixel value Pr of each pixel point in the real-time spot image. It is also possible to calculate the deviation d by subtracting the corresponding reference background noise μ from the statistical feature of each pixel point; compared with using statistical features to participate in the calculation, directly using pixel values for calculation can reduce the calculation amount. When processing a large amount of image data in real time, it can effectively improve the processing speed. At the same time, the pixel value is the most basic information unit. Directly using it for calculating the deviation does not require adjusting the statistical feature calculation method and parameters according to different image types or characteristics, and has stronger compatibility and versatility. Moreover, the deviation calculated by this method can also intuitively show the difference between this pixel point and the reference background noise. Therefore, it helps to speed up the correction mode matching speed.
[0035] According to the embodiments of the present disclosure, by comprehensively considering global and local information, through global adaptive matching correction, using the overall statistical feature of the reference background noise to preliminarily classify and correct pixel points, it is possible to identify edge pixel points that may contain spot information within a large range and perform weak correction, while performing strong correction on the noise-dominated regions; through local adaptive matching correction, using the statistical features of the pixel point neighborhood, further perform fusion correction, avoiding errors that may be brought by relying only on global features, and can also flexibly adjust the weight according to different situations, making the correction result more accurate and reliable, and being able to better balance the retention of spot information and the removal of noise.
[0036] In some embodiments, method 100 further includes: Continuously collect the historical background noise images of the CCD when there is no spot signal; Using the statistical features of the corresponding pixel points in the continuous-frame background noise images and the weights of the statistical features as samples, and using the reference background noise μ corresponding to each pixel point as the sample label, generate a training set to train an adaptive correction model; Use the adaptive correction model to read the real-time spot image of the CCD and perform background noise correction on the real-time spot image.
[0037] The adaptive correction model can be implemented by selecting a linear regression model, a multi-layer perceptron, a convolutional neural network, a recurrent neural network or its variants (LSTM, GRU), etc. The present disclosure does not make specific limitations here.
[0038] According to the embodiments of the present disclosure, by collecting a large number of historical background noise images, using the statistical features of the corresponding pixel points in the continuous-frame background noise images to construct a training set to train an adaptive correction model, effectively perform background noise correction on the real-time spot image, improve the adaptability and flexibility of the image processing system. Compared with the traditional method of calculating the reference background noise for correction only relying on fixed parameters or simple statistical methods, the adaptive correction model can more accurately identify the noise part in the real-time spot image and perform targeted correction according to the characteristics of different pixel points.
[0039] A specific embodiment is provided below to illustrate the above content in more detail.
[0040] First, continuously collect N frames of background noise images of the CCD when there is no spot signal. For each background noise image, traverse all pixel points, record the pixel value of each pixel point, and calculate the statistical features of the pixel values of all pixel points in the image, including mean, median, standard deviation, skewness, and kurtosis; among them, the median M(x, y) can be obtained by sorting.
[0041] For the pixel point at the position (x, y) in the i-th frame of background noise image, its pixel value is P i (x, y), the mean can be calculated through the mean calculation formula, and the mean calculation formula is: ; Among them, N is the number of frames of the collected background noise images; the standard deviation can be calculated through the standard deviation calculation formula, and the standard deviation calculation formula is: ; For the skewness S i (x, y), it can be obtained through the following skewness calculation formula: ; For the kurtosis K i (x, y), it can be obtained through the following skewness calculation formula: ; For each pixel point (x, y), the statistical features of the corresponding pixel points in multiple frames of background noise images are comprehensively calculated to obtain the reference background noise value of each pixel point: .
[0042] Exemplarily: Continuously collect N = 5 frames of background noise images of the CCD without spot signals. For the first frame of background noise image, taking the pixel points (10, 10), (10, 11), (11, 10), and (11, 11) as examples, assume their pixel values are: P 1 (10, 10) = 85, P 1 (10, 11) = 88, P 1 (11, 10) = 90, P 1 (11, 11) = 92; for the second frame of background noise image, assume its pixel values are: P 2 (10, 10) = 88, P 2 (10, 11) = 90, P 2 (11, 10) = 92, P 2 (11, 11) = 95; for the third frame of background noise image, assume its pixel values are: P 3 (10, 10) = 83, P 3 (10, 11) = 86, P 3 (11, 10) = 88, P 3 (11, 11) = 90; for the fourth frame of background noise image, assume its pixel values are: P 4 (10, 10) = 90, P 4 (10, 11) = 93, P 4 (11, 10) = 95, P 4 (11, 11) = 97; for the fifth frame of background noise image, assume its pixel values are: P 5 (10, 10) = 86, P 5 (10, 11) = 89, P 5 (11, 10) = 91, P 5 (11, 11) = 93; then: Pixel mean: ; Similarly, it can be obtained that: .
[0043] Furthermore, for the first frame of background noise image: Standard deviation: ; Similarly, it can be obtained that 。
[0044] Skewness calculation: ; Similarly, S 1 (10, 11) ≈ 0.18, S 1 (11, 10) ≈ 0.49, S 1 (11, 11) ≈ 0.18.
[0045] Kurtosis calculation: ; Similarly, K 1 (10, 11) ≈ -23.2, K 1 (11, 10) ≈ -23.2, K 1 (11, 11) ≈ -24.83.
[0046] Furthermore, for the second frame noise floor image: ; S 2 (10, 10) ≈ -0.003; S 2 (10, 11) ≈ 0.03; S 2 (11, 10) ≈ 0.03; S 2 (11, 11) ≈ 0.03; K 2 (10, 10) ≈ -0.0015; K 2 (10, 11) ≈ -0.0015; K 2 (11, 10) ≈ -0.0015; K 2 (11, 11) ≈ -0.0015.
[0047] For the third frame noise floor image, assuming its pixel values are respectively: ; S 3 (10, 10) ≈ 0.005; S 3 (10, 11) ≈ 0.005; S 3 (11, 10) ≈ 0.005; S 3 (11, 11) ≈ 0.005; K 3 (10, 10) ≈ 0.0018; K 3 (10, 11) ≈ 0.0018; K 3 (11, 10) ≈ 0.0018; K 3 (11, 11) ≈ 0.0018.
[0048] For the noise floor image of the 4th frame, assume its pixel values are as follows: ; S 4 S(10, 10) ≈ -0.003; S 4 S(10, 11) ≈ -0.003; S 4 S(11, 10) ≈ -0.003; S 4 S(11, 11) ≈ -0.003; K 4 K(10, 10) ≈ -0.0015; K 4 K(10, 11) ≈ -0.0015; K 4 K(11, 10) ≈ -0.0015; K 4 K(11, 11) ≈ -0.0015.
[0049] For the noise floor image of the 5th frame, assume its pixel values are as follows: ; S 5 S(10, 10) ≈ -0.003; S 5 S(10, 11) ≈ -0.003; S 5 S(11, 10) ≈ -0.003; S 5 S(11, 11) ≈ -0.003; K 5 K(10, 10) ≈ -0.0015; K 5 K(10, 11) ≈ -0.0015; K 5 K(11, 10) ≈ -0.0015; K 5 K(11, 11) ≈ -0.0015.
[0050] Furthermore, calculate the reference noise floor value, then we have: μ(10, 10) ≈ 34.46; μ(10, 11) ≈ 35.21; μ(11, 10) ≈ 36.02; μ(11, 11) ≈ 36.81; Read the real-time spot image of the CCD to obtain the pixel values: Pr(10, 10) = 85; Pr(10, 11) = 91; Pr(11, 10) = 95; Pr(11, 11) = 110.
[0051] Calculate the deviation: d(10, 10) = Pr(10, 10) - μ(10, 10) = 100 - 34.46 = 50.54; Similarly, we can get: d(10, 11) = 55.79; d(11, 10) = 58.98; d(11, 11) = 73.19.
[0052] Perform calibration in the matching calibration mode: Preset k 1 = 4, k 2 = 6, k 3 = 2, k 4 = 3.
[0053] Assume: .
[0054] It is known that , ; then there is: |d(10, 10)| = 50.54 < 96, |d(10, 11)| = 55.79 < 84, |d(11, 10)| = 58.98 < 60, |d(11, 11)| = 73.19 > 48; Therefore, it is determined that the pixel point (11, 11) is the spot part and no calibration mode matching is performed.
[0055] Furthermore, for (10, 10): It is known that , because |d(10, 10)| = 50.54 < 64, so it is determined that this point is noise and the strong calibration mode is matched.
[0056] Assume the weight w = 0.5, the neighborhood statistical feature value μ n = 40, the neighborhood standard deviation is , ɑ = 0.3, then there is: The first calibration value P c1 = 85 - 34.46 = 50.54.
[0057] |μ n - μ(10, 10)| = |40 - 34.46| = 5.54, ; 5.54 < 36; The second calibration value P c2 = 85 - 0.3 × 34.46 = 74.66.
[0058] The calibration parameter P = wP c1 - (1 - w)P c2 = 12.06.
[0059] Furthermore, for (10, 11): It is known that , because |d(10, 11)| = 55.79 < 56, so it is determined that this point is noise and the strong calibration mode is matched.
[0060] Assume the weight w = 0.5, the neighborhood statistical eigenvalue μ n = 42, and the neighborhood standard deviation is , α = 0.3, then there is: The first correction value P c1 = 55.79.
[0061] |μ n - μ(10, 11)| = 6.79,; 6.79 < 32; The second correction value P c2 = 80.44.
[0062] The correction parameter P = 12.325.
[0063] Furthermore, for (11, 10): It is known that , because |d(11, 10)| = 58.98 > 40, so it is determined that this point is the edge part of the light spot and matches the weak correction mode; Assume the weight w = 0.5, the neighborhood statistical eigenvalue μ n = 45, and the neighborhood standard deviation is , then there is: ; The first correction value P c1 = 89.78.
[0064] |μ n - μ(11, 10)| = 8.89, , 8.89 < 27; ; The second correction value P c2 = 75.9094.
[0065] The correction parameter P ≈ 6.9.
[0066] In summary, the pixel points (10, 10) and (10, 11) match the strong correction mode, and the correction parameters for this round are 12.06 and 12.325 respectively; the pixel point (11, 10) matches the weak correction mode, and the correction parameter for this round is 6.9; the pixel point (11, 11) is determined to be the light spot part and does not perform correction mode matching.
[0067] Furthermore, if the deviation d in this round is positive, that is, the pixel value is higher than the reference noise floor value and other standard values, then the correction parameter for this round needs to be subtracted for correction; if the deviation d in this round is negative, that is, the pixel value is lower than the reference noise floor value and other standard values, then the correction parameter for this round needs to be added for correction.
[0068] In this embodiment, the pixel values of the corrected non-zero pixel points are as follows: Pr(10, 10) = 85 - 12.06 = 72.94; Pr(10, 11) = 78.675; Pr(11, 10) = 88.1.
[0069] According to the embodiments of the present disclosure, the following technical effects are achieved: Through the above-mentioned fusion correction scheme, the global and local noise characteristics can be comprehensively considered during the background noise correction process, the diverse noise information can be removed quickly and accurately, and at the same time, the true feature information of the light spot can be retained to the greatest extent, providing more reliable information for the analysis and optimization of the optical system.
[0070] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present disclosure is not limited by the described action sequence, because according to the present disclosure, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present disclosure.
[0071] The above is the introduction of the method embodiments. The following further illustrates the solution of the present disclosure through device embodiments.
[0072] Figure 2 The figure shows a real-time light spot image background noise correction device according to an embodiment of the present disclosure; as Figure 2 shown, the real-time light spot image background noise correction device 200 may include: A first processing module, configured to read the real-time light spot image of the CCD to obtain the pixel value Pr of each pixel point; A second processing module, configured to calculate the deviation d between the pixel value Pr of each pixel point and the corresponding reference background noise μ; A third processing module, configured to adaptively match a correction mode according to the deviation d to perform background noise correction on the real-time light spot image; wherein: the correction mode includes: a strong correction mode and a weak correction mode.
[0073] It can be understood that Figure 2 each module in the real-time light spot image background noise correction device 200 shown has the function of implementing each step in the real-time light spot image background noise correction method 100 provided by the embodiments of the present disclosure and can achieve its corresponding technical effects. The specific working process of the described module can refer to the corresponding process in the foregoing method embodiments. For the convenience and conciseness of description, it will not be repeated here.
[0074] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0075] Figure 3 FIG. shows an exemplary electronic device diagram capable of implementing embodiments of the present disclosure.
[0076] The electronic device 300 is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0077] The electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in the ROM 302 or a computer program loaded from the storage unit 308 into the RAM 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. The I / O interface 305 is also connected to the bus 304.
[0078] Multiple components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a magnetic disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0079] The computing unit 301 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 executes the various methods and processes described above, such as method 100. For example, in some embodiments, method 100 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of method 100 described above may be executed. Alternatively, in other embodiments, the computing unit 301 may be configured to execute method 100 in any other suitable manner (e.g., by means of firmware).
[0080] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-a-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0081] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0082] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0083] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).
[0084] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or in a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of a communication network include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0085] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0086] It should be understood that the various forms of processes shown above can be used, with steps reordered, added or deleted. For example, the steps described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution disclosed in the present disclosure can be achieved, and no limitation is imposed herein.
[0087] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub - combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A real-time spot image noise correction method, characterized in that: The method comprises: Read the real-time spot image of CCD to obtain the pixel value Pr of each pixel; Calculate the deviation d between the pixel value Pr of each pixel and the corresponding reference noise floor μ; According to the deviation d, the correction mode is adaptively matched to perform background noise correction on the real-time spot image; wherein: the correction mode includes: a strong correction mode and a weak correction mode.
2. The method according to claim 1, characterized in that The reference noise floor is obtained by the following steps: Continuously collect the noise-free image of CCD when there is no spot signal; For each frame of the background noise image, traverse all pixels, record the pixel value of each pixel and calculate the statistical characteristics of the pixel values of all pixels; Assign different weights to the statistical features of the corresponding pixels of multiple frames of background noise images, perform weighted mean calculation, and obtain the reference background noise μ for each pixel; The statistical features include: mean, median, standard deviation, skewness and peak value of pixel values.
3. The method according to claim 1, characterized in that: The method of adaptively matching the correction mode according to the deviation d and performing background noise correction on the real-time spot image includes: like , then the pixel is considered as noise and matches the strong correction mode; like , then the pixel is considered to be the edge of the light spot and matches the weak correction mode; like , the pixel is considered as the light spot part and no correction pattern matching is performed.
4. The method according to claim 3, characterized in that The strong correction mode includes: for , calculate the corresponding first correction value and second correction value, perform weighted summation on the first correction value and the second correction value, obtain correction parameters in the current strong correction mode, and use the correction parameters to perform this round of strong correction; The weak correction mode includes: for The pixel point is calculated, the corresponding first correction value and the second correction value are calculated, and the first correction value and the second correction value are weightedly summed to obtain the correction parameters in the current weak correction mode, and the correction parameters are used to perform this round of weak correction.
5. The method according to claim 4, characterized in that Said for , calculate the corresponding first correction value and second correction value, and perform weighted summation on the first correction value and the second correction value to obtain correction parameters in the current strong correction mode, and use the correction parameters to perform this round of strong correction, including: for Pixels: Calculate the first correction value: P c1 =Pr-μ; Calculate the statistical characteristics μ of its neighborhood n ,like , then calculate the second correction value: P c2 =Pr-ɑμ; where ɑ is the first impact factor and ɑ>0; Perform a weighted sum of the first correction value and the second correction value P=wP c1 -(1-w)P c2 , get the correction parameters in the current strong correction mode; where w is the weight coefficient; The deviation d is judged. If it is a positive value, the pixel value Pr of each pixel point in the real-time spot image is subtracted from the corresponding strong correction parameter. Otherwise, the corresponding strong correction parameter is added to obtain the corrected pixel value to complete this round of strong correction.
6. The method according to claim 4, characterized in that Said for , calculating the corresponding first correction value and second correction value, and performing weighted summation on the first correction value and the second correction value to obtain correction parameters in the current weak correction mode, and using the correction parameters to perform this round of weak correction, including: for Pixels: Calculate the first correction value: P c1 =Pr-βμ; where β is the adjustment factor, 0<β<1, ; Calculate the statistical characteristics μ of its neighborhood n ,like , then calculate the second correction value: P c2 =Pr-γμ; where γ is the second influencing factor, 0<γ<1, ; Perform a weighted sum of the first correction value and the second correction value P=wP c1 -(1-w)P c2 , get the correction parameters in the current weak correction mode; where w is the weight coefficient; The deviation d is judged. If it is a positive value, the pixel value Pr of each pixel point in the real-time spot image is subtracted from the corresponding weak correction parameter. Otherwise, the corresponding weak correction parameter is added to obtain the corrected pixel value to complete this round of weak correction.
7. The method according to claim 1, characterized in that The method further comprises: Continuously collect the historical background noise image of CCD when there is no spot signal; The statistical features and weights of the corresponding pixels in the continuous frame background noise images are used as samples, and the reference background noise μ corresponding to each pixel is used as the sample label to generate a training set and train the adaptive correction model. The adaptive correction model is used to read the real-time spot image of the CCD, and the background noise correction is performed on the real-time spot image.
8. A real-time spot image noise correction device, characterized in that: The device comprises: The first processing module is used to read the real-time spot image of the CCD to obtain the pixel value Pr of each pixel; The second processing module is used to calculate the deviation d between the pixel value Pr of each pixel point and the corresponding reference background noise μ; The third processing module is used to adaptively match the correction mode according to the deviation d to perform background noise correction on the real-time spot image; wherein: the correction mode includes: a strong correction mode and a weak correction mode.
9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer-readable storage medium to execute the method according to any one of claims 1-7.