A beam quality detection method, device, electronic equipment and medium

By using the reconstructed model to fit the spot diameter and contour curve in beam quality detection, the problem of low accuracy in laser beam quality detection is solved and higher detection accuracy is achieved.

CN118294115BActive Publication Date: 2024-10-15SHANGHAI PRECILASERS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410422954.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2024-10-15
Estimated Expiration
2044-04-09

Smart Images

  • Figure CN118294115B_ABST
    Figure CN118294115B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of optical technology, and in particular to a beam quality detection method, device, electronic device and medium, comprising obtaining a first spot diameter set and a second spot diameter according to a reconstruction model, fitting an initial contour curve and obtaining a predicted spot diameter corresponding to a second acquisition distance, updating a first spot image set according to a comparison result between the second spot diameter and the predicted spot diameter, until a target contour curve is obtained to obtain a quality level of a laser to be detected, eliminating the influence of interference factors in the image acquisition process through a reconstruction model, and obtaining a spot diameter with higher accuracy based on a fitted circular image, and further continuously adding new spot images and corresponding acquisition distance information to the first spot image set and the first acquisition distance set through a comparison result between the predicted spot diameter and the corresponding real spot diameter, thereby improving the accuracy of the target contour curve and thus improving the accuracy of the beam quality detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optical technology, and in particular to a light beam quality detection method, device, electronic equipment and medium. Background Art

[0002] Due to the characteristics of high brightness, high directivity, high monochromaticity and high coherence, lasers are widely used in the fields of information, processing, medical treatment, military, etc. Among the many types of high-power lasers, fiber lasers have developed particularly rapidly due to their advantages of good beam quality, small size, high conversion efficiency and good heat dissipation, and have begun to be used on a large scale in industrial and military fields. Therefore, testing the beam quality of lasers to ensure that fiber lasers output high-quality lasers is of great significance to the fields of information, processing, medical treatment, military, etc.

[0003] At present, when detecting the quality of laser beams, it is impossible to detect the laser spot diameter and divergence angle well due to the long distance that the laser needs to irradiate, the high refractive index of the laser and the large divergence angle. At the same time, the uncertainties and interference factors in the actual detection process are relatively complex, which can easily lead to inaccurate data on the laser spot diameter and divergence angle, and thus lead to low accuracy of the laser beam quality detection results.

[0004] Therefore, how to improve the accuracy of beam quality detection results has become an urgent problem to be solved. Summary of the invention

[0005] In view of the above technical problems, in a first aspect, an embodiment of the present invention provides a beam quality detection method, the beam quality detection method comprising:

[0006] S100, obtaining a first light spot image set TX acquired by an image acquisition module 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JLμ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 is the distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, where γ refers to the total number of first light spot images.

[0007] S200, TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ Input to the reconstruction model, NH 1 By connecting TX 1 Input into the reconstructed model.

[0008] S300, according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter.

[0009] S400 , fitting and obtaining an initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ.

[0010] S500, according to JL 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 .

[0011] S600, if JL 0 =JL 1, then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected.

[0012] S700, if JL 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 .

[0013] S800, TX 2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained.

[0014] S900: Acquire the quality level of the laser to be detected according to the target profile curve.

[0015] In a second aspect, an embodiment of the present invention provides a beam quality detection device, the beam quality detection device comprising:

[0016] The first data acquisition module is used to acquire the first light spot image set TX acquired by the image acquisition module. 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JL μ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 is the distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, where γ refers to the total number of first light spot images.

[0017] Image reconstruction module, used to convert TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ Input to the reconstruction model, NH 1 By connecting TX 1 Input into the reconstructed model.

[0018] The spot diameter acquisition module is used to obtain the light spot diameter according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter.

[0019] The initial profile curve fitting module is used to fit the initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ.

[0020] The spot diameter prediction module is used to 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 .

[0021] The first target contour curve acquisition module is used if JL 0 =JL 1 , then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected.

[0022] The second data acquisition module is used for 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 .

[0023] The second target contour curve acquisition module is used to obtain TX 2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained.

[0024] The quality grade acquisition module is used to obtain the quality grade of the laser to be detected according to the target contour curve.

[0025] In a third aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the beam quality detection method as in the first aspect.

[0026] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a processor and the non-transitory computer-readable storage medium in the third aspect.

[0027] The present invention has at least the following beneficial effects: by acquiring the first light spot image set TX acquired by the image acquisition module 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 , TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter is obtained by fitting the initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ. 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 , if JL 0 =JL 1 , then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected. If JL 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module2 and TX 2 The corresponding third acquisition distance JL 2 , TX 2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3 , repeat the above steps until the target contour curve corresponding to the laser to be detected is obtained, and the quality level of the laser to be detected is obtained according to the target contour curve. The influence of uncertain factors and interference factors in the image acquisition process is eliminated by reconstructing the model, and a more accurate spot diameter is obtained based on the fitting circle image, which improves the accuracy of the initial contour curve. By comparing the predicted spot diameter with the corresponding real spot diameter, new spot images and corresponding acquisition distance information are continuously added, which further improves the accuracy of the initial contour curve, improves the accuracy of the target contour curve, and thus improves the accuracy of the beam quality detection result. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 A structural block diagram of a beam quality detection system provided in Embodiment 1 of the present invention;

[0030] Figure 2 A flow chart of a beam quality detection method provided in Embodiment 2 of the present invention;

[0031] Figure 3This is a structural flow chart of a light beam quality detection device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Embodiment 1

[0035] The first embodiment provides a beam quality detection system, which includes a laser to be detected, an image acquisition module, a control module, a processor, and a memory storing a computer program, wherein the memory also stores a trained prediction model, and the image acquisition module is arranged on a transmission path of the laser to be detected output by the laser to be detected. When the computer program is executed by the processor, the following steps are implemented:

[0036] S1, randomly selecting N different first acquisition positions on the transmission path, and obtaining a first distance between each first acquisition position and a laser to be detected, wherein N is an integer greater than 2.

[0037] Among them, the laser to be detected outputs the laser to be detected, the control module is used to control the acquisition position of the image acquisition module on the transmission path of the laser to be detected, and the image acquisition module is used to acquire the spot image of the laser to be detected as the data basis for detecting the beam quality of the laser to be detected.

[0038] In order to obtain the beam quality of the laser to be detected, it is necessary to obtain the beam waist diameter and the far-field divergence angle corresponding to the contour curve of the laser to be detected. Therefore, this embodiment first determines N first acquisition positions on the transmission path for acquiring the initial spot image of the laser to be detected, and uses the actual spot diameter corresponding to the initial spot image and the first distance between the laser to be detected and the laser to be detected as the basis for fitting the contour curve corresponding to the laser to be detected, and then detects the quality level of the laser to be detected.

[0039] If the value of N is large, a large number of initial spot images need to be collected, which increases the cost of image collection and image processing. If the value of N is small, the number of times the contour curve needs to be fitted and the number of times the candidate spot images need to be obtained are large, which increases the cost of data processing. Therefore, the specific value of N can be set by the implementer according to actual conditions. Since at least three sets of spot diameter and first distance data are required when fitting the contour curve, N refers to an integer greater than 2.

[0040] In a specific embodiment, since there is an intermediate beam waist in the shape of the contour curve of the laser to be detected, in order to improve the efficiency of beam quality detection, when selecting N first acquisition positions, the distance between different first acquisition positions can be increased to increase the possibility of acquiring initial spot images corresponding to both sides of the intermediate beam waist, thereby providing richer information for fitting the contour curve and reducing the number of spot image acquisition times and the amount of computational data processing.

[0041] As described above, the N different first acquisition positions and N first distances are acquired, which provide a data basis for the control module to control the image acquisition device and subsequently fit the contour curve.

[0042] S2, controlling the image acquisition module to acquire images at each first acquisition position through the control module, and obtaining N initial spot images of the laser to be detected.

[0043] Among them, the image acquisition module can be a CCD camera. In order to improve the accuracy of the initial spot image captured by the image acquisition module, when setting the image acquisition module, the camera center of the image acquisition module can face the direction of the laser output by the laser to be detected, so that the image acquisition module is set on the transmission path of the laser to be detected output by the laser to be detected.

[0044] S3, according to the N initial light spot images, obtain the initial light spot information set A corresponding to the N initial light spot images = {A 1 , A 2 , ..., A i , ..., A N}, where A i ={A i1 , A i2}, Ai1 Refers to the first distance corresponding to the i-th initial spot image, A i2 It refers to the true diameter of the light spot in the i-th initial light spot image, i=1, 2, ..., N.

[0045] The initial spot image can be binarized and edge detected to obtain the spot contour in the initial spot image, and then the real spot diameter of the spot is obtained according to the spot contour, which is combined with the corresponding first distance as the basis for fitting the contour curve.

[0046] Among them, those skilled in the art know that any edge detection method in the prior art falls within the protection scope of the present invention, and will not be described in detail here.

[0047] S4, input A into the prediction model, and obtain the first prediction information B output by the prediction model 1 , where B 1 = {B 1 1 , B 1 2 , B 1 3}, B 1 1 is the first prediction distance, B 1 2 It means that the laser to be detected is at B 1 1 The predicted diameter of the light spot at the corresponding first predicted acquisition position, B 1 3 It refers to the predicted contour curve corresponding to the laser to be detected, and the first predicted acquisition position refers to the position on the transmission path where the distance from the laser to be detected is equal to the first predicted distance.

[0048] Among them, the prediction model is used to predict the next image acquisition position, the corresponding spot diameter and the corresponding contour curve according to the input initial spot information set, so as to enrich the initial spot information set, improve the fitting efficiency of the contour curve, and improve the fitting accuracy of the contour curve.

[0049] In order to improve the accuracy of the prediction results, this embodiment uses the trained prediction model to extract and analyze features of A to obtain the first prediction information B 1 .

[0050] In a specific embodiment, the memory further stores an initial prediction model, a first training sample set list, and a first label sample set list, wherein the first training sample set list includes P first training sample sets, the first label sample set list includes P first label sample sets, and the vth first training sample set and the vth first label sample set correspond to the same sample laser G v , the vth first training sample set and the vth first label sample set each include a number of sample information, each sample information includes a distance sample and a spot diameter real sample, and the vth first training sample set and the vth first label sample set can be fitted to obtain G v The actual contour curve, v = 1, 2, ..., P, when the computer program is executed by the processor, also implements the following steps:

[0051] S10, inputting the vth first training sample set into the initial prediction model, and obtaining the first prediction sample information B output by the initial prediction model 0 v = {B 0 v1 , B 0 v2} and G v Corresponding predicted contour curve sample B 0 v3 , where B 0 v1 refers to the first distance prediction sample, B 0 v2 G v In B 0 v1 The corresponding spot diameter prediction sample at the corresponding first acquisition position prediction sample.

[0052] S20, for B 0 v Compare with all sample information in the vth first label sample set to obtain the first sub-loss corresponding to the vth first training sample set.

[0053] S30, traverse v=1, 2, ..., P, and obtain P first sub-losses.

[0054] S40: Obtain a first model total loss of the initial prediction model according to the P first sub-losses.

[0055] S50, updating the parameters of the initial prediction model according to the total loss of the first model until the total loss of the first model meets a preset first training condition, thereby obtaining a trained prediction model.

[0056] In the above, the initial prediction model is trained according to the first training sample set list and the first label sample set list to obtain a more accurate prediction model, thereby improving the first prediction information B 1 accuracy.

[0057] In a specific implementation, the memory further stores a preset training sample length Len, and S10 further includes the following steps:

[0058] S11, according to Len and the total number SL of sample information in the vth first training sample set v1 , obtain the number of supplementary information SL corresponding to the vth first training sample set v2 , where SL v2 =Len-SL v1 .

[0059] S12, according to SL v2 The preset supplementary information and the vth first training sample set are used to obtain the first target training sample set corresponding to the vth first training sample set.

[0060] In this embodiment, Len and the total number SL of sample information in the vth first training sample set are used. v1 , get the number of missing sample information of the vth first training sample set, that is, the number of supplementary information SL v2 , then SL v2 The preset supplementary information is added to the vth first training sample set to ensure the scale consistency of the input data in the initial prediction model and guarantee the training of the initial prediction model.

[0061] In a specific implementation, the preset supplementary information includes a preset distance and a preset spot diameter, wherein the preset distance is 0 and the preset spot diameter is 0.

[0062] In order to eliminate the influence of the supplementary information on the output result, the present embodiment sets the preset distance and the preset spot diameter in the preset supplementary information to 0, so as to improve the training accuracy of the initial prediction model.

[0063] In a specific implementation, S20 further includes the following steps:

[0064] S21, if B 0 v If it is consistent with any sample information in the vth first label sample set, the first sub-loss corresponding to the vth first training sample set is 0.

[0065] S22, if B 0 vIf the sample information is inconsistent with all the sample information in the vth first label sample set, the first sub-loss corresponding to the vth first training sample set is 1.

[0066] In a specific implementation, the preset first training condition refers to the total loss of the first model converging.

[0067] In a specific implementation, the preset first training condition means that the total loss of the first model is less than a preset first loss threshold.

[0068] Among them, the preset first loss threshold can be set by the implementer according to actual conditions.

[0069] In a specific implementation manner, the memory also stores a sample information list D={D 1 , D 2 , ..., D j , ..., D Q}, where the sample information set D corresponding to the jth sample laser j ={D j1 , D j2 , ..., D jk , ..., D jR(j)}, the kth sample information D corresponding to the jth sample laser jk ={D jk1 , D jk2}, D jk1 It refers to the kth distance sample corresponding to the jth sample laser, D jk2 It means D jk1 The corresponding spot diameter real sample at the corresponding acquisition position sample, j = 1, 2, ..., Q, Q refers to the total number of sample lasers, k = 1, 2, ..., R (j), R (j) refers to the total number of sample information corresponding to the j-th sample laser. When the computer program is executed by the processor, the following steps are also implemented:

[0070] S01, according to D j , get the sample information combination list E corresponding to the jth sample laser j ={E j1 , E j2 ,……,E js ,……,E jZ(j)}, where E js ={E js1 , E js2 ,……,E jsx ,……,E jsy(js)}, E jsx It refers to the sth sample information combination E corresponding to the jth sample laser jsThe x-th sample information in , s = 1, 2, ..., Z(j), Z(j) refers to the total number of sample information combinations corresponding to the j-th sample laser, x = 1, 2, ..., y(js), y(js) refers to the total number of sample information in the s-th sample information combination corresponding to the j-th sample laser, E jsx ∈D j , and according to E js All sample information in can be fitted to obtain the actual profile curve corresponding to the jth sample laser.

[0071] S02, according to E js , E js Any h sample information in E is used as the first training sample set. js The y(js)-h sample information other than the h first training samples is used as the first label sample set corresponding to the first training sample set, and E is obtained. js The corresponding P js The first training sample set and the corresponding P js A set of first label samples, where 0<h<y(js).

[0072] S03, traverse E j1 , E j2 ,……,E js ,……,E jZ(j) , get the P corresponding to the jth sample laser j The first training sample set and the corresponding P j A set of first-label samples, where P j =Σ s=1 Z(j) (P js ).

[0073] S04, traverse D 1 , D 2 , ..., D j , ..., D Q , obtain the P first training sample sets and the corresponding P first label sample sets corresponding to all sample lasers, where P = Σ j=1 Q (P j ).

[0074] S05: Obtain a first training sample set list according to the P first training sample sets.

[0075] S06: Obtain a first label sample set list according to the P first label sample sets.

[0076] Among them, the R(j) sample information corresponding to the j-th sample laser, all information and part of the information in the R(j) sample information can be fitted to obtain the actual contour curve corresponding to the j-th sample laser. Therefore, each group of sample information that can be fitted to obtain the actual contour curve corresponding to the j-th sample laser is taken as a sample information combination, and the sample information combination list E corresponding to the j-th sample laser is obtained accordingly. j .

[0077] The sth sample information combination E corresponding to the jth sample laser js , choose E arbitrarily js The h sample information in E is used as the first training sample set, and js The y(js)-h sample information outside the h first training samples is used as the first label sample set corresponding to the first training sample set. After the first training sample set is input into the initial prediction model, if the initial prediction model can output any sample information in the corresponding first label sample set, it means that the output result of the initial prediction model is correct, that is, the predicted contour curve sample is correct; otherwise, if the initial prediction model cannot output any sample information in the corresponding first label sample set, it means that the output result of the initial prediction model is incorrect, that is, the predicted contour curve sample is incorrect.

[0078] Therefore, the first training sample set list and the first label sample set list are obtained as the data basis for training the initial prediction model, which improves the accuracy of the trained prediction model and further improves the accuracy of the first prediction information and the prediction contour curve samples.

[0079] Furthermore, the trained prediction model outputs the first prediction information B according to the input initial spot information set A. 1 After that, the N initial spot information in A and B can be shown 1 For the same laser, the predicted profile curve is the profile curve corresponding to the laser, and the N initial spot information in A and B 1 It can be used to fit all or part of the information of the predicted contour curve, thereby reducing the number of acquisition times of the spot image and improving the efficiency and accuracy of obtaining the contour curve.

[0080] The above inputs A into the prediction model and obtains the first prediction information B output by the prediction model. 1 , the predicted contour curve is obtained, and the next spot image that needs to be collected in order to fit the actual contour curve of the laser is indicated, which reduces the number of spot image collection times and improves the efficiency and accuracy of contour curve acquisition.

[0081] S5, controlling the image acquisition module to acquire images at the first predicted acquisition position through the control module, and obtaining the first candidate spot image of the laser to be detected.

[0082] S6, according to the first candidate light spot image, obtain the first light spot information C corresponding to the first candidate light spot image 1 = {B 1 1 , C 1 1}, where C 1 1 It refers to the actual diameter of the spot in the first candidate spot image.

[0083] S7, if B 1 =C 1 , the predicted contour curve is determined as the target contour curve corresponding to the laser to be detected.

[0084] S8, if B 1 ≠C 1 , then C 1 Add to A to get the first spot information update set A 1 ={A 1 , A 2 , ..., A i , ..., A N , C 1}, and update A = A 1 , repeat steps S4-S8 until the target contour curve corresponding to the laser to be detected is obtained.

[0085] Among them, if B 1 ≠C 1 , then it means the first prediction information B output by the prediction model 1 If the accuracy is not high, the real first spot information C 1 Add to A to improve the richness of the real spot information and obtain the first spot information update set A 1 , replace A and re-input it into the prediction model for prediction until the target contour curve corresponding to the laser to be detected is obtained, so as to improve the accuracy of the obtained target contour curve in the efficient detection process.

[0086] In the above, the real first light spot information is added to A to obtain the first light spot information update set A 1 , which improves A 1 The richness of the real spot information in replaces A as the basis for obtaining the target contour information, which improves the accuracy and acquisition efficiency of the target contour curve.

[0087] S9, obtaining the quality level of the laser to be detected according to the target profile curve.

[0088] Among them, the quality level can be set by the implementer according to actual conditions.

[0089] In a specific implementation, S9 further includes the following steps:

[0090] S91, according to the target profile curve, obtaining the beam waist diameter r and the far-field divergence angle θ corresponding to the laser to be detected.

[0091] S92, according to the beam waist radius and far-field divergence angle, obtain the quality factor M corresponding to the laser to be detected 2 , where M 2 =(0.5×r×θ) / (λ / π), λ refers to the wavelength of the laser to be detected, and π refers to pi.

[0092] S93, according to M 2 The quality level of the laser to be detected is obtained.

[0093] In a specific implementation, the memory further stores a preset data table, which includes a plurality of preset quality factors and a preset quality level corresponding to each preset quality factor. S93 further includes the following steps:

[0094] S931, query M in the data table 2 , get M 2 The corresponding preset quality level.

[0095] S932, M 2 The corresponding preset quality level is determined as the quality level of the laser to be detected.

[0096] In this embodiment, N different first acquisition positions are randomly selected on the transmission path, and a first distance between each first acquisition position and the laser to be detected is obtained. The image acquisition module is controlled by the control module to perform image acquisition at each first acquisition position to obtain N initial spot images of the laser to be detected. According to the N initial spot images, an initial spot information set A corresponding to the N initial spot images is obtained. 1 , A 2 , ..., A i , ..., A N}, input A into the prediction model, and obtain the first prediction information B output by the prediction model 1 ,, through the control module, the image acquisition module is controlled to perform image acquisition at the first predicted acquisition position, and the first candidate spot image of the laser to be detected is obtained. According to the first candidate spot image, the first spot information C corresponding to the first candidate spot image is obtained. 1 = {B 1 1 , C1 1}, if B 1 =C 1 , then the predicted contour curve is determined as the target contour curve corresponding to the laser to be detected. If B 1 ≠C 1 , then C 1 Add to A to get the first spot information update set A 1 ={A 1 , A 2 , ..., A i , ..., A N , C 1}, and update A = A 1 Repeat steps S4-S8 until the target contour curve corresponding to the laser to be detected is obtained by fitting, and the quality level of the laser to be detected is obtained according to the target contour curve. The initial spot information set A is input into the prediction model to obtain the first prediction information B output by the prediction model. 1 When the predicted contour curve is obtained, the next spot image that needs to be collected in order to fit the actual contour curve of the laser is indicated according to the first predicted distance, and the accuracy of the predicted contour curve is measured by combining the predicted diameter of the spot with the actual diameter of the spot. When the accuracy is low, the actual first spot information is added to the initial spot information set A to obtain the target contour curve, which reduces the number of spot image collection times, improves the efficiency and accuracy of obtaining the target contour curve, and thus improves the accuracy of the beam quality detection result.

[0097] Embodiment 2

[0098] Based on the above embodiment 1, this embodiment 2 provides a beam quality detection method, such as Figure 2 As shown, the beam quality detection method includes the following steps:

[0099] S100, obtaining a first light spot image set TX acquired by an image acquisition module 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JL μ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 is the distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, where γ refers to the total number of first light spot images.

[0100] The image acquisition module may randomly acquire γ first light spot images, or may acquire γ first light spot images according to preset positions, as a basis for fitting the target contour curve of the laser to be detected.

[0101] In the actual image acquisition process, the quality of image acquisition will be affected by uncertain factors and interference factors, resulting in more noise on the acquired spot image, and the shape and clarity of the spot in the spot image are affected, resulting in low accuracy of the spot diameter when the corresponding spot diameter is obtained based on the first spot image and the second spot image.

[0102] In a specific implementation, the image acquisition module is disposed on the transmission path of the laser to be detected output by the laser to be detected, and is used to acquire a light spot image corresponding to the laser to be detected.

[0103] S200, TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ Input to the reconstruction model, NH 1 By connecting TX 1 Input into the reconstructed model.

[0104] Among them, the reconstruction model is used to extract and analyze the features of the input spot image, and output the fitting circle image corresponding to each spot image. The fitting circle image is the fitting circle of the spot in the corresponding spot image, which is used to eliminate the influence of uncertain factors and interference factors in the image acquisition process. Therefore, compared with directly obtaining the corresponding spot diameter based on the first spot image and the second spot image, when the corresponding spot diameter is obtained based on the fitting circle image, the accuracy of the spot diameter can be improved, thereby improving the accuracy of the beam quality detection result.

[0105] In a specific implementation, S200 further includes the following steps:

[0106] S210, for TX 0 and TX 1 Perform binarization and obtain TX 0 The corresponding first binary image set ER = {ER 1 , E.R. 2 , ..., ER μ , ..., ER γ} and TX 1 The corresponding second binary image ER 1 .

[0107] S220, ER and ER 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 .

[0108] Among them, for TX 0 and TX 1 Binarization can eliminate TX 0 and TX 1 on the part of the noise, and then TX 0 The corresponding first binary image set ER and TX 1 The corresponding second binary image ER 1 Input into the trained reconstruction model to improve the first fitting circle image set NH and the second fitting circle image NH 1 accuracy.

[0109] In a specific implementation, the beam quality detection method further includes:

[0110] S1000, obtain the spot image sample set YB 1 ={YB1 1 , Y.B. 1 2 , ..., YB 1 ξ , ..., YB 1 τ}, YB 1 ξ refers to the ξth spot image sample, ξ=1, 2, ..., τ, τ refers to the total number of spot image samples.

[0111] S2000, YB 1 Input into the initial reconstruction model to obtain YB 1 The corresponding fitting circle image sample set YB 2 ={YB 2 1 , Y.B. 2 2 , ..., YB 2 ξ , ..., YB 2 τ}, YB 1 ξ The corresponding fitting circle image sample sample YB 2 ξ By using YB 1 ξ The input to the initial reconstruction model.

[0112] S3000, according to YB 2 ξ , get YB 2 ξ The length L of the circumscribed rectangle corresponding to the fitted circle 1 ξ 、Width L 2 ξ and the area of ​​the fitted circle L 3 ξ .

[0113] S4000, for YB 1 ξ and YB 2 ξ Compare the pixels of YB 1 ξ and YB 2 ξ The corresponding pixel intersection ratio L 4 ξ .

[0114] S5000, according to L 1 ξ , L 2ξ , L 3 ξ , L 4 ξ and the preset weight set ψ={ψ 1 , ψ 2 , ψ 3}, get YB 1 ξ The corresponding second sub-loss SH ξ =ψ 1 ×(L 1 ξ -L 2 ξ )+ψ 2 ×(L 3 ξ -π×((L 1 ξ +L 2 ξ ) / 4)^2)+ψ 3 ×L 4 ξ , where ψ 1 refers to the first preset weight, ψ 2 refers to the second preset weight, ψ 3 refers to the third preset weight, and π refers to the ratio of circumference to circumference of a circle.

[0115] S6000, traverse ξ=1,2,……,τ, and obtain the total loss of the second model SH=Σ ξ=1 τ (SH ξ ).

[0116] S7000: Update the parameters of the initial reconstruction model according to SH until SH meets a preset second training condition, and obtain a trained reconstruction model.

[0117] In order to improve the accuracy of the reconstruction model, this embodiment trains the initial reconstruction model to obtain a trained reconstruction model.

[0118] For the fitting circle image samples output by the initial reconstruction model, the shape of the fitting circle in the fitting circle sample image, and the relative position and relative size of the fitting circle in the spot image are analyzed. This can characterize the accuracy of the output fitting circle image samples and serve as the basis for training the initial reconstruction model.

[0119] Specifically, the length and width of the circumscribed rectangle of a standard circle are consistent, and the area of ​​a standard circle is the product of the square of the radius and π. Therefore, according to YB 2 ξ The length L of the circumscribed rectangle corresponding to the fitted circle 1 ξ and width L2 ξ The difference between 1 ξ -L 2 ξ , combined with the fitted circle area L 3 ξ To characterize the difference between the shape of the fitted circle and the standard circle. Correspondingly, the difference L 1 ξ -L 2 ξ The bigger, YB 1 ξ The corresponding second sub-loss SH ξ At the same time, the length L 1 ξ and width L 2 ξ The sum of is regarded as the diameter of the standard circle used as a reference, then L 3 ξ -π×((L 1 ξ +L 2 ξ ) / 4)^2 is larger, YB 1 ξ The corresponding second sub-loss SH ξ The larger the value, the larger the 1 and ψ 2 Both are greater than 0.

[0120] In addition, YB 1 ξ and YB 2 ξ The corresponding pixel intersection ratio L 4 ξ The larger the value, the smaller the position difference and size difference between the fitting circle in the fitting circle sample image and the fitting circle in the spot image. Correspondingly, YB 1 ξ The corresponding second sub-loss SH ξ The smaller, therefore, ψ 3 <0.

[0121] In a specific implementation, the preset second training condition refers to SH convergence.

[0122] In a specific implementation, the preset second training condition means that SH is less than a preset second loss threshold.

[0123] Among them, the specific value of the preset second loss threshold can be set by the implementer according to actual conditions.

[0124] S300, according to NH and NH 1 , get TX0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter.

[0125] S400 , fitting and obtaining an initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ.

[0126] Among them, those skilled in the art know that any curve fitting method in the prior art falls within the protection scope of the present invention, and will not be described in detail here.

[0127] S500, according to JL 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 .

[0128] S600, if JL 0 =JL 1 , then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected.

[0129] Among them, if JL 0 =JL 1 , that is, the predicted spot diameter obtained according to the initial contour curve is consistent with the corresponding real spot diameter, then the initial contour curve can be determined as the target contour curve corresponding to the laser to be detected.

[0130] S700, if JL 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 .

[0131] Among them, if JL 0 ≠JL 1 , that is, the predicted spot diameter obtained according to the initial contour curve is inconsistent with the corresponding real spot diameter, and the initial contour curve cannot be determined as the target contour curve corresponding to the laser to be detected. Therefore, the third spot image TX acquired by the image acquisition module is obtained. 2 and TX 2 The corresponding third acquisition distance JL 2 , and the first spot image set TX 0 ={TX0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 Combined with the above, it provides more abundant real spot data for fitting the contour curve.

[0132] In a specific implementation, S700 further includes the following steps:

[0133] S710, according to JL and ZJ, obtain the first light spot information set GB = {GB 1 , GB 2 , ..., GB μ , ..., GB γ}, where the μth first spot information GB i ={JL μ , ZJ μ}.

[0134] S720, input GB into the trained prediction model to obtain the third acquisition distance JL output by the prediction model 2 .

[0135] S730, through the control module, controls the image acquisition module in JL 2 The image is collected at the corresponding position to obtain the third spot image TX of the laser to be detected. 2 .

[0136] Above, if JL 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 , which improves the richness of the real spot data and thus improves the accuracy of the reacquired initial contour curve.

[0137] S800, TX 2 Add to TX 0 In the 2Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained.

[0138] Among them, the first spot image update set and TX 1 Compared with the more abundant real spot data, using TX 3 Replace TX 1 , using JL 3 By replacing JL, the accuracy of the re-acquired initial contour curve is improved. By continuously adding new spot images and corresponding acquisition distance information, the accuracy of the initial contour curve is continuously improved, and then a target contour curve with higher accuracy is obtained.

[0139] S900: Acquire the quality level of the laser to be detected according to the target profile curve.

[0140] In this embodiment, the first light spot image set TX acquired by the image acquisition module is acquired. 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 , TX0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter is obtained by fitting the initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ. 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 , if JL 0 =JL 1 , then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected. If JL 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 , TX 2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3, repeat the above steps until the target contour curve corresponding to the laser to be detected is obtained, and the quality level of the laser to be detected is obtained according to the target contour curve. The influence of uncertain factors and interference factors in the image acquisition process is eliminated by reconstructing the model, and a more accurate spot diameter is obtained based on the fitting circle image, which improves the accuracy of the initial contour curve. By comparing the predicted spot diameter with the corresponding real spot diameter, new spot images and corresponding acquisition distance information are continuously added, which further improves the accuracy of the initial contour curve, improves the accuracy of the target contour curve, and thus improves the accuracy of the beam quality detection result.

[0141] Embodiment 3

[0142] On the basis of the above-mentioned embodiment 2, this embodiment 3 provides a beam quality detection device, such as Figure 3 As shown, the beam quality detection device comprises:

[0143] The first data acquisition module 31 is used to acquire the first light spot image set TX acquired by the image acquisition module. 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JL μ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 is the distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, where γ refers to the total number of first light spot images.

[0144] The image reconstruction module 32 is used to convert TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ Input to the reconstruction model, NH 1 By connecting TX 1 Input into the reconstructed model.

[0145] The spot diameter acquisition module 33 is used to obtain the light spot diameter according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter.

[0146] The initial profile curve fitting module 34 is used to fit the initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ.

[0147] The light spot diameter prediction module 35 is used to predict the light spot diameter according to JL 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 .

[0148] The first target contour curve acquisition module 36 is used to 0 =JL 1 , then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected.

[0149] The second data acquisition module 37 is used to 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 .

[0150] The second target contour curve acquisition module 38 is used to obtain TX2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained.

[0151] The quality level acquisition module 39 is used to acquire the quality level of the laser to be detected according to the target contour curve.

[0152] In a specific embodiment, the image reconstruction module 32 further includes:

[0153] Image processing submodule, used to TX 0 and TX 1 Perform binarization and obtain TX 0 The corresponding first binary image set ER = {ER 1 , E.R. 2 , ..., ER μ , ..., ER γ} and TX 1 The corresponding second binary image ER 1 .

[0154] Image reconstruction submodule, used to convert ER and ER 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 .

[0155] In a specific implementation, the beam quality detection device further includes:

[0156] Sample data acquisition module, used to obtain the spot image sample set YB 1 ={YB 1 1 , Y.B. 1 2 , ..., YB 1 ξ , ..., YB 1 τ}, YB 1 ξ refers to the ξth spot image sample, ξ=1, 2, ..., τ, τ refers to the total number of spot image samples.

[0157] Sample image fitting module, used to transform YB 1 Input into the initial reconstruction model to obtain YB 1 The corresponding fitting circle image sample set YB 2 ={YB 2 1 , Y.B. 2 2 , ..., YB 2 ξ , ..., YB 2 τ}, YB 1 ξ The corresponding fitting circle image sample sample YB 2 ξ By using YB 1 ξ The input to the initial reconstruction model.

[0158] The first sample parameter acquisition module is used to obtain the parameters according to YB 2 ξ , get YB 2 ξ The length L of the circumscribed rectangle corresponding to the fitted circle 1 ξ 、Width L 2 ξ and the area of ​​the fitted circle L 3 ξ .

[0159] The second sample parameter acquisition module is used to 1 ξ and YB 2 ξ Compare the pixels of YB 1 ξ and YB 2 ξThe corresponding pixel intersection ratio L 4 ξ .

[0160] The second sub-loss acquisition module is used to obtain the loss according to L 1 ξ , L 2 ξ , L 3 ξ , L 4 ξ and the preset weight set ψ={ψ 1 , ψ 2 , ψ 3}, get YB 1 ξ The corresponding second sub-loss SH ξ =ψ 1 ×(L 1 ξ -L 2 ξ )+ψ 2 ×(L 3 ξ -π×((L 1 ξ +L 2 ξ ) / 4)^2)+ψ 3 ×L 4 ξ , where ψ 1 refers to the first preset weight, ψ 2 refers to the second preset weight, ψ 3 refers to the third preset weight, and π refers to the ratio of circumference to circumference of a circle.

[0161] The second model total loss acquisition module is used to traverse ξ=1,2,……,τ and obtain the second model total loss SH=Σ ξ=1 τ (SH ξ ).

[0162] The model training module is used to update the parameters of the initial reconstruction model according to SH until SH meets the preset second training condition, thereby obtaining a trained reconstruction model.

[0163] In a specific implementation, the first data acquisition module 37 further includes:

[0164] The light spot information acquisition submodule is used to obtain the first light spot information set GB={GB 1 , GB 2 , ..., GB μ , ..., GB γ}, where the μth first spot information GBi ={JL μ , ZJ μ}.

[0165] The third acquisition distance prediction submodule is used to input GB into the trained prediction model and obtain the third acquisition distance JL output by the prediction model. 2 .

[0166] The third spot image acquisition submodule is used to control the image acquisition module in JL through the control module. 2 The image is collected at the corresponding position to obtain the third spot image TX of the laser to be detected. 2 .

[0167] Embodiment 4

[0168] Embodiment 4 of the present invention provides a non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the steps:

[0169] S100, obtaining a first light spot image set TX acquired by an image acquisition module 0 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ} and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL 1 , J.L. 2 , ..., JL μ , ..., JL γ} and TX 1 The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JL μ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 is the distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, where γ refers to the total number of first light spot images.

[0170] S200, TX 0 and TX 1Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH 1 , NH 2 ,……,NH μ ,……,NH γ} and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ Input to the reconstruction model, NH 1 By connecting TX 1 Input into the reconstructed model.

[0171] S300, according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ 1 , ZJ 2 ,……,ZJ μ ,……,ZJ γ} and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter.

[0172] S400 , fitting and obtaining an initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ.

[0173] S500, according to JL 1 and the initial contour curve to obtain JL 1 The corresponding predicted spot diameter JL 0 .

[0174] S600, if JL 0 =JL 1 , then the initial contour curve is determined to be the target contour curve corresponding to the laser to be detected.

[0175] S700, if JL 0 ≠JL 1 , then obtain the third spot image TX collected by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 .

[0176] S800, TX 2 Add to TX 0In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1 , TX 0 2 ,……,TX 0 μ ,……,TX 0 γ , TX 2} and the first collection distance update set JL 3 ={JL 1 , J.L. 2 , ..., JL μ , ..., JL γ , J.L. 2}, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained.

[0177] S900: Acquire the quality level of the laser to be detected according to the target profile curve.

[0178] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0179] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0180] Embodiment 5

[0181] A fifth embodiment of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium in the fourth embodiment of the present invention.

[0182] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A beam quality detection method, characterized in that: The beam quality detection method comprises: S100, obtaining a first light spot image set TX acquired by an image acquisition module 0 ={TX 0 1.TX 0 2, ..., TX 0 μ ,……,TX 0 γ } and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL1, JL2, ..., JL μ , ..., JL γ } and TX 1 The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JL μ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 The distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, γ refers to the total number of first spot images; S200, TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH1, NH2, ..., NH μ ,……,NH γ } and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ The NH 1 By connecting TX 1 The result obtained by inputting into the reconstructed model; S300, according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ1, ZJ2, ..., ZJ μ ,……,ZJ γ } and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter; S400, fitting and obtaining an initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ; S500, according to JL 1 and the initial contour curve, obtain JL 1 The corresponding predicted spot diameter JL 0 ; S600, if JL 0 =JL 1 , then determine that the initial contour curve is the target contour curve corresponding to the laser to be detected; S700, if JL 0 ≠JL 1 , then obtain the third spot image TX acquired by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 ; S800, TX 2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1.TX 0 2, ..., TX 0 μ ,……,TX 0 γ , TX 2 } and the first collection distance update set JL 3 ={JL1, JL2, ..., JL μ , ..., JL γ , J.L. 2 }, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained; S900: Acquire the quality level of the laser to be detected according to the target contour curve.

2. The beam quality detection method according to claim 1, characterized in that: The image acquisition module is arranged on the transmission path of the laser to be detected output by the laser to be detected, and is used to acquire a light spot image corresponding to the laser to be detected.

3. The beam quality detection method according to claim 1, characterized in that: S200 also includes the following steps: S210, for TX 0 and TX 1 Perform binarization and obtain TX 0 The corresponding first binary image set ER = {ER1, ER2, ..., ER μ , ..., ER γ } and TX 1 The corresponding second binary image ER 1 ; S220, ER and ER 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH1, NH2, ..., NH μ ,……,NH γ } and TX 1 The corresponding second fitting circle image NH 1 .

4. The beam quality detection method according to claim 1, characterized in that: The beam quality detection method further comprises: S1000, obtain the spot image sample set YB 1 ={YB 1 1. YB 1 2, ..., YB 1 ξ , ..., YB 1 τ }, YB 1 ξ refers to the ξth spot image sample, ξ=1, 2, …, τ, τ refers to the total number of spot image samples; S2000, YB 1 Input into the initial reconstruction model to obtain YB 1 The corresponding fitting circle image sample set YB 2 ={YB 2 1. YB 2 2, ..., YB 2 ξ , ..., YB 2 τ }, YB 1 ξ The corresponding fitting circle image sample sample YB 2 ξ By using YB 1 ξ obtained by inputting into the initial reconstruction model; S3000, according to YB 2 ξ , get YB 2 ξ The length L of the circumscribed rectangle corresponding to the fitted circle 1 ξ 、Width L 2 ξ and the area of ​​the fitted circle L 3 ξ ; S4000, for YB 1 ξ and YB 2 ξ Compare the pixels of YB 1 ξ and YB 2 ξ The corresponding pixel intersection ratio L 4 ξ ; S5000, according to L 1 ξ , L 2 ξ , L 3 ξ , L 4 ξ and the preset weight set ψ={ψ1,ψ2,ψ3}, obtain YB 1 ξ The corresponding second sub-loss SH ξ =ψ1×(L 1 ξ -L 2 ξ )+ψ2×(L 3 ξ -π×((L 1 ξ +L 2 ξ ) / 4)^2)+ψ3×L 4 ξ , where ψ1 refers to the first preset weight, ψ2 refers to the second preset weight, ψ3 refers to the third preset weight, and π refers to pi; S6000, traverse ξ=1,2,……,τ, and obtain the total loss of the second model SH=Σ ξ=1 τ (SH ξ ); S7000: Update the parameters of the initial reconstruction model according to SH until SH meets a preset second training condition, and obtain a trained reconstruction model.

5. The beam quality detection method according to claim 4, characterized in that: The preset second training condition refers to SH convergence.

6. The beam quality detection method according to claim 4, characterized in that: The preset second training condition refers to that SH is less than a preset second loss threshold.

7. The beam quality detection method according to claim 1, characterized in that: S700 also includes the following steps: S710, according to JL and ZJ, obtain the first light spot information set GB = {GB1, GB2, ..., GB μ , ..., GB γ }, where the μth first spot information GB i ={JL μ , ZJ μ }; S720, input GB into the trained prediction model to obtain the third acquisition distance JL output by the prediction model 2 ; S730, controlling the image acquisition module through the control module to 2 The image is collected at the corresponding position to obtain the third spot image TX of the laser to be detected. 2 .

8. A beam quality detection device, characterized in that: The beam quality detection device comprises: The first data acquisition module is used to acquire the first light spot image set TX acquired by the image acquisition module. 0 ={TX 0 1.TX 0 2, ..., TX 0 μ ,……,TX 0 γ } and the second spot image TX 1 , and TX 0 The corresponding first acquisition distance set JL = {JL1, JL2, ..., JL μ , ..., JL γ } and TX 1 The corresponding second acquisition distance JL 1 , where TX 0 μ refers to the μth first spot image, JL μ Refers to collecting TX 0 μ The distance between the image acquisition module and the laser to be detected, JL 1 Refers to collecting TX 1 The distance between the image acquisition module and the laser to be detected, μ=1, 2, ..., γ, γ refers to the total number of first spot images; Image reconstruction module, used to convert TX 0 and TX 1 Input into the trained reconstruction model and obtain TX 0 The corresponding first fitting circle image set NH = {NH1, NH2, ..., NH μ ,……,NH γ } and TX 1 The corresponding second fitting circle image NH 1 , where TX 0 μ The corresponding first fitting circle image NH μ By connecting TX 0 μ The NH 1 By connecting TX 1 The result obtained by inputting into the reconstructed model; The spot diameter acquisition module is used to obtain the light spot diameter according to NH and NH 1 , get TX 0 The corresponding first spot diameter set ZJ = {ZJ1, ZJ2, ..., ZJ μ ,……,ZJ γ } and TX 1 The corresponding second spot diameter, where ZJ μ TX 0 μ The corresponding first spot diameter; An initial profile curve fitting module is used to fit the initial profile curve of the laser to be detected output by the laser to be detected according to JL and ZJ; The spot diameter prediction module is used to predict the light spot diameter according to JL 1 and the initial contour curve, obtain JL 1 The corresponding predicted spot diameter JL 0 ; The first target contour curve acquisition module is used if JL 0 =JL 1 , then determine that the initial contour curve is the target contour curve corresponding to the laser to be detected; The second data acquisition module is used for 0 ≠JL 1 , then obtain the third spot image TX acquired by the image acquisition module 2 and TX 2 The corresponding third acquisition distance JL 2 ; The second target contour curve acquisition module is used to obtain TX 2 Add to TX 0 In the 2 Add to JL to get the first spot image update set TX 3 ={TX 0 1.TX 0 2, ..., TX 0 μ ,……,TX 0 γ , TX 2 } and the first collection distance update set JL 3 ={JL1, JL2, ..., JL μ , ..., JL γ , J.L. 2 }, and update TX 0 =TX 3 , update JL = JL 3 , repeat steps S200-S800 until the target contour curve corresponding to the laser to be detected is obtained; The quality grade acquisition module is used to acquire the quality grade of the laser to be detected according to the target contour curve.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the beam quality detection method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.