Real-time beam quality assessment method, device and equipment for dynamic beams

By using adaptive matching algorithm for noise floor correction and pixel file processing in CCD spot image processing, the beam M2 factor is calculated, which solves the problem that traditional methods cannot capture dynamic beam changes in real time, and accurately evaluates the quality of dynamic beams.

CN119714812BActive Publication Date: 2025-06-06SHANDONG PROMOTE MECHANICAL & ELECTRICAL TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510228171.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-06
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

Traditional beam M2 factor calculation methods cannot accurately capture dynamic beam changes in real time, especially in atmospheric turbulence and ultrafast laser applications, resulting in inaccurate beam quality assessment.

Method used

By reading the real-time spot image of the CCD, the noise floor correction is performed using an adaptive matching algorithm, the pixel files are screened and processed, the center of mass coordinates, variance and diameter of the spot are calculated, and the beam M2 factor is then calculated.

Benefits of technology

Real-time accurate evaluation of dynamic beam quality is achieved, the CCD camera smooth interference is overcome, and the accuracy and efficiency of beam quality evaluation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119714812B_ABST
    Figure CN119714812B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a real-time beam quality evaluation method, apparatus, and device for dynamic beams, which are applied to the field of optical image processing technology. The method includes: performing background noise correction on a pixel file using an adaptive matching algorithm; screening pixels smaller than a threshold in the corrected pixel file and calculating the sum of non-zero pixels; generating an index row vector and an index column vector based on the indices of the non-zero pixel matrix; calculating the centroid coordinates in the y direction and the centroid coordinates in the x direction based on the index row vector and the index column vector; calculating the variance in the x direction and the variance in the y direction according to the centroid coordinates in the y direction and the centroid coordinates in the x direction, and calculating the spot diameter based on the variance in the x direction and the variance in the y direction; calculating the beam waist radius and the beam divergence angle based on the spot diameter; calculating the beam M<supgt;2< / supgt; factor according to the beam waist radius and the beam divergence angle; and evaluating the beam quality at the current moment according to the beam M<supgt;2< / supgt> factor. In this way, the evaluation of dynamic beam quality can be made more convenient and efficient.
Need to check novelty before this filing date? Find Prior Art

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 beam quality assessment method, device and equipment for dynamic beams. Background Art

[0002] Beam M 2 The factor can reflect the beam quality. The traditional beam M 2 The factor calculation method is mainly based on static images. Usually, the knife-edge method, slit method, spot analyzer and other equipment are used to obtain the static spot image of the beam at a specific position, and then the M is calculated by analyzing the size, intensity distribution and other information of the spot. 2 factor.

[0003] However, in actual application scenarios, light beams are often in a dynamically changing state. For example, when a laser is transmitted in atmospheric turbulence, the light beam will be affected by the fluctuations in the atmospheric refractive index, causing the spot shape, size, and intensity distribution to change rapidly over time. In some ultrafast laser applications, the temporal characteristics of the laser pulse also make the spatial distribution of the light beam dynamic. Traditional static calculation methods cannot accurately capture these dynamic changes and cannot reflect the actual quality of the light beam in real time.

[0004] With the continuous development of laser technology, in adaptive optical systems, it is necessary to monitor and evaluate the beam quality in real time so as to adjust the optical elements in time to compensate for the dynamic distortion of the beam. In laser striking systems, it is necessary to quickly and accurately obtain the quality changes of the beam during transmission in order to optimize the aiming and tracking strategies. Therefore, the demand for dynamic beam quality evaluation is becoming increasingly urgent.

[0005] Dynamic beam quality assessment requires real-time capture of dynamic images. In actual operation, due to the incompatibility between the frame rate and exposure time of the CCD camera and the speed of the light spot movement, a smear is usually formed on the photosensitive element, blurring the shape and size of the light spot and interfering with the M 2 Calculation of factors.

[0006] In summary, traditional calculation methods can no longer meet actual needs. Currently, there is an urgent need for a method that can effectively cope with dynamically changing light beams, overcome the interference of CCD camera smear, and achieve real-time and accurate evaluation of dynamic light beam quality. Summary of the invention

[0007] In view of this, the present disclosure provides a real-time beam quality assessment method, device and equipment for a dynamic beam.

[0008] According to a first aspect of the present disclosure, a real-time beam quality assessment method for a dynamic beam is provided, the method comprising:

[0009] Read the real-time spot image of CCD, convert the real-time spot image into a pixel file, and obtain the pixel value of each pixel point; use the adaptive matching algorithm to perform background noise correction on the pixel file according to the pixel value of each pixel point in the real-time spot image and the reference background noise;

[0010] Filter pixels smaller than a threshold value in the corrected pixel file and set them to zero pixels, and calculate the sum of non-zero pixels; generate an index row vector and an index column vector based on the index of the non-zero pixel matrix;

[0011] Sum each row of the non-zero pixel matrix to get a column vector, multiply the column vector by the index row vector, and divide the product by the sum of the non-zero pixels to get the y coordinate value, i.e., the coordinate of the centroid in the y direction;

[0012] Sum each column of the non-zero pixel matrix to get a row vector, multiply the row vector by the index column vector, and divide the product by the sum of the non-zero pixels to get the x-coordinate value, i.e., the coordinate of the centroid in the x-direction;

[0013] According to the x-coordinate value and the y-coordinate value, the variance in the x-direction and the y-direction is calculated, and the spot diameter is calculated according to the variance in the x-direction and the y-direction; the beam waist radius and the beam divergence angle are calculated based on the spot diameter; according to the beam waist radius and the beam divergence angle, the beam M is calculated. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

[0014] In some implementations of the first aspect, the reference noise floor is obtained by the following steps:

[0015] Continuously collect the noise floor image of CCD when there is no spot signal. For each frame of noise floor image, traverse all pixels, record the pixel value of each pixel and calculate the statistical characteristics of the pixel values ​​of all pixels.

[0016] 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;

[0017] Among them, the statistical features include: mean, median, standard deviation, skewness and peak value of pixel values.

[0018] In some implementations of the first aspect, an adaptive matching algorithm is used to perform background noise correction on a pixel file according to a pixel value of each pixel point in a real-time spot image and a reference background noise of the pixel point at the position, including:

[0019] For each pixel value Pr in the real-time spot image, calculate its deviation d from the corresponding reference background noise μ;

[0020] like , then the pixel is considered as noise and matches the strong correction mode;

[0021] like , then the pixel is considered to be the edge of the light spot and matches the weak correction mode;

[0022] like , the pixel is considered as the light spot part and no correction pattern matching is performed.

[0023] In some possible implementations of the first aspect:

[0024] Strong correction modes include:

[0025] 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;

[0026] Weak correction modes include:

[0027] 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.

[0028] In some implementations of the first aspect, 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:

[0029] for Pixel point, calculate the first correction value: P c1 =Pr-μ;

[0030] for Pixel point, 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;

[0031] 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;

[0032] 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.

[0033] In some implementations of the first aspect, 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:

[0034] for Pixel point, calculate the first correction value: P c1 =Pr-βμ; where β is the adjustment factor, 0<β<1, ;

[0035] for Pixel point, calculate the statistical characteristics μ of its neighborhood n ,like , then calculate the second correction value: P c2 =Pr-γμ; where

[0036] γ is the second impact factor, 0<γ<1, ;

[0037] 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;

[0038] 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.

[0039] In some implementations of the first aspect, generating an index row vector and an index column vector based on an index of a non-zero pixel matrix includes:

[0040] Based on the row index m and column index n of the non-zero pixel matrix, an index row vector R = [0, 1, ..., m-1] and an index column vector C = [0, 1, ..., n-1] are generated.

[0041] In some implementations of the first aspect, each row of the non-zero pixel matrix is ​​summed to obtain a column vector, the column vector is multiplied by the index row vector, and the product sum is divided by the sum of the non-zero pixels to obtain a y coordinate value, that is, a centroid coordinate in the y direction, including:

[0042] Sum each row of the non-zero pixel matrix to get a column vector V y , the column vector V y Multiply the corresponding elements of the index row vector R and add all the products, that is:

[0043] ;

[0044] Divide the sum of all products by the sum of non-zero pixels S to get the y coordinate value, that is, the coordinate of the centroid in the y direction: y=Sum y / S.

[0045] In some implementations of the first aspect, each column of the non-zero pixel matrix is ​​summed to obtain a row vector, the row vector is multiplied by the index column vector, and the product sum is divided by the sum of the non-zero pixels to obtain an x-coordinate value, that is, the x-direction centroid coordinate, including:

[0046] Sum each column of the non-zero pixel matrix to get a row vector V x , the column vector V x Multiply the corresponding elements of the index row vector C and add all the products, that is:

[0047] ;

[0048] Divide the sum of all products by the sum of non-zero pixels S to get the x coordinate value, that is, the x-direction centroid coordinate: x=Sum x / S.

[0049] In some implementations of the first aspect, the variance in the x-direction and the y-direction is calculated according to the x-coordinate value and the y-coordinate value, and the spot diameter is calculated according to the variance in the x-direction and the y-direction; the beam waist radius and the beam divergence angle are calculated based on the spot diameter; and the beam M is calculated according to the beam waist radius and the beam divergence angle. 2 Factors include:

[0050] Calculate the sum of the squares of the distances from each non-zero pixel to the x-coordinate value, and divide the sum of squares by the sum of non-zero pixels S to get the variance in the x direction. ;

[0051] Calculate the sum of the squares of the distances from each non-zero pixel to the y coordinate value, and divide the sum of squares by the sum of non-zero pixels S to get the variance in the y direction. ;

[0052] According to the variance in the x direction and the variance in the y direction, the equivalent diameters in the x and y directions are calculated, and the average value is taken to obtain the spot diameter D;

[0053] Multiply the spot diameter D and the CCD angular resolution to get the beam divergence angle θ;

[0054] According to the spot diameter D, the beam waist radius is obtained , the beam M2 factor is obtained according to the beam waist radius and beam divergence angle ;in, is the product of the beam waist width of the fundamental mode Gaussian beam and the far-field beam divergence angle, ; is the wavelength of the light beam.

[0055] In some implementations of the first aspect, the method further includes:

[0056] According to the variance in the x-direction and the y-direction, the spot circularity is calculated based on the least squares method; the spot circularity calculation formula is as follows:

[0057] ; is the sum of the squares of the distances from all non-zero pixels to the fitted circle obtained by the least squares method; k is the weight coefficient; and,

[0058] Using the variance in the x-direction and the y-direction, the beam divergence angle is corrected and the beam M2 factor is adjusted; and,

[0059] The ideal spot centroid position is obtained, and the transmitting and receiving coaxiality is calculated based on the difference between the ideal centroid position and the real-time centroid position.

[0060] According to a second aspect of the present disclosure, a real-time beam quality assessment device for a dynamic beam is provided, the device comprising:

[0061] The first processing module is used to read the real-time spot image of the CCD, convert the real-time spot image into a pixel file, and obtain the pixel value of each pixel point; an adaptive matching algorithm is used to perform background noise correction on the pixel file according to the pixel value of each pixel point in the real-time spot image and the reference background noise;

[0062] The second processing module is used to screen out pixels less than a threshold value in the corrected pixel file and set them to zero pixels, calculate the sum of non-zero pixels; and generate an index row vector and an index column vector based on the index of the non-zero pixel matrix;

[0063] The third processing module is used to sum each row of the non-zero pixel matrix to obtain a column vector, multiply the column vector by the index row vector, and divide the product sum by the sum of the non-zero pixels to obtain a y coordinate value, that is, a centroid coordinate in the y direction;

[0064] The third processing module is further used to sum each column of the non-zero pixel matrix to obtain a row vector, multiply the row vector by the index column vector, and divide the product sum by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the coordinate of the centroid in the x-direction;

[0065] The fourth processing module is used to calculate the variance in the x-direction and the y-direction according to the x-coordinate value and the y-coordinate value, and calculate the spot diameter according to the variance in the x-direction and the y-direction; calculate the beam waist radius and the beam divergence angle based on the spot diameter; and calculate the beam M according to the beam waist radius and the beam divergence angle. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

[0066] 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 connected to the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.

[0067] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause the computer-readable storage medium to execute the method described above.

[0068] In the present disclosure, the real-time spot image is adaptively corrected for background noise and screened to overcome the CCD camera smear problem, avoid the blurring effect of smear on the spot shape, size and other features, and ensure the accuracy of the image used to calculate M. 2 The accuracy of the spot characteristic information of the factor is improved, thereby improving the accuracy of real-time beam quality evaluation, saving labor costs, improving work efficiency, and making dynamic beam quality evaluation more convenient and efficient.

[0069] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended 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

[0070] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:

[0071] Figure 1 A flow chart of a real-time beam quality assessment method for a dynamic beam provided by an embodiment of the present disclosure is shown;

[0072] Figure 2 A diagram showing a real-time beam quality assessment device for a dynamic beam according to an embodiment of the present disclosure is shown;

[0073] Figure 3 Diagrams of exemplary electronic devices are shown in which embodiments of the present disclosure can be implemented. DETAILED DESCRIPTION

[0074] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0075] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0076] In response to the problems mentioned in the background technology, the present disclosure provides a real-time beam quality assessment method, device and equipment for dynamic beams.

[0077] Specifically, the real-time spot image of the CCD is read, and the real-time spot image is converted into a pixel file to obtain the pixel value of each pixel point; an adaptive matching algorithm is used to perform background noise correction on the pixel file according to the pixel value of each pixel point in the real-time spot image and the reference background noise; pixels smaller than the threshold in the corrected pixel file are screened and set to zero pixels, and the sum of non-zero pixels is calculated; an index row vector and an index column vector are generated based on the index of the non-zero pixel matrix; each row of the non-zero pixel matrix is ​​summed to obtain a column vector, and the column vector is compared with the index of the non-zero pixel matrix. The index row vectors are multiplied, and the sum of the products is divided by the sum of the non-zero pixels to obtain the y-coordinate value, i.e., the centroid coordinate in the y direction; each column of the non-zero pixel matrix is ​​summed to obtain the row vector, and the row vector is multiplied by the index column vector, and the sum of the products is divided by the sum of the non-zero pixels to obtain the x-coordinate value, i.e., the centroid coordinate in the x direction; according to the x-coordinate value and the y-coordinate value, the variance in the x-direction and the y-direction is calculated, and the spot diameter is calculated according to the variance in the x-direction and the y-direction; the beam waist radius and the beam divergence angle are calculated based on the spot diameter; according to the beam waist radius and the beam divergence angle, the beam M is calculated. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

[0078] In this way, the problem of CCD camera smear can be overcome, and the blurring effect of smear on the shape and size of the light spot can be avoided, ensuring that the image used to calculate M 2 The accuracy of the spot characteristic information of the factor is improved, thereby improving the accuracy of real-time beam quality evaluation and making dynamic beam quality evaluation more convenient and efficient.

[0079] The real-time beam quality assessment method, device and equipment for dynamic beams provided by the present disclosure are described in more detail below in conjunction with the accompanying drawings and specific embodiments.

[0080] Figure 1 A flow chart of a real-time beam quality assessment method for a dynamic beam provided by an embodiment of the present disclosure is shown; Figure 1 As shown, the real-time beam quality assessment method 100 for a dynamic beam may include:

[0081] S110, reading the real-time spot image of the CCD, converting the real-time spot image into a pixel file, and obtaining the pixel value of each pixel point; using an adaptive matching algorithm, according to the pixel value of each pixel point in the real-time spot image and the reference background noise, performing background noise correction on the pixel file.

[0082] The reference noise floor is obtained by the following steps:

[0083] Continuously collect the noise floor image of CCD when there is no spot signal. For each frame of noise floor image, traverse all pixels, record the pixel value of each pixel and calculate the statistical characteristics of all pixel values; the statistical characteristics include: mean, median, standard deviation, skewness and peak value of pixel values;

[0084] Different weights are assigned to the statistical features of the corresponding pixels of multiple frames of background noise images, and weighted mean calculation is performed to obtain the reference background noise μ of each pixel; the weighted mean calculation can be an exponentially weighted average or other calculation methods that can achieve the same function.

[0085] According to the embodiments of the present disclosure, by assigning different weights to the statistical features of corresponding pixel points of multiple frames of background noise images and performing weighted mean calculation, a more effective reference background noise value can be obtained to effectively suppress high-frequency noise and alleviate problems such as image ghosting.

[0086] Furthermore, an adaptive matching algorithm is used to perform background noise correction on the pixel file according to the pixel value of each pixel in the real-time spot image and the reference background noise of the pixel at that position, including:

[0087] For each pixel value Pr in the real-time spot image, calculate its deviation d from the corresponding reference background noise μ;

[0088] like , then the pixel is considered as noise and matches the strong correction mode;

[0089] like , then the pixel is considered to be the edge of the light spot and matches the weak correction mode;

[0090] like , the pixel is considered as the light spot part and no correction pattern matching is performed.

[0091] Further:

[0092] Strong correction modes include:

[0093] for Pixels:

[0094] Calculate the first correction value: P c1 =Pr-μ; at the same time:

[0095] 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;

[0096] 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;

[0097] 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.

[0098] Weak correction modes include:

[0099] for Pixels:

[0100] Calculate the first correction value: P c1 =Pr-βμ; where β is the adjustment factor, 0<β<1, ;at the same time:

[0101] Calculate the statistical characteristics μ of its neighborhood n ,like , then calculate the second correction value: P c2 =Pr-γμ; where

[0102] γ is the second impact factor, 0<γ<1, ;

[0103] 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;

[0104] 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.

[0105] By setting k3<k4, the strong correction mode is more sensitive to neighborhood changes and more accurate in processing pixels with relatively small deviations; the weak correction mode is more tolerant to neighborhood differences when processing pixels with large deviations, which helps to maintain the stability and naturalness of the image.

[0106] It should be noted that the reference background noise μ is obtained by weighted calculation of the statistical features of the corresponding pixels of the multi-frame background noise images. The deviation d is calculated by subtracting the corresponding reference background noise μ from the pixel value Pr of each pixel in the real-time spot image. The deviation d can also be calculated by subtracting the corresponding reference background noise μ from the statistical features of each pixel. Compared with using statistical features to participate in the calculation, directly using pixel values ​​for calculation can reduce the amount of calculation. 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. It does not need to adjust the statistical feature calculation method and parameters for different image types or characteristics when directly used to calculate the deviation. It has stronger compatibility and versatility. The deviation calculated by this method can also intuitively show the difference between the pixel and the reference background noise, so it helps to speed up the correction pattern matching speed.

[0107] According to the embodiments of the present disclosure, global and local information are integrated, and global adaptive matching correction is performed to preliminarily classify and correct pixel points using the overall statistical characteristics of the reference background noise. It is possible to identify edge pixel points that may contain light spot information in a large range and perform weak correction, while performing strong correction on noise-dominated areas. Local adaptive matching correction is performed using the statistical characteristics of the pixel neighborhood to further perform fusion correction, thereby avoiding errors that may be caused by relying solely on global features. The weights can also be flexibly adjusted according to different situations, making the correction results more accurate and reliable, and being able to better balance the retention of light spot information and the removal of noise.

[0108] S120, filtering pixels smaller than a threshold in the corrected pixel file, setting them to zero pixels, and calculating the sum of non-zero pixels; generating an index row vector and an index column vector based on the index of the non-zero pixel matrix.

[0109] Specifically, based on the row index m and column index n of the non-zero pixel matrix, an index row vector R=[0, 1, ..., m-1] and an index column vector C=[0, 1, ..., n-1] are generated.

[0110] S130, sum each row of the non-zero pixel matrix to obtain a column vector, multiply the column vector by the index row vector, and divide the product sum by the sum of the non-zero pixels to obtain the y coordinate value, that is, the centroid coordinate in the y direction.

[0111] Specifically, sum each row of the non-zero pixel matrix to obtain a column vector V y , the column vector V y Multiply the corresponding elements of the index row vector R and add all the products, that is:

[0112] ;

[0113] Divide the sum of all products by the sum of non-zero pixels S to get the y coordinate value, that is, the coordinate of the centroid in the y direction: y=Sum y / S.

[0114] S140, sum each column of the non-zero pixel matrix to obtain a row vector, multiply the row vector by the index column vector, and divide the product sum by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the x-direction centroid coordinate.

[0115] Specifically, sum each column of the non-zero pixel matrix to obtain a row vector V x , the column vector V x Multiply the corresponding elements of the index row vector C and add all the products, that is:

[0116] ;

[0117] Use the sum of all products divided by the sum of non-zero pixels S to get the x coordinate value, that is, the x-direction centroid coordinate: x=Sum x / S.

[0118] S150, calculating the variance in the x-direction and the y-direction according to the x-coordinate value and the y-coordinate value, and calculating the spot diameter according to the variance in the x-direction and the y-direction; calculating the beam waist radius and the beam divergence angle based on the spot diameter; and calculating the beam M according to the beam waist radius and the beam divergence angle. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

[0119] Specifically:

[0120] Calculate the sum of the squares of the distances from each non-zero pixel to the x-coordinate value, and divide the sum of squares by the sum of non-zero pixels S to get the variance in the x direction. ;

[0121] Calculate the sum of the squares of the distances from each non-zero pixel to the y coordinate value, and divide the sum of squares by the sum of non-zero pixels S to get the variance in the y direction. ;

[0122] According to the variance in the x direction and the variance in the y direction, the equivalent diameters in the x and y directions are calculated, and the average value is taken to obtain the spot diameter D. Of course, the spot radius can also be fitted based on the least squares method, and the spot diameter D can be calculated based on the radius;

[0123] Multiply the spot diameter D and the CCD angular resolution to get the beam divergence angle θ;

[0124] According to the spot diameter D, the beam waist radius is obtained , according to the beam waist radius and beam divergence angle, we can get the beam M 2 factor ;in, is the product of the beam waist width of the fundamental mode Gaussian beam and the far-field beam divergence angle, ; is the wavelength of the light beam.

[0125] In some embodiments, the method 100 further includes:

[0126] Using the variances in the x and y directions calculated above, the beam divergence angle is corrected and the beam M 2 Factors are adjusted; among them:

[0127] Correction for beam divergence includes:

[0128] The beam divergence angle is originally calculated by the spot diameter D and the CCD angular resolution. Considering that the variance reflects the discrete degree of the spot in the x and y directions, the beam divergence angle can be corrected using the variance to more accurately reflect the actual divergence of the spot.

[0129] Corrected beam divergence angle θ n It can be defined as:

[0130] ;

[0131] and is the variance of the ideal spot in the x and y directions.

[0132] For beam M 2 Factors to adjust include:

[0133] Beam M 2 The factor reflects the quality of the beam and is related to the size and divergence of the spot. The variance can be used to 2 The factor is adjusted to make it better reflect the actual characteristics of the light spot.

[0134] Modified M 2 The factor can be defined as:

[0135] ;

[0136] Among them, β is the weight coefficient.

[0137] In some embodiments, the method 100 further includes:

[0138] According to the variance in the x-direction and the y-direction, the spot circularity is calculated based on the least squares method; the spot circularity calculation formula is as follows:

[0139] ;

[0140] in, It is the sum of the squares of the distances from all non-zero pixels to the fitting circle obtained by the least squares method; k is the weight coefficient.

[0141] In some embodiments, the method 100 further includes:

[0142] The ideal spot centroid position is obtained, and the transmitting and receiving coaxiality is calculated based on the difference between the ideal centroid position and the real-time centroid position.

[0143] Specifically:

[0144] The theoretical position of the centroid of the light spot on the imaging plane of the CCD camera under the ideal coaxial state of transmission and reception is determined through the design parameters of the system, the optical path layout and the theoretical analysis of the optical system.

[0145] The actual spot image is collected by a CCD camera, and the real-time spot centroid position is calculated according to the above calculation method. The difference between the ideal centroid position and the real-time centroid position, that is, the distance difference, is calculated to measure the coaxiality deviation of transmission and reception.

[0146] Assume that the offset of the center of mass of the light spot on the CCD plane is , , the total offset distance can be calculated .

[0147] Assuming that the distance from the CCD camera to the light spot is L, the angle between the transmitting optical axis and the receiving optical axis can be further calculated: The angle θ directly reflects the coaxiality of the transmitter and receiver.

[0148] According to the embodiments of the present disclosure, the variance reflects the degree of discreteness of the spot pixels in the x and y directions. Including it in the calculation makes the roundness index not only consider the distance from the pixel to the fitting circle, but also take into account the uniformity of the distribution of the spot in different directions. By introducing the variance to calculate the spot roundness and diameter, the variance is used to correct the beam divergence angle and the beam M. 2The factor is adjusted, which can more comprehensively and accurately reflect the actual characteristics of the light spot compared to the traditional method that only relies on the least squares method; based on the accurate light spot characteristic information, a more accurate beam M can be further obtained. 2 The factor, as a key parameter for measuring beam quality, can help to more accurately evaluate beam performance and provide more reliable information for the analysis and optimization of optical systems.

[0149] A specific embodiment is provided below to illustrate the above content in more detail.

[0150] S110, reading the real-time spot image of the CCD, converting the real-time spot image into a pixel file, and performing background noise correction on the pixel file by adaptively matching the reference background noise.

[0151] First, N frames of CCD background noise images are continuously collected when there is no spot signal. For each background noise image, all pixels are traversed, the pixel value of each pixel is recorded, and the statistical characteristics of the pixel values ​​of all pixels in the image are calculated, including the mean, median, standard deviation, skewness and kurtosis; among them, the median M(x, y) can be obtained by sorting.

[0152] For the pixel point at position (x, y) in the i-th frame of the background noise image, its pixel value is P i (x, y), the mean can be calculated by the mean calculation formula, which is:

[0153] , where N is the number of frames of the acquired background noise image; the standard deviation can be calculated by the standard deviation calculation formula, which is:

[0154] .

[0155] For the skewness S i (x, y), can be obtained by the following skewness calculation formula:

[0156] .

[0157] For the kurtosis K i (x, y), can be obtained by the following skewness calculation formula:

[0158] .

[0159] For each pixel (x, y), the statistical features of the corresponding pixel of multiple frames of background noise images are comprehensively calculated to obtain the reference background noise value of each pixel:

[0160] .

[0161] For example:

[0162] Continuously collect N=5 frames of CCD noise-free images when there is no spot signal. For the first frame of noise-free image, take the pixels (10, 10), (10, 11), (11, 10), (11, 11) as an example, assuming that 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 the background noise image, assume that 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 the background noise image, assume that 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 4th frame of the background noise image, assume that 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 the background noise image, assume that 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:

[0163] Pixel mean:

[0164] ; Similarly, we can get:

[0165] ; ; .

[0166] Furthermore, for the first frame of the background noise image:

[0167] Standard Deviation:

[0168] ;

[0169] Similarly, , , .

[0170] Skewness calculation:

[0171] ;

[0172] Similarly, S 1 (10, 11)≈0.18, S 1 (11, 10)≈0.49, S 1 (11, 11)≈0.18.

[0173] Kurtosis calculation:

[0174] ;

[0175] Similarly, K 1 (10, 11)≈-23.2, K 1 (11, 10)≈-23.2, K 1 (11, 11)≈-24.83.

[0176] Furthermore, for the second frame of the background noise image:

[0177] , , , ;

[0178] S 2 (10, 10)≈-0.003; S 2 (10, 11)≈0.03; S 2 (11, 10)≈0.03; S 2 (11, 11) ≈ 0.03;

[0179] K 2 (10, 10)≈-0.0015; K 2 (10, 11) ≈ -0.0015; K 2 (11, 10)≈-0.0015; K 2 (11, 11)≈-0.0015.

[0180] For the third frame of the background noise image, assume that its pixel values ​​are:

[0181] , , , ;

[0182] S 3 (10, 10)≈0.005; S 3 (10, 11)≈0.005; S 3(11, 10)≈0.005; S 3 (11, 11) ≈ 0.005;

[0183] K 3 (10, 10)≈0.0018; K 3 (10, 11)≈0.0018; K 3 (11, 10)≈0.0018; K 3 (11, 11)≈0.0018.

[0184] For the 4th frame of the background noise image, assume that its pixel values ​​are:

[0185] , , , ;

[0186] S 4 (10, 10)≈-0.003; S 4 (10, 11)≈-0.003; S 4 (11, 10)≈-0.003; S 4 (11, 11) ≈ -0.003;

[0187] K 4 (10, 10)≈-0.0015; K 4 (10, 11) ≈ -0.0015; K 4 (11, 10)≈-0.0015; K 4 (11, 11)≈-0.0015.

[0188] For the fifth frame of the background noise image, assume that its pixel values ​​are:

[0189] , , , ;

[0190] S 5 (10, 10)≈-0.003; S 5 (10, 11)≈-0.003; S 5 (11, 10)≈-0.003; S 5 (11, 11) ≈ -0.003;

[0191] K 5 (10, 10)≈-0.0015; K 5 (10, 11) ≈ -0.0015; K 5 (11, 10)≈-0.0015; K 5(11, 11)≈-0.0015.

[0192] Furthermore, the reference noise floor value is calculated as follows:

[0193] μ(10,10)≈34.46; μ(10,11)≈35.21; μ(11,10)≈36.02; μ(11,11)≈36.81;

[0194] Read the CCD real-time spot image and get the pixel value:

[0195] Pr(10,10)=85; Pr(10,11)=91; Pr(11,10)=95; Pr(11,11)=110.

[0196] Calculate the deviation:

[0197] d(10,10)=Pr(10,10)-μ(10,10)=100-34.46=50.54; Similarly, we can get:

[0198] d(10,11)=55.79; d(11,10)=58.98; d(11,11)=73.19.

[0199] Match the calibration mode for calibration:

[0200] Preset k1=4, k2=6, k3=2, k4=3.

[0201] For each pixel , can be obtained by calculating the average of the sum of squares of the mean differences between each pixel value and the mean of all pixel values ​​in the neighborhood, and taking the square root of the average value. To facilitate understanding of the above scheme, it is assumed that the following is obtained by calculation:

[0202] , , , .

[0203] Known , , , ; then:

[0204] |d(10,10)|=50.54<96, |d(10,11)|=55.79<84, |d(11,10)|=58.98<60, |d(11,11)|=73.19>48;

[0205] Therefore, the pixel point (11, 11) is identified as the light spot part, and no correction pattern matching is performed.

[0206] Furthermore, for (10, 10):

[0207] It is known that, since |d(10, 10)|=50.54<64, this point is considered to be noise, matching the strong correction mode.

[0208] Assume weight w=0.5, neighborhood statistical eigenvalue μ n =40, the neighborhood standard deviation is , ɑ=0.3, then:

[0209] The first correction value P c1 =85-34.46=50.54.

[0210] |μ n -μ(10,10)|=|40-34.46|=5.54, ;5.54<36;

[0211] The second correction value P c2 =85-0.3×34.46=74.66.

[0212] Correction parameter P = wP c1 -(1-w)P c2 =12.06.

[0213] Furthermore, for (10, 11):

[0214] It is known that, since |d(10, 11)|=55.79<56, this point is considered to be noise, matching the strong correction mode.

[0215] Assume that the weight w=0.5, the neighborhood statistical eigenvalue μn=42, and the neighborhood standard deviation is , ɑ=0.3, then:

[0216] The first correction value P c1 =55.79.

[0217] |μ n -μ(10,11)|=6.79, ; 6.79<32;

[0218] The second correction value P c2 =80.44.

[0219] Correction parameter P=12.325.

[0220] Furthermore, for (11, 10):

[0221] Known , because |d(11,10)|=58.98>40, the point is considered to be the edge of the light spot, matching the weak correction mode;

[0222] Assume weight w=0.5, neighborhood statistical eigenvalue μ n =45, the neighborhood standard deviation is , then:

[0223] ;

[0224] The first correction value P c1 =89.78.

[0225] |μ n -μ(11,10)|=8.89, , 8.89<30; ;

[0226] The second correction value P c2 =75.9094.

[0227] Correction parameter P≈6.9.

[0228] In summary, the pixels (10, 10) and (10, 11) match the strong correction mode, and the correction parameters of this round are 12.06 and 12.325 respectively; the pixel (11, 10) matches the weak correction mode, and the correction parameter of this round is 6.9; the pixel (11, 11) is identified as the light spot part, and no correction mode matching is performed.

[0229] Furthermore, if the deviation d of this round is positive, that is, the pixel value is higher than the standard value such as the reference background noise value, it is necessary to subtract the correction parameters of this round for correction; if the deviation d of this round is negative, that is, the pixel value is lower than the standard value such as the reference background noise value, it is necessary to add the correction parameters of this round for correction.

[0230] In this embodiment, the pixel values ​​of the non-zero pixels after correction are as follows:

[0231] Pr(10,10)=85-12.06=72.94; Pr(10,11)=78.675; Pr(11,10)=88.1.

[0232] S120, filtering pixels smaller than a threshold in the corrected pixel file, setting them to zero pixels, and calculating the sum of non-zero pixels; generating an index row vector and an index column vector based on the index of the non-zero pixel matrix.

[0233] Assume that the corrected pixel file is a 100×100 pixel image P, and a threshold T=50 is preset. The corrected pixel file is traversed, and pixel values ​​less than the threshold 50 are set to 0 to obtain a new pixel matrix P'.

[0234] Traverse the new pixel matrix P' to obtain the row index range m=10 (from the 1st row to the 10th row) and the column index range n=15 (from the 1st column to the 15th column) of P', count all non-zero pixel values ​​and sum them up, and get the total number of non-zero pixels S=300.

[0235] Based on the row index m, generate the index row vector R = [0, 1, 2, ..., 9]; based on the column index n, generate the index column vector C = [0, 1, 2, ..., 14].

[0236] S130, sum each row of the non-zero pixel matrix to obtain a column vector, multiply the column vector by the index row vector, and divide the product sum by the sum of the non-zero pixels to obtain the y coordinate value, that is, the centroid coordinate in the y direction.

[0237] Sum each row of the non-zero pixel matrix P' to get a column vector:

[0238] ;

[0239] The column vector V y Multiply the corresponding elements of the index row vector R and add all the products to get Sum y =60×0+150×1+…+50×9=1800;

[0240] Then the coordinate of the center of mass in the y direction is: y=1800 / 300=6.

[0241] S140, sum each column of the non-zero pixel matrix to obtain a row vector, multiply the row vector by the index column vector, and divide the product sum by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the x-direction centroid coordinate.

[0242] Sum each column of the non-zero pixel matrix P' to get the row vector

[0243] V x =[70 150 80 … 50];

[0244] The row vector V x Multiply the corresponding elements of the index column vector C and add all the products to get Sum x =2100;

[0245] Then the coordinate of the center of mass in the x direction is: y=2100 / 300=7.

[0246] S150, calculating the variance in the x-direction and the y-direction according to the x-coordinate value and the y-coordinate value, and calculating the spot diameter according to the variance in the x-direction and the y-direction; calculating the beam waist radius and the beam divergence angle based on the spot diameter; and calculating the beam M according to the beam waist radius and the beam divergence angle. 2 Factor; according to beam M 2The factor evaluates the beam quality at the current moment.

[0247] Calculate the sum of the squares of the distances from each non-zero pixel (i, j) to the x-coordinate value, and divide the sum of the squares by the sum of the non-zero pixels S to obtain the variance in the x-direction; illustratively:

[0248] ;

[0249] Calculate the sum of the squares of the distances from each non-zero pixel (i, j) to the y coordinate value, and divide the sum of the squares by the sum of the non-zero pixels S to obtain the variance in the y direction; illustratively:

[0250] ;

[0251] Assumptions , k=0.1, and substitute S=300:

[0252] , we can get the spot circularity C≈7.65, which means that the spot shape is quite different from a circle and the spot is irregular; generally, the closer the value is to 0, the closer the spot is to an ideal circle.

[0253] Calculate the equivalent diameters in the x and y directions respectively, and we can get , , taking the average value, we get the spot diameter D=28.12+24.2 / 2=26.16.

[0254] Then the waist radius .

[0255] Assuming that the CCD angular resolution is ɑ=0.01 radians, the beam divergence angle θ=26.16×0.01≈0.2 radians can be obtained.

[0256] Assuming that the wavelength of the light beam λ=632.8×10-9 is known, then the light beam M 2 The factors are:

[0257] ;

[0258] Assuming that the ideal transmitting and receiving are coaxial, the theoretical position of the centroid of the light spot on the imaging plane of the CCD camera is (38, 37).

[0259] In this embodiment, the real-time spot centroid position is (7, 6), and the offset of the spot centroid on the CCD plane is , ;Total offset distance .

[0260] Assuming that the distance from the CCD camera to the light spot is L = 100 meters, the angle between the transmitting optical axis and the receiving optical axis can be further calculated: , that is, θ≈23.55°, which means that the coaxiality of transmission and reception is poor and there is a large degree of deviation.

[0261] Assuming the variance of the ideal spot in the x and y directions is 10, , the beam divergence angle θ = 0.2 radians, then the corrected beam divergence angle is ; then:

[0262] ;

[0263] Then there are adjusted:

[0264] .

[0265] Generally speaking, M 2 The closer the factor is to 1, the better the beam quality. In this embodiment, M 2 If the factor is much larger than 1, it means that the beam quality is poor, and there are optical problems such as large aberration or wavefront distortion, polarization disorder, etc. 2 Factors are used to adjust related optical equipment in combination with the light spot roundness and transmitting and receiving coaxiality parameters.

[0266] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0267] Through the fusion correction scheme, the global and local noise characteristics are comprehensively considered in the background noise correction process, the noise is removed more accurately, the smear effect is smoothed, and the real characteristic information of the spot is retained. Based on the real and accurate characteristic information of the spot, a more accurate beam M is further obtained. 2 Factor, as a key parameter to measure beam quality, M 2 Improved factor accuracy helps to more accurately evaluate beam performance and provide more reliable information for the analysis and optimization of optical systems.

[0268] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0269] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.

[0270] Figure 2 FIG. 4 shows a diagram of a real-time beam quality assessment device for a dynamic beam according to an embodiment of the present disclosure; Figure 2As shown, the real-time beam quality assessment device 200 for a dynamic beam may include:

[0271] The first processing module 210 is used to read the real-time spot image of the CCD, convert the real-time spot image into a pixel file, and adaptively match the reference background noise to perform background noise correction on the pixel file;

[0272] The second processing module 220 is used to filter out pixels less than a threshold value in the corrected pixel file and set them to zero pixels, calculate the sum of non-zero pixels; and generate an index row vector and an index column vector based on the index of the non-zero pixel matrix;

[0273] The third processing module 230 is used to sum each row of the non-zero pixel matrix to obtain a column vector, multiply the column vector by the index row vector, and divide the product sum by the sum of the non-zero pixels to obtain a y coordinate value, i.e., the centroid coordinate in the y direction;

[0274] The third processing module 230 is further used to sum each column of the non-zero pixel matrix to obtain a row vector, multiply the row vector by the index column vector, and divide the product sum by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the x-direction centroid coordinate;

[0275] The fourth processing module 240 is used to calculate the spot diameter according to the variance in the x-direction and the y-direction; calculate the beam waist radius and the beam divergence angle based on the spot diameter; and calculate the beam M according to the beam waist radius and the beam divergence angle. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

[0276] Understandably, Figure 2 Each module in the real-time beam quality assessment device 200 for dynamic beams shown has the function of implementing each step in the real-time beam quality assessment method 100 for dynamic beams provided in the embodiment of the present disclosure, and can achieve its corresponding technical effect. The specific working process of the described modules can refer to the corresponding process in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.

[0277] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0278] Figure 3 Diagrams of exemplary electronic devices are shown in which embodiments of the present disclosure can be implemented.

[0279] 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 processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0280] The electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a ROM 302 or a computer program loaded from a storage unit 308 into a 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 via a bus 304. An I / O interface 305 is also connected to the bus 304.

[0281] A number of 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 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.

[0282] The computing unit 301 may be a variety of general and / or special 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on 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 the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).

[0283] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations 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 purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0284] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0285] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0286] To provide 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 trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 input, voice input, or tactile input).

[0287] The systems and techniques described herein may 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 with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0288] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0289] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0290] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A real-time beam quality assessment method for dynamic beams, characterized in that: The method comprises: Read the real-time spot image of the CCD, convert the real-time spot image into a pixel file, and obtain the pixel value of each pixel point; use an adaptive matching algorithm to perform background noise correction on the pixel file according to the pixel value of each pixel point in the real-time spot image and the reference background noise; including: For each pixel value Pr in the real-time spot image, calculate its deviation d from the corresponding reference background noise μ; if , then the pixel is considered as noise and matches the strong correction mode; if , then the pixel is considered to be the edge of the light spot and matches the weak correction mode; if , then the pixel is considered as the light spot part and no correction pattern matching is performed; Filter pixels smaller than a threshold value in the corrected pixel file and set them to zero pixels, and calculate the sum of non-zero pixels; generate an index row vector and an index column vector based on the index of the non-zero pixel matrix; Sum each row of the non-zero pixel matrix to obtain a column vector, multiply the column vector by the index row vector, and divide the product sum by the sum of the non-zero pixels to obtain a y coordinate value, i.e., the centroid coordinate in the y direction; Sum each column of the non-zero pixel matrix to obtain a row vector, multiply the row vector by the index column vector, and divide the product sum by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the coordinate of the centroid in the x-direction; According to the x-coordinate value and the y-coordinate value, the variance in the x-direction and the y-direction is calculated, and the spot diameter is calculated according to the variance in the x-direction and the y-direction; the beam waist radius and the beam divergence angle are calculated based on the spot diameter; and the beam M is calculated according to the beam waist radius and the beam divergence angle. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

2. The method according to claim 1, characterized in that The reference noise floor is obtained by the following steps: Continuously collect the noise floor image of CCD when there is no spot signal. For each frame of noise floor 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 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.

4. The method according to claim 3, 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 Pixel point, calculate the first correction value: P c1 =Pr-μ; for Pixel point, 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.

5. The method according to claim 3, 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 Pixel point, calculate the first correction value: P c1 =Pr-βμ; where β is the adjustment factor, 0<β<1, ; for Pixel point, calculate the statistical characteristics μ of its neighborhood n ,like , then calculate the second correction value: P c2 =Pr-γμ; where γ is the second impact 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.

6. The method according to claim 1, characterized in that The step of generating an index row vector and an index column vector based on the index of the non-zero pixel matrix includes: Based on the row index m and column index n of the non-zero pixel matrix, an index row vector R = [0, 1, ..., m-1] and an index column vector C = [0, 1, ..., n-1] are generated.

7. The method according to claim 1, characterized in that The method of summing each row of the non-zero pixel matrix to obtain a column vector, multiplying the column vector by the index row vector, and dividing the product sum by the sum of the non-zero pixels to obtain a y coordinate value, i.e., the centroid coordinate in the y direction, includes: Sum each row of the non-zero pixel matrix to get a column vector V y , the column vector V y Multiply the corresponding elements of the index row vector R and add all the products, that is: ; Divide the sum of all products by the sum of non-zero pixels S to get the y coordinate value, that is, the coordinate of the centroid in the y direction: y=Sum y / S.

8. The method according to claim 1, characterized in that: The method of summing each column of the non-zero pixel matrix to obtain a row vector, multiplying the row vector by the index column vector, and dividing the product by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the x-direction centroid coordinate, includes: Each column of the non-zero pixel matrix is ​​summed to obtain a row vector Vx, the column vector Vx is multiplied by the corresponding element of the index row vector C, and all the products are added, that is: ; Divide the sum of all products by the sum of non-zero pixels S to get the x coordinate value, that is, the x-direction centroid coordinate: x=Sum x / S.

9. The method according to claim 1, characterized in that: The variance in the x-direction and the y-direction is calculated according to the x-coordinate value and the y-coordinate value, and the spot diameter is calculated according to the variance in the x-direction and the y-direction; and the beam waist radius and the beam divergence angle are calculated based on the spot diameter; According to the beam waist radius and beam divergence angle, calculate the beam M 2 Factors include: Calculate the sum of the squares of the distances from each non-zero pixel to the x-coordinate value, and divide the sum of squares by the sum of non-zero pixels S to get the variance in the x direction. ; Calculate the sum of the squares of the distances from each non-zero pixel to the y coordinate value, and divide the sum of squares by the sum of non-zero pixels S to get the variance in the y direction. ; According to the variance in the x direction and the variance in the y direction, the equivalent diameters in the x and y directions are calculated, and the average value is taken to obtain the spot diameter D; Multiply the spot diameter D and the CCD angular resolution to get the beam divergence angle θ; According to the spot diameter D, the beam waist radius is obtained , according to the beam waist radius and beam divergence angle, we can get the beam M 2 factor ;in, is the product of the waist radius of an ideal fundamental mode Gaussian beam and the far-field beam divergence angle, ; is the wavelength of the light beam.

10. The method according to claim 1, characterized in that The method further comprises: According to the variance in the x-direction and the y-direction, the spot circularity is calculated based on the least squares method; the spot circularity calculation formula is as follows: ; is the sum of the squares of the distances from all non-zero pixels to the fitted circle obtained by the least squares method; k is the weight coefficient; and, The beam divergence angle is corrected by using the variance in the x and y directions. 2 factors to adjust; and The ideal spot centroid position is obtained, and the transmitting and receiving coaxiality is calculated based on the difference between the ideal centroid position and the real-time centroid position.

11. A real-time beam quality assessment device for dynamic beams, characterized in that: The device comprises: The first processing module is used to read the real-time spot image of the CCD, convert the real-time spot image into a pixel file, and obtain the pixel value of each pixel point; adopt an adaptive matching algorithm to perform background noise correction on the pixel file according to the pixel value of each pixel point in the real-time spot image and the reference background noise; including: For each pixel value Pr in the real-time spot image, calculate its deviation d from the corresponding reference background noise μ; if , then the pixel is considered as noise and matches the strong correction mode; if , then the pixel is considered to be the edge of the light spot and matches the weak correction mode; if , then the pixel is considered as the light spot part and no correction pattern matching is performed; The second processing module is used to screen out pixels less than a threshold value in the corrected pixel file and set them to zero pixels, calculate the sum of non-zero pixels; and generate an index row vector and an index column vector based on the index of the non-zero pixel matrix; A third processing module is used to sum each row of the non-zero pixel matrix to obtain a column vector, multiply the column vector by the index row vector, and divide the product sum by the sum of the non-zero pixels to obtain a y coordinate value, that is, a centroid coordinate in the y direction; The third processing module is further used to sum each column of the non-zero pixel matrix to obtain a row vector, multiply the row vector by the index column vector, and divide the product sum by the sum of the non-zero pixels to obtain an x-coordinate value, i.e., the x-direction centroid coordinate; The fourth processing module calculates the variance in the x-direction and the y-direction according to the x-coordinate value and the y-coordinate value, and calculates the spot diameter according to the variance in the x-direction and the y-direction; calculates the beam waist radius and the beam divergence angle based on the spot diameter; and calculates the beam M according to the beam waist radius and the beam divergence angle. 2 Factor; according to beam M 2 The factor evaluates the beam quality at the current moment.

12. An electronic device, characterized in that: include: at least one processor; as well as 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 10.

13. 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-10.

Citation Information

Patent Citations

  • Method for measuring divergence angle of laser beam

    CN118190353A