Near-field image parameter calculation method based on one-dimensional histogram curve gaussian fitting

By using a one-dimensional histogram curve Gaussian fitting method, the problem of decreased accuracy in near-field image parameter calculation caused by optical path instability of laser devices is solved, achieving high-precision modulation and contrast calculation, which is suitable for laser parameter measurement in large scientific facilities.

CN122265121APending Publication Date: 2026-06-23XIAN INST OF OPTICS & PRECISION MECHANICS CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN INST OF OPTICS & PRECISION MECHANICS CHINESE ACAD OF SCI
Filing Date
2026-02-10
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Due to the instability of the optical path of the laser device, the accuracy of near-field image parameter calculation decreases, resulting in problems such as poor uniformity, light jamming, rotation, and holes. Existing methods are unable to accurately calculate modulation and contrast.

Method used

A method based on Gaussian fitting of one-dimensional histogram curves is adopted. The background value and segmentation threshold of the near-field image are calculated to remove the background and perform binarization. The erosion and dilation algorithms are used to eliminate discrete points and discontinuous regions. Geometric feature parameters such as area, center coordinates and contrast are calculated.

Benefits of technology

It improves the accuracy of near-field image parameter calculation, ensures beam quality, protects optical components, and is suitable for laser parameter measurement in large scientific facilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265121A_ABST
    Figure CN122265121A_ABST
Patent Text Reader

Abstract

The application discloses a kind of near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting, solve the technical problem that the calculation precision of entire near-field image parameter (such as modulation, contrast) is reduced when calculating near-field image parameter in prior art due to the optical path of laser device is not enough stable, resulting in huge changes in laser parameter characteristics, including step 1, calculate the background value and segmentation threshold of original near-field image, and remove background and binarization processing are carried out to original near-field image;Step 2, obtain effective near-field parameter calculation area;Step 3, calculate geometric feature parameter, modulation and contrast.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for calculating near-field image parameters, specifically a method for calculating near-field image parameters based on Gaussian fitting of a one-dimensional histogram curve. Background Technology

[0002] The conventional measurement subsystem is mainly used to measure laser parameters such as energy, near-field distribution, far-field distribution, and temporal waveform at different locations (prevention, main amplifier, and target range) in the main optical path of the laser device. Among these, near-field distribution is a crucial indicator of beam quality, and whether the near-field image parameters meet the requirements directly determines the safety of optical components in the main amplifier and target range optical paths during the main emission phase. Therefore, the accurate extraction and interpretation of near-field image parameters is of paramount importance to the success of target practice.

[0003] In a conventional measurement subsystem, the laser parameters of the main optical path are measured by parameter measurement components at different locations along the optical path, such as energy, near-field distribution, far-field distribution, and time waveform. These parameters are obtained through detectors installed within the parameter measurement components, including an energy calorimeter, a scientific CCD camera, a far-field CCD camera, and an oscilloscope. The images acquired by the scientific CCD camera are 16-bit digital images with a size of 1024×1024. Using the digital images acquired by the scientific CCD camera as near-field images, specific near-field image parameter calculation methods are used to output corresponding near-field image parameters, such as modulation and contrast, to evaluate the near-field image quality.

[0004] With the gradual establishment of conventional measurement subsystems, the unstable optical path of the laser device has led to significant changes in the characteristics of laser parameters. Furthermore, for near-field image parameter calculations, new characteristics and problems have emerged in the near-field images, as detailed below:

[0005] 1) The uniformity distribution of the near-field image is poor, with some areas showing strong distribution and others showing weak distribution;

[0006] 2) The near-field image of certain optical paths of the laser device is prone to light jamming, resulting in missing edge areas in the near-field image;

[0007] 3) Due to insufficient installation precision of the scientific CCD camera or optical components, some near-field images may exhibit a certain degree of rotation.

[0008] 4) Damage to optical components in the optical path results in holes in some near-field images;

[0009] 5) Because the images captured by the scientific CCD camera are 16-bit digital images, the grayscale of the images is large, which requires more time to calculate the image histogram.

[0010] The aforementioned problems lead to a decrease in the accuracy of calculating all near-field image parameters (such as modulation and contrast) when using existing near-field image parameter calculation methods. Summary of the Invention

[0011] The purpose of this invention is to solve the technical problem in the prior art that the laser parameter characteristics change greatly due to the unstable optical path of the laser device, and the decrease in the calculation accuracy of the entire near-field image parameters (such as modulation and contrast) when using the existing near-field image parameter calculation method. This invention provides a near-field image parameter calculation method based on Gaussian fitting of a one-dimensional histogram curve.

[0012] To achieve the above objectives, the present invention adopts the following technical solution:

[0013] A method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting, characterized by the following steps:

[0014] Step 1: Calculate the background value and segmentation threshold of the original near-field image, and perform background removal and binarization on the original near-field image.

[0015] Read the raw near-field image The Gaussian fitting method is used to calculate the background value and segmentation threshold of the original near-field image. Based on the background value of the original near-field image, the background of the original near-field image is removed to obtain the near-field image after background removal. Based on the segmentation threshold of the original near-field image, the near-field image after background removal is binarized to obtain the binarized image.

[0016] Step 2: Obtain the effective near-field parameter calculation region

[0017] By employing erosion and dilation algorithms in digital morphological processing, discrete points in the edge region of the binarized image and discontinuous regions in the target region are eliminated, so that the edge region and the target region form connected regions with a gray value of 0 respectively, resulting in a connected region image with the largest area.

[0018] Next, the connected components with a gray value of 0 in the largest connected region image are removed to obtain the effective near-field parameter calculation region image. ;

[0019] Step 3: Calculate geometric characteristic parameters, modulation, and contrast.

[0020] Calculate the region image based on effective near-field parameters. The area, center coordinates, XY axis length, circumscribed rectangular region, modulation degree M, and contrast C of the original near-field image are calculated using a near-field image data processing unit, thus completing the near-field image parameter calculation based on Gaussian fitting of a one-dimensional histogram curve.

[0021] Furthermore, step 1 specifically includes:

[0022] Step 1.1: Read the original near-field image Generate a one-dimensional histogram curve with full grayscale;

[0023] Step 1.2: Divide the full grayscale one-dimensional histogram curve into a background region and a target region to obtain the full grayscale one-dimensional histogram curve of the background region and the full grayscale one-dimensional histogram curve of the target region. The number of grayscale levels in the background region is L.

[0024] Step 1.3: Remove the gray levels with 0 pixels from the one-dimensional histogram curve of the full gray levels of the target area to obtain the one-dimensional histogram curve of the effective gray levels of the target area, and determine the effective gray level number of the target area as F.

[0025] Step 1.4: Centering on the X-axis coordinate value corresponding to the peak value in the one-dimensional histogram curve of the effective grayscale levels of the target region, select P grayscale levels sequentially to the left and right of it to obtain the effective input region for Gaussian fitting of the target region. ;

[0026] Centered on the X-axis coordinate corresponding to the peak value of the one-dimensional histogram curve of the full grayscale of the background region, H grayscale levels are selected sequentially to the left and right of it to obtain the effective input region for Gaussian fitting of the background region. ;

[0027] Step 1.5: Perform Gaussian fitting on the effective gray levels within the effective input area of ​​the target region to obtain the Gaussian fitting curve of the target region, and obtain the peak value of the Gaussian fitting curve of the target region.

[0028] Gaussian fitting is performed on the one-dimensional histogram curve of the full grayscale within the effective input area of ​​the background region to obtain the Gaussian fitting curve of the background region, thus obtaining the background value of the original near-field image.

[0029] Step 1.6: Based on the background value of the original near-field image, remove the background from the original near-field image to obtain the near-field image after background removal;

[0030] Step 1.7: Multiply the peak value of the Gaussian fitted curve in the target region by... The obtained value is used as the segmentation threshold of the original near-field image, and the near-field image after background removal is binarized according to the segmentation threshold to obtain a binarized image.

[0031] Furthermore, in step 1.2, the number of gray levels L in the background area is 4-7% of the total number of gray levels in the one-dimensional histogram curve of the full gray levels.

[0032] Furthermore, in step 1.5, the background value of the original near-field image is the average number of pixels corresponding to all gray levels in the Gaussian fitting curve of the background region.

[0033] Furthermore, in step 3, the near-field image data processing unit is a connected component target parameter identification function.

[0034] Furthermore, in step 3, the specific process for calculating the modulation degree M and contrast ratio C is as follows:

[0035] Step S1: Obtain the original near-field image from Step 1. All grayscale values;

[0036] Step S2: Image in the effective near-field parameter calculation region. Select all pixels with a grayscale value of 255 and determine their coordinates. Coordinates of all pixels with a grayscale value of 255 Corresponding to the original near-field image In the middle, obtain all pixels with a grayscale value equal to 255. In the original near-field image The corresponding grayscale value Where i is the original near-field image The pixel numbers, i = 1, 2, ..., k, are partial numbers, and the value of k is related to the size of the original near-field image;

[0037] Step S3: Calculate the modulation intensity M and contrast ratio C. The calculation formulas are as follows:

[0038] ;

[0039] ;

[0040] in, grayscale value The maximum value in;

[0041] N is the image in the region where effective near-field parameters are calculated. The number of all pixels in the array whose grayscale value is equal to 255;

[0042] For N gray values The average value.

[0043] The beneficial effects of this invention are:

[0044] 1. This invention provides a method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting. First, the near-field image background and segmentation threshold are calculated using one-dimensional histogram curve Gaussian fitting. Background reduction and target separation are then performed on the near-field image. Background reduction removes background noise, and target separation separates the effective near-field region from the background region, i.e., binarization. Second, the target-separated image is binarized. Independent points are removed by erosion, and the maximum connected component is formed by dilation. The region after removing holes in the maximum connected component is the final effective near-field parameter calculation region. Then, based on the effective near-field calculation region, the area, center, XY axis length, and the maximum bounding rectangle region in the four directions (up, down, left, and right) are obtained. This allows for the detection of geometric feature parameters of the near-field image. The area is used to measure the effective aperture of the near-field image, the center is used to measure the directivity and stability of the near-field image, the horizontal and vertical axis lengths are used to determine whether the beam aperture is equal in the horizontal and vertical directions, and the bounding rectangle is used to determine the distribution area of ​​the beam aperture in the four directions (up, down, left, and right). Finally, the modulation and contrast of the near-field image are calculated based on the effective near-field parameter calculation area. This is of great significance for solving the problem of accurate measurement of near-field image parameters under special characteristics and the special law of the main laser field distribution of a certain laser device, and lays the foundation for the accurate measurement of laser parameters of large scientific devices in the future.

[0045] 2. This invention provides a method for calculating near-field image parameters based on Gaussian fitting of a one-dimensional histogram curve. Since modulation and contrast are important indicators of beam quality, beam quality not only determines the success or failure of large-scale laser target-hitting experiments but also ensures the safety of optical components. Obtaining a high-quality near-field beam distribution is one of the important goals of target-hitting experiments. The method involves multiplying the peak value of the Gaussian fitted curve in the target region by... The obtained value, and the corresponding X-direction value, are used as the segmentation threshold of the original near-field image, resulting in more accurate modulation and contrast of the calculated near-field image. Attached Figure Description

[0046] Figure 1 This is a flowchart of an embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention;

[0047] Figure 2 This is the original near-field image in step 1 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention;

[0048] Figure 3 This is the full grayscale one-dimensional histogram of the original near-field image in step 1 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention.

[0049] Figure 4This is a one-dimensional histogram of the target region in step 1 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention, wherein (a) is the one-dimensional histogram of the target region with full gray levels in step 1.2, and (b) is the one-dimensional histogram of the target region with effective gray levels in step 1.3.

[0050] Figure 5 This is a one-dimensional histogram of the target region in step 1 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention. Among them, (a) is the effective gray-level one-dimensional histogram within the effective input region of the target region Gaussian fitting in step 1.4; (b) is the Gaussian fitting curve of the target region in step 1.5, where the blue curve is the effective gray-level one-dimensional histogram within the effective input region of the target region Gaussian fitting, and the red curve is the Gaussian fitting curve of the target region.

[0051] Figure 6 This is a one-dimensional histogram of the background region in step 1 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention, wherein the red curve is the Gaussian fitting curve of the background region and the blue curve is the histogram curve of the background region.

[0052] Figure 7 This is a binarized image obtained in step 1 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention, wherein (a) is a binarized image with discrete points on the edge, and (b) is a binarized image with discontinuous regions in the target region;

[0053] Figure 8 This is the connected region image with the largest area obtained in step 2 of the embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention, wherein (a) is the discrete point image with the edge region eliminated, and (b) is the connected region with gray level of 0 formed by the central hole;

[0054] Figure 9 This invention employs an example of a near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting, along with three comparative methods. The method involves calculating 12 original near-field images (YFY2, YFY3, YFY4, YFZ2, YFZ3, YFZ4, ZFY2, ZFY3, ZFY4, ZFZ2, ZFZ3, and ZFZ4 are the file names corresponding to these images) acquired during the main emission phase of an experimental node of a laser device.

[0055] Figure 10 This is an embodiment of the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention, and a schematic diagram of the near-field image segmentation threshold Th selection position in three existing target separation methods. In the diagram, red represents the Gaussian curve and blue represents the original ZFT curve.

[0056] Figure 11 These are near-field images after known damage to optical components has been effectively masked. The images are compared before and after processing using the near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting of the present invention. (a) is the binarized image of the near-field image without removing the holes, and (b) is the binarized image of the near-field image after removing the holes. Detailed Implementation

[0057] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] like Figure 1-2 This embodiment uses a 16-bit scientific CCD image of 1024×1024 as the near-field image for illustration.

[0059] This invention provides a method for calculating near-field image parameters based on Gaussian fitting of a one-dimensional histogram curve, comprising the following steps:

[0060] Step 1: Calculate the background value and segmentation threshold of the original near-field image, and perform background removal and binarization on the original near-field image.

[0061] Read the raw near-field image The method employs Gaussian fitting to calculate the background value and segmentation threshold of the original near-field image. Based on the background value, the original near-field image is subjected to background removal to obtain a background-removed near-field image. Then, based on the segmentation threshold of the original near-field image, the background-removed near-field image is binarized to obtain a binarized image. Specifically, the method includes the following steps:

[0062] Step 1.1: Read the original near-field image ,like Figure 2 As shown, a one-dimensional histogram curve of all gray levels is generated, as follows. Figure 3 As shown;

[0063] Typically, a near-field image A one-dimensional histogram of the entire grayscale contains two peaks: the peak with the smaller X value corresponds to the background area, and the peak with the larger X value corresponds to the target area, such as... Figure 3As shown, the background region has a very large peak value (Y=7816) with a small corresponding X-coordinate (X=191), while the target region's peak value is much smaller (Y=615) with a larger corresponding X-coordinate (X=21320). This is because the 16-bit near-field grayscale maximum value is very high, requiring 1024×1024 pixels to fill 65535 grayscale levels. Each grayscale value is evenly distributed among 16 pixels, so the Y-axis of the one-dimensional histogram in the target region is generally not very high. Due to the large grayscale in the near-field image, with an image size of 1024×1024, many grayscale levels may correspond to 0 pixels, appearing as a jagged curve in the original full-grayscale one-dimensional histogram curve. Because the jagged curve is very dense, from Figure 3 As can be seen, the peaks of the target area are filled with blue vertical line segments.

[0064] Step 1.2: Divide the full grayscale one-dimensional histogram curve into a background region and a target region to obtain the full grayscale one-dimensional histogram curve of the background region and the full grayscale one-dimensional histogram curve of the target region. The number of gray levels in the background region is L, which is 4-7% of the total number of gray levels in the full grayscale one-dimensional histogram curve. In this embodiment, L is 2000, that is, the grayscale 0-2000 region is selected as the Gaussian fitting candidate region of the background region.

[0065] Step 1.3: Remove gray levels with 0 pixels from the one-dimensional histogram curve of the full gray levels of the target area to obtain the one-dimensional histogram curve of the effective gray levels of the target area. Determine the effective gray level number of the target area as F. In this embodiment, F=3200.

[0066] To remove the influence of gray levels with Y-direction values ​​of 0 on Gaussian fitting, these invalid gray level points need to be removed from the one-dimensional histogram, such as... Figure 4 As shown in (a), the one-dimensional histogram of the target area's full grayscale after removing the background, and after removing the grayscale values ​​corresponding to 0 in the Y direction, yields the effective grayscale one-dimensional histogram curve of the target area, as follows. Figure 4 As shown in (b). Figure 1 In the preprocessing stage, the one-dimensional histogram curves of effective gray levels are obtained, namely the one-dimensional histogram curve of effective gray levels of the target area and the one-dimensional histogram curve of full gray levels of the background area.

[0067] Step 1.4: Centering on the X-axis coordinate value corresponding to the peak value in the one-dimensional histogram curve of the effective grayscale levels of the target region, select P grayscale levels sequentially to the left and right of it to obtain the effective input region for Gaussian fitting of the target region. In this embodiment, P=500

[0068] for Figure 4(b) shows the effective grayscale one-dimensional histogram curve of the target region. Observation shows that the curve conforms to the characteristics of a Gaussian curve, but the waveforms on both sides of the peak are not very symmetrical. To satisfy the curve characteristics of Gaussian fitting, a symmetrical region is selected from the center of the peak to the left and right as the effective input region for Gaussian fitting. P=500 points are selected on both the left and right sides respectively, resulting in the effective grayscale one-dimensional histogram of the target region within the effective input region centered on the peak point, as shown below. Figure 5 As shown in (a).

[0069] Centered on the X-axis coordinate corresponding to the peak value of the one-dimensional histogram curve of the full grayscale of the background region, H grayscale levels are selected sequentially to the left and right of it to obtain the effective input region for Gaussian fitting of the background region. In this embodiment, H=300.

[0070] Step 1.5: Perform Gaussian fitting on the effective gray levels within the effective input area of ​​the target region to obtain the Gaussian fitting curve of the target region, and obtain the peak value of the Gaussian fitting curve of the target region.

[0071] Gaussian fitting is performed on the effective gray levels within the effective input region of the target region to obtain the Gaussian fitting curve for the target region, as shown below. Figure 5 As shown in (b), the blue curve is the effective grayscale one-dimensional histogram within the effective input region of the Gaussian fitting of the target region, and the red curve is the Gaussian fitting curve of the target region. The final fitting parameters are: a2=541.3373, b2=11.9129, c2=1479.9821, R0 2 =0.9745, where a2 is the peak value, b2 is the offset, c2 represents twice the variance, and R0 2 The coefficient of determination.

[0072] Gaussian fitting is performed on the one-dimensional histogram curve of all gray levels within the effective input region of the Gaussian fitting of the background region to obtain the Gaussian fitting curve of the background region, thus obtaining the background value of the original near-field image; the background value of the original near-field image is the mean of the number of pixels corresponding to all gray levels in the Gaussian fitting curve of the background region.

[0073] To satisfy the curve characteristics of Gaussian fitting, the X-axis coordinate value corresponding to the peak value in the effective gray-level one-dimensional histogram curve within the effective input region of the background region is used as the center position. Symmetrical regions are selected to the left and right as the effective input regions for Gaussian fitting, with 300 points selected on each side for Gaussian fitting. Figure 6 As shown, the blue curve is the histogram curve of the background region, and the red curve is the Gaussian fitting curve of the background region.

[0074] By performing Gaussian fitting on the one-dimensional histogram curve within the effective input region of the background region, the final fitting parameters are: a1=6700.7376, b1=6.1254, c1=68.2283, R0 2 =0.8423, where a1 is the peak value, b1 is the offset, c1 represents twice the variance, and R0 2 The determination coefficient is used to obtain the original near-field image background value μ=6.1254, which is used as the basis for subtracting the background noise from the original near-field image.

[0075] Step 1.6: Based on the background value of the original near-field image, remove the background from the original near-field image to obtain the near-field image after background removal;

[0076] Step 1.7: Multiply the peak value of the Gaussian fitted curve in the target region by... The obtained value is used as the segmentation threshold Th of the original near-field image in the X direction. The near-field image after removing the background is then binarized according to the segmentation threshold Th to obtain the binarized image.

[0077] First, Gaussian fitting is used to obtain the peak value a2; then, the peak value is searched in the Gaussian fitting curve of the target region. The corresponding grayscale value is used as the original near-field image segmentation threshold Th. For example, the peak value of the Gaussian fitting curve of the target region is a2=541.3373, and the peak value of the Gaussian fitting curve of the target region is... The multiple a3 = 541.3373 × =541.3373×0.1353=73.2620, then the X-direction value of the full grayscale one-dimensional Gaussian curve corresponding to a3 is the near-field image segmentation threshold Th, Th=19236. The near-field image after background removal is binarized using the threshold Th, as follows: Figure 7 As shown. Compared to far-field images, the target region in near-field images is more concentrated, and in high-quality near-field images, the target region is basically continuous. However, in the pre-emission stage, the energy of the near-field image is low, and the binarized image obtained by using the one-dimensional histogram Gaussian fitting method for target separation has many discrete points in the edge region, such as... Figure 7 As shown in (a), or if the target area contains small, discontinuous regions, such as... Figure 7 As shown in (b).

[0078] Step 2: Obtain the effective near-field parameter calculation region

[0079] Using erosion and dilation algorithms from digital morphological processing, discrete points in the edge regions of the binarized image and discontinuous regions in the target region are eliminated, so that the edge regions and target regions form connected components with a gray value of 0, resulting in the image of the connected component with the largest area (i.e., Figure 1(e.g., obtaining the largest BLOB region in the data); Figure 8 As shown, (a) is a discrete point image with the edge region removed, and (b) is a connected region with a gray level of 0 formed by the central hole.

[0080] Next, the connected components with a gray value of 0 in the largest connected region image are removed to obtain the effective near-field parameter calculation region image. ;

[0081] Step 3: Calculate geometric characteristic parameters, modulation, and contrast.

[0082] Calculate the region image based on effective near-field parameters. The area, center coordinates, XY axis length, circumscribed rectangular region, modulation degree M, and contrast C of the original near-field image are calculated using a near-field image data processing unit, thus completing the near-field image parameter calculation based on Gaussian fitting of a one-dimensional histogram curve.

[0083] The near-field image data processing unit is a connected component target parameter identification function.

[0084] The specific calculation process for modulation M and contrast C is as follows:

[0085] Step S1: Obtain the original near-field image from Step 1. All grayscale values;

[0086] Step S2: Image in the effective near-field parameter calculation region. Select all pixels with a grayscale value of 255 and determine their coordinates. Coordinates of all pixels with a grayscale value of 255 Corresponding to the original near-field image In the middle, obtain all pixels with a grayscale value equal to 255. In the original near-field image The corresponding grayscale value Where i is the original near-field image The pixel numbers are a subset of those numbers, i = 1, 2, ..., k, where the value of k is related to the size of the original near-field image; in this embodiment, k = 1024.

[0087] Step S3: Calculate the modulation intensity M and contrast ratio C. The calculation formulas are as follows:

[0088] ;

[0089] ;

[0090] in, grayscale value The maximum value in;

[0091] N is the image in the region where effective near-field parameters are calculated. The number of all pixels in the array whose grayscale value is equal to 255;

[0092] For N gray values The average value.

[0093] Typically, when near-field image quality is good, the near-field image is a square with rounded corners. Therefore, calculating the geometric features of the near-field image is the most intuitive and easily obtained parameter for evaluating it. The most common parameters include area, center coordinates, X and Y axis lengths, and the circumscribed rectangular region. Area measures the beam aperture of the near-field image; center coordinates measure the directivity and stability of the near-field image; X axis length is the difference between the maximum and minimum X coordinates of pixels with a grayscale value of 255 in the binarized image; Y axis length is the difference between the maximum and minimum Y coordinates of pixels with a grayscale value of 255 in the binarized image; and the circumscribed rectangular region is the rectangular area enclosed by the top-left and bottom-right corner coordinates of pixels with a grayscale value of 255 in the binarized image. The calculated... Figure 2 The geometric parameters of the original near-field image are as follows: area = 276671, center coordinates (545.077 461.067), X-axis length = 601, Y-axis length = 553, upper left coordinates of the circumscribed rectangular region are (232, 832), and lower right coordinates are (208, 760).

[0094] Modulation M and contrast C are the most important parameters for calculating near-field image quality. For high-quality near-field images, the traditional Maximum Inter-Class Variance (OSTU) method is very effective for target segmentation. However, due to the multiple optical paths, complex optical path design, and large energy range in the experimental stage of a certain laser device, the traditional OTU method has significant limitations in extracting the effective near-field parameter calculation area for target segmentation. To improve the calculation accuracy of modulation M and contrast C of near-field images of a certain laser device, two aspects need to be considered: 1) For near-field image segmentation algorithms, based on fully considering that the near-field image histogram conforms to a Gaussian distribution, a one-dimensional histogram curve Gaussian fitting is used to obtain the peak value in the Y direction of the Gaussian curve, and the peak value is selected. The value corresponding to the position X in the multiplier is used as the near-field image segmentation threshold Th; 2) In the process of obtaining the effective near-field parameter calculation region, the traditional algorithm selects the connected component with the largest area of ​​the binarized image as the effective near-field parameter calculation region. Due to the poor beam quality in the early stage of the construction of a certain laser device, holes often exist in the center of the target area of ​​the acquired image. In order to reduce the impact of hole regions on the modulation and contrast calculation accuracy, holes with a gray value of 0 need to be removed from the connected component, such as Figure 8As shown in (b), the effective near-field parameter calculation region is only the connected region with a grayscale value of 255. Original image Figure 2 and corresponding binarized image Figure 7 The near-field parameters calculated in (a) and (b) are: modulation M = 1.16076, contrast C = 0.0381666, and other relevant parameters: mean value = 21538.4, maximum gray value = 25001, minimum gray value = 0, and root mean square error RMS = 822.05. Near-field images with holes, such as... Figure 8 The near-field parameters calculated in (a) and (b) are: modulation M=1.16103, contrast C=0.0386467, other relevant parameters, mean value=21533.5, maximum gray value=25001, minimum gray value=0, and root mean square error RMS=832.198.

[0095] The repeatability accuracy of near-field image parameter calculation methods is one of the most fundamental means of evaluating the algorithm, aiming to verify its effectiveness, stability, and reliability in processing near-field images with different optical paths, energies, and measurement components. This paper analyzes the near-field image processing effects acquired by the pre-amplification and main-amplification measurement components during the main emission stage of a certain experimental node in a laser device. The experiment involved three emission runs: two pre-emission runs and one main emission run. Due to the high output energy, long optical path, numerous optical components passing through the beam, and greater energy attenuation during the main emission stage, the optical components have a greater impact on beam quality. Compared to the pre-emission stage, the measures taken to ensure beam quality in the near-field images acquired during the main emission stage are more difficult to guarantee, resulting in poorer near-field image quality. Therefore, the near-field images acquired during the main emission stage are more representative for verifying the Gaussian fitting method for near-field image parameter calculation.

[0096] like Figure 9 As shown, a total of 12 near-field images were acquired during the main launch phase: 6 from the pre-amplification measurement module and 6 from the main amplifier measurement module. The top row of 6 images are near-field images from the pre-amplification measurement module (YFY2, YFY3, YFY4, YFZ2, YFZ3, YFZ4), and the bottom row of 6 images are near-field images from the main amplifier measurement module (YFY2, YFY3, YFY4, ZFZ2, ZFZ3, ZFZ4).

[0097] The parameter calculation results of 12 near-field images using the OTU method are shown in Table 1. The input data values ​​(e.g., summation, mean and maximum values) for each pixel involved in the parameter calculation use the original image data (16 bits). The binarized image data (8 bits) is used to determine which pixel is involved in the calculation.

[0098] Table 1. Parameter calculation results for 12 near-field images

[0099]

[0100] contrast Figure 9 Based on the original images and the calculation results in Table 1, it can be seen that the edges of the pre-amplified near-field image are brighter than the center, indicating that the distribution of the pre-amplified near-field image is uneven. In terms of modulation, the modulation of the pre-amplified near-field image is generally larger than that of the main amplifier near-field image; four pre-amplified near-field images have a modulation greater than 2, and two have a modulation less than 2. In contrast, the maximum modulation of the main amplifier near-field image is 1.464, the minimum is 1.1998, and the average is 1.3196, indicating that the main amplifier near-field modulation is very good. Regarding contrast, the pre-amplified near-field image also generally has a higher contrast than the main amplifier near-field image, with an average contrast of 0.3271 compared to the main amplifier near-field image. Table 1 provides a quantitative measure of the near-field image quality of the pre-amplified and main amplifier measurement components.

[0101] The calculation results of the geometric feature parameters of the 12 near-field images are shown in Table 2.

[0102] Table 2. Calculation results of geometric feature parameters for 12 near-field images.

[0103]

[0104] A comparative analysis of near-field image parameter calculation methods based on one-dimensional histogram curve Gaussian fitting with other methods requires examining the effects of two measures—target separation and effective region selection—on near-field image modulation and contrast enhancement. The evaluation metrics for these enhancements are primarily whether the modulation and contrast values ​​are lower. Modulation is the ratio of the maximum value to the mean value of the effective region in the near-field image. Therefore, an ideal modulation value of 1 is unrealistic. Generally, near-field images with a modulation value greater than 1 and less than 1.2 are considered to be of high quality. When the modulation value is less than 1.2, a value closer to 1.1 represents the optimal modulation value achievable for the main emission target of a laser device.

[0105] For high-quality near-field images, the traditional target separation method is the Maximum Inter-Class Variance (OSTU) method. This method performs well for target segmentation in high-quality near-field images, but its performance is very limited for target segmentation in low-quality near-field images. Therefore, in order to fully consider the Gaussian distribution characteristics of the near-field image histogram, this invention proposes a near-field image parameter calculation method based on Gaussian fitting of a one-dimensional histogram curve. The comparison of the near-field image parameter calculation results of this method with other methods is shown in Table 3.

[0106] Table 3 Comparison of parameter calculation results for the four methods

[0107]

[0108] Table 3 shows the parameter calculation results for the last image in Table 1 using four methods. The first row shows the near-field image parameter calculation results using the OTU method. Figure 10 Point G in the middle represents the OTU threshold of 10491. The x-coordinate of this point is 10461-21316+1, and the y-coordinate is 15. The second, third, and fourth rows show the near-field image parameter calculation results based on Gaussian fitting of a one-dimensional histogram curve. All three methods use histograms for Gaussian fitting and use the peak value in the Y direction of the Gaussian curve obtained from the one-dimensional histogram Gaussian fitting as the basis for threshold selection. The difference lies in the threshold selection method. Method two involves... The value corresponding to the position in the X direction is used as the near-field image segmentation threshold Th, i.e. Figure 10 The location of point E is given by the x-coordinate of 18640-21316+1 and the y-coordinate of 83. Method three involves fitting a Gaussian curve. The value corresponding to the position in the X direction is used as the near-field image segmentation threshold Th, i.e. Figure 10 The location of point F is defined by its x-coordinate of 19236-21316+1 and y-coordinate of 73. In Method 4, the value corresponding to the X-direction of the location where the energy integral xs of the one-dimensional histogram curve > 0.865 (1.5 times the waist beam) is used as the near-field image segmentation threshold Th. Figure 10 The midpoint H is located at an x-coordinate of 16489-21316+1 and a y-coordinate of 27. Among the four methods, method three calculates the lowest modulation and contrast, with values ​​of 1.16076 and 0.0382, respectively. Method one calculates the highest modulation and contrast, with values ​​of 1.1998 and 0.0805, respectively. The modulation and contrast calculated by methods two and four fall between the two algorithms. Therefore, based on the near-field image parameter calculation method using one-dimensional histogram curve Gaussian fitting, method three is selected as the final method for achieving near-field image target separation during the near-field image parameter calculation process. Where 21316 is... Figure 4 (a) The x-axis corresponding to the peak value.

[0109] The positions of the thresholds obtained by the four target separation methods in the original one-dimensional histogram curve (blue) and the one-dimensional histogram Gaussian fitted curve (red) are as follows: Figure 10 As shown. By comparison Figure 10 The threshold values ​​of the four methods are analyzed in conjunction with the modulation and contrast calculation results in Table 3. This analysis shows that the threshold segmentation value is not necessarily larger or smaller, but rather that obtaining a smaller modulation and contrast value is an important indicator for evaluating the quality of near-field image target separation methods.

[0110] The analysis of the effects of effective region selection measures on near-field image modulation and contrast enhancement mainly addresses situations where holes exist in the target region of the near-field image, such as... Figure 8 As shown in (b). This is because the central region of a high-quality near-field image binarized into a single image completely lacks holes, making the binarized image identical to the effective near-field region image. In traditional near-field image effective region extraction algorithms, the effective region is the largest connected component region of the binarized region. This region includes the central hole portion. Due to the low grayscale value of the hole portion, the mean value of the entire connected component also decreases. When the maximum grayscale value (Maxvalue) remains unchanged, according to... Calculations show that the modulation index M becomes larger.

[0111] In real-world target practice, the target area in the near-field image is often damaged due to damage to a part of the optical element. To avoid damaging the optical components behind the light path, the known damage to the optical element needs to be effectively blocked. In this case, the optical element in the blocked area is opaque. To calculate the true modulation and contrast of other undamaged areas in the near-field image, it is necessary to remove the damaged area from the maximum connected component. The binarized images before and after hole removal are shown below. Figure 11 As shown.

[0112] Near-field image parameters before hole removal: Area = 360265, Maxvalue = 7929, Meanvalue = 2402.98, RMS = 991.756, Modulation M = 3.29965, Contrast C = 0.412718. Near-field image parameters after hole removal: Area = 341440, Maxvalue = 7929, Meanvalue = 2464.25, RMS = 982.771, Modulation M = 3.12761, Contrast C = 0.398811. Before and after removal, the modulation decreased from 3.29965 to 3.12761 (a reduction of 5.21%), and the contrast decreased from 0.412718 to 0.398811 (a reduction of 3.37%).

[0113] This demonstrates that when holes exist in the target region of a near-field image, removing the holes to obtain the effective region of the near-field image is highly effective in improving the modulation and contrast of the near-field image.

[0114] To address the problem that traditional methods cannot accurately obtain near-field image parameters of a laser device with poor quality, this invention proposes a near-field image parameter calculation method based on one-dimensional histogram curve Gaussian fitting. First, the near-field image background and segmentation threshold are calculated using one-dimensional histogram curve Gaussian fitting, and background reduction and target separation are performed on the near-field image respectively. Second, the target-separated image is binarized, and independent points are removed by erosion, followed by dilation to form the maximum connected component. The region within the maximum connected component after removing the punched-out area is the final effective near-field parameter calculation region. Then, within the effective near-field calculation region, the area, center, XY axis length, and the maximum bounding rectangle region in the four directions (up, down, left, and right) are obtained. Edge lines in the four directions are fitted, and the rotation of the near-field image is corrected based on the fitted edge curves. Finally, the near-field image modulation and contrast are calculated based on the effective near-field parameter calculation region. Experimental results show that this method is of great significance for solving the problem of accurate measurement of near-field image parameters under special characteristics and the special laws of the main laser field distribution of a certain laser device, laying the foundation for the accurate measurement of laser parameters of future large scientific devices.

[0115] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for calculating near-field image parameters based on Gaussian fitting of one-dimensional histogram curves, characterized in that, Includes the following steps: Step 1: Calculate the background value and segmentation threshold of the original near-field image, and perform background removal and binarization on the original near-field image. Read the raw near-field image The Gaussian fitting method is used to calculate the background value and segmentation threshold of the original near-field image. Based on the background value of the original near-field image, the background of the original near-field image is removed to obtain the near-field image after background removal. Based on the segmentation threshold of the original near-field image, the near-field image after background removal is binarized to obtain the binarized image. Step 2: Obtain the effective near-field parameter calculation region By employing erosion and dilation algorithms in digital morphological processing, discrete points in the edge region of the binarized image and discontinuous regions in the target region are eliminated, so that the edge region and the target region form connected regions with a gray value of 0 respectively, resulting in a connected region image with the largest area. Next, the connected components with a gray value of 0 in the largest connected region image are removed to obtain the effective near-field parameter calculation region image. ; Step 3: Calculate geometric characteristic parameters, modulation, and contrast. Calculate the region image based on effective near-field parameters. The area, center coordinates, XY axis length, circumscribed rectangular region, modulation degree M, and contrast C of the original near-field image are calculated using a near-field image data processing unit, thus completing the near-field image parameter calculation based on Gaussian fitting of a one-dimensional histogram curve.

2. The method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting according to claim 1, characterized in that, Step 1 is as follows: Step 1.1: Read the original near-field image Generate a one-dimensional histogram curve with full grayscale; Step 1.2: Divide the full grayscale one-dimensional histogram curve into a background region and a target region to obtain the full grayscale one-dimensional histogram curve of the background region and the full grayscale one-dimensional histogram curve of the target region. The number of grayscale levels in the background region is L. Step 1.3: Remove the gray levels with 0 pixels from the one-dimensional histogram curve of the full gray levels of the target area to obtain the one-dimensional histogram curve of the effective gray levels of the target area, and determine the effective gray level number of the target area as F. Step 1.4: Centering on the X-axis coordinate value corresponding to the peak value in the one-dimensional histogram curve of the effective grayscale levels of the target region, select P grayscale levels sequentially to the left and right of it to obtain the effective input region for Gaussian fitting of the target region. ; Centered on the X-axis coordinate corresponding to the peak value of the one-dimensional histogram curve of the full grayscale of the background region, H grayscale levels are selected sequentially to the left and right of it to obtain the effective input region for Gaussian fitting of the background region. ; Step 1.5: Perform Gaussian fitting on the effective gray levels within the effective input area of ​​the target region to obtain the Gaussian fitting curve of the target region, and obtain the peak value of the Gaussian fitting curve of the target region. Gaussian fitting is performed on the one-dimensional histogram curve of the full grayscale within the effective input area of ​​the background region to obtain the Gaussian fitting curve of the background region, thus obtaining the background value of the original near-field image. Step 1.6: Based on the background value of the original near-field image, remove the background from the original near-field image to obtain the near-field image after background removal; Step 1.7: Multiply the peak value of the Gaussian fitted curve in the target region by... The obtained value is used as the segmentation threshold of the original near-field image, and the near-field image after background removal is binarized according to the segmentation threshold to obtain a binarized image.

3. The method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting according to claim 2, characterized in that: In step 1.2, the number of gray levels L in the background area is 4-7% of the total number of gray levels in the one-dimensional histogram curve of the full gray levels.

4. The method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting according to claim 2, characterized in that: In step 1.5, the background value of the original near-field image is the average number of pixels corresponding to all gray levels in the Gaussian fitting curve of the background region.

5. The method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting according to claim 1, characterized in that: In step 3, the near-field image data processing unit is a connected component target parameter identification function.

6. The method for calculating near-field image parameters based on one-dimensional histogram curve Gaussian fitting according to claim 1, characterized in that, In step 3, the specific process for calculating the modulation degree M and contrast ratio C is as follows: Step S1: Obtain the original near-field image from Step 1. All grayscale values; Step S2: Image in the effective near-field parameter calculation region. Select all pixels with a grayscale value of 255 and determine their coordinates. Coordinates of all pixels with a grayscale value of 255 Corresponding to the original near-field image In the middle, obtain all pixels with a grayscale value equal to 255. In the original near-field image The corresponding grayscale value Where i is the original near-field image The pixel numbers, i = 1, 2, ..., k, are partial numbers, and the value of k is related to the size of the original near-field image; Step S3: Calculate the modulation intensity M and contrast ratio C. The calculation formulas are as follows: ; ; in, grayscale value The maximum value in; N is the image in the region where effective near-field parameters are calculated. The number of all pixels in the array whose grayscale value is equal to 255; For N gray values The average value.