Method and device for detecting roundness error of Wolter I-type focusing lens
By acquiring the defocused state image of the Wolter I-type focusing lens and performing Gaussian fit, the difficulty of evaluating lens roundness error is solved, and the accuracy of lens quality evaluation and angular resolution performance are improved.
Patent Information
- Application Number
- CN202510588154.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-08-26
AI Technical Summary
There is a lack of effective methods in the prior art to evaluate the roundness error of Wolter I-type focusing lenses, which affects its angular resolution performance.
By obtaining the defocused state image of the lens under visible light, determining the center coordinates of the spot, and converting the pixel points from the Cartesian coordinate system to the polar coordinate system, performing Gaussian fitting based on the grayscale value distribution, and counting the standard deviation to determine the circularity error.
The accurate evaluation of the roundness error of Wolter I-type focusing lenses is achieved, and the accuracy of lens quality evaluation and angular resolution performance are improved.
Smart Images

Figure CN120538440A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical detection of X-ray focusing lenses, and in particular to a method and device for detecting the roundness error of a Wolter I type focusing lens. Background Art
[0002] Due to their thin walls, Wolter I focusing lenses are inherently susceptible to deformation. Their angular resolution primarily depends on the difference between their surface shape and the theoretical surface shape. According to traditional theory, lens angular resolution can be divided into generatrix error and orthogonal roundness error. Based on the mold release process during the manufacturing of nickel-plated gold focusing lenses, roundness error has a dominant impact on the lens. Therefore, accurately evaluating the roundness of a focusing lens is crucial for evaluating its quality. However, currently, no specific evaluation scheme for the roundness error of Wolter I focusing lenses exists in the existing technology. Summary of the Invention
[0003] The embodiment of the present invention provides a method and device for detecting the roundness error of a Wolter I type focusing lens, so as to evaluate the roundness error of the Wolter I type focusing lens.
[0004] In a first aspect, an embodiment of the present invention provides a roundness error detection method for a Wolter I-type focusing lens, comprising: obtaining a defocus state image of the Wolter I-type focusing lens under visible light irradiation; determining the center coordinates of a light spot of the defocus state image in a rectangular coordinate system; converting each pixel point in the defocus state image from a rectangular coordinate system to a polar coordinate system with the center coordinates of the light spot as the origin, and determining a grayscale value distribution corresponding to different graduation values based on the grayscale value of each pixel point in the polar coordinate system; determining a peak center coordinate corresponding to each graduation value based on the grayscale value distribution corresponding to the different graduation values, and statistically analyzing the peak center coordinate distribution corresponding to each of the different graduation values, and obtaining a corresponding standard deviation by performing Gaussian fitting on the statistical results; and determining the roundness error of the Wolter I-type focusing lens based on the standard deviation.
[0005] In some embodiments, the determining of the peak center coordinates corresponding to each of the graduation values based on the grayscale value distribution corresponding to the different graduation values includes: for each of the grayscale value distribution corresponding to the graduation value, performing Gaussian fitting on the peak area in the grayscale value distribution corresponding to the graduation value, and determining the peak center coordinates corresponding to the graduation value based on the Gaussian fitting result.
[0006] In some embodiments, the determining of the center coordinates of the light spot of the defocused state image in the rectangular coordinate system includes: taking the center coordinates of the i-th light spot as the origin, converting each pixel point in the defocused state image from the rectangular coordinate system to the polar coordinate system, and determining the i-th grayscale value distribution corresponding to different graduation values based on the grayscale value of each pixel point in the polar coordinate system; wherein, i is a positive integer; when i=1, the center coordinates of the i-th light spot are determined based on the grayscale values of each pixel point in the defocused state image in the rectangular coordinate system; based on the i-th grayscale value distribution corresponding to the different graduation values, determining the i-th peak center corresponding to each graduation value coordinates; converting the i-th peak center coordinate corresponding to each of the graduation values into a rectangular coordinate system, and performing circle fitting on the converted i-th peak center coordinate to obtain the fitted i+1-th light spot center coordinate; if the difference between the i-th light spot center coordinate and the i+1-th light spot center coordinate is greater than or equal to a threshold, taking the i+1-th light spot center coordinate as the origin, continue to convert each pixel point in the defocused state image from a rectangular coordinate system to a polar coordinate system; if the difference between the i-th light spot center coordinate and the i+1-th light spot center coordinate is less than the threshold, determine the i-th light spot center coordinate as the light spot center coordinate.
[0007] As a possible implementation method, when i=1, the center coordinates of the i-th light spot are determined by the following steps: based on the grayscale value of each pixel point of the defocused state image in the rectangular coordinate system, determining the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis; based on the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis, determining the center coordinates of the i-th light spot.
[0008] In some embodiments, determining the center coordinates of the i-th light spot based on the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis includes: performing Gaussian fitting on the grayscale value distribution of the X-axis to obtain a peak horizontal coordinate based on the fitting; performing Gaussian fitting on the grayscale value distribution of the Y-axis to obtain a peak vertical coordinate based on the fitting; and determining the center coordinates of the i-th light spot based on the peak horizontal coordinate and the peak vertical coordinate.
[0009] In some embodiments, determining the roundness error of the Wolter I type focusing lens based on the standard deviation includes: multiplying the standard deviation by an error coefficient to determine the roundness error of the Wolter I type focusing lens.
[0010] In a second aspect, an embodiment of the present invention provides a roundness error detection device for a Wolter I type focusing lens, comprising: a first acquisition module for acquiring a defocus state image of the Wolter I type focusing lens under visible light irradiation; a first determination module for determining the center coordinates of a light spot of the defocus state image in a rectangular coordinate system; a second determination module for converting each pixel point in the defocus state image from a rectangular coordinate system to a polar coordinate system with the center coordinates of the light spot as the origin, and determining the grayscale value distribution corresponding to different graduation values based on the grayscale value of each pixel point in the polar coordinate system; a statistical module for determining the peak center coordinate corresponding to each graduation value based on the grayscale value distribution corresponding to the different graduation values, and performing statistics on the peak center coordinate distribution corresponding to each of the different graduation values, and obtaining the corresponding standard deviation by performing Gaussian fitting on the statistical results; and a third determination module for determining the roundness error of the Wolter I type focusing lens based on the standard deviation.
[0011] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the roundness error detection method of the Wolter I type focusing lens described in the first aspect is implemented.
[0012] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting the roundness error of the Wolter I type focusing lens described in the first aspect is implemented.
[0013] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the roundness error detection method of the Wolter I type focusing lens described in the first aspect.
[0014] The roundness error detection method and device of the Wolter I type focusing lens provided in the embodiment of the present invention obtains the defocus state image of the Wolter I type focusing lens under visible light irradiation; determines the center coordinates of the light spot of the defocus state image in a rectangular coordinate system; uses the center coordinates of the light spot as the origin, converts each pixel point in the defocus state image from the rectangular coordinate system to the polar coordinate system, and determines the grayscale value distribution corresponding to different scale values based on the grayscale value of each pixel point in the polar coordinate system; based on the grayscale value distribution corresponding to different scale values, determines the peak center coordinate corresponding to each scale value, and statistically analyzes the peak center coordinate distribution corresponding to each different scale value, obtains the corresponding standard deviation by Gaussian fitting the statistical results; and determines the roundness error of the Wolter I type focusing lens based on the standard deviation. The present invention realizes the detection of roundness error by statistically analyzing the peak center coordinates in the grayscale value distribution corresponding to different scale values, and then determining the roundness error of the Wolter I type focusing lens based on the Gaussian fitting standard deviation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 This is a flow chart of a method for detecting the roundness error of a Wolter I-type focusing lens provided by an embodiment of the present invention; Figure 2 Schematic diagram of the principle of obtaining a defocused image in an embodiment of the present invention; Figure 3 Schematic diagram of grayscale value distribution corresponding to the graduation value in an embodiment of the present invention; Figure 4 A second flow chart of a method for detecting roundness error of a Wolter I-type focusing lens provided by an embodiment of the present invention; Figure 5 A schematic structural diagram of a roundness error detection device for a Wolter I-type focusing lens provided by an embodiment of the present invention; Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0018] Due to their thin walls, Wolter I focusing lenses are inherently susceptible to deformation. Their angular resolution primarily depends on the difference between their surface shape and the theoretical surface shape. According to traditional theory, lens angular resolution can be divided into generatrix error and orthogonal roundness error. Based on the mold release process during the manufacturing of nickel-plated gold focusing lenses, roundness error has a dominant impact on the lens. Therefore, accurately evaluating the roundness of a focusing lens is crucial for evaluating its quality. However, currently, no specific evaluation scheme for the roundness error of Wolter I focusing lenses exists in the existing technology.
[0019] In order to solve the above technical problems, the present invention provides a method and device for detecting the roundness error of a Wolter I type focusing lens.
[0020] Figure 1 This is a flow chart of a method for detecting the roundness error of a Wolter I type focusing lens provided by an embodiment of the present invention. Figure 1 As shown, the method may include the following steps.
[0021] Step 101: Acquire a defocused image of a Wolter I-type focusing lens under visible light illumination.
[0022] In some embodiments, as Figure 2 As shown, a visible light parallel light source can be irradiated along the parabola of the Wolter I type focusing lens, and a camera can be used to capture the defocused state image of the Wolter I type focusing lens under visible light irradiation at the defocused collection point on the other side.
[0023] Step 102: Determine the center coordinates of the light spot of the defocused image in a rectangular coordinate system.
[0024] The center coordinates of the light spot of the defocused image in the rectangular coordinate system refer to the coordinates of the center position of the light spot in the defocused image when the rectangular coordinate system is established for the defocused image.
[0025] In some embodiments, the center coordinates of the light spot of the defocused image in the rectangular coordinate system can be determined by multiple iterative fittings, or can be achieved through image recognition technology of a neural network model, or can be achieved through other technical means.
[0026] Step 103 : Taking the center coordinates of the light spot as the origin, each pixel in the defocused image is converted from a rectangular coordinate system to a polar coordinate system, and based on the grayscale value of each pixel in the polar coordinate system, the grayscale value distribution corresponding to different graduation values is determined.
[0027] In some embodiments, the process of converting each pixel point in the out-of-focus state image from a rectangular coordinate system to a polar coordinate system with the coordinates of the center of the light spot as the origin includes: determining the distance between the coordinates of each pixel point in the in-focus state image and the coordinates of the center of the light spot, as well as the angle between the line connecting each pixel point and the center of the light spot and the x-axis in the rectangular coordinate system, and converting the rectangular coordinate system coordinates of each pixel point into polar coordinates consisting of distance and angle.
[0028] In some embodiments, different graduation values can be pre-divided, and each graduation value refers to an angle under polar coordinates. For example, 360 graduation values can be divided, namely 1°, 2°, 3°, ..., 360°. The grayscale value distribution corresponding to each graduation value refers to the grayscale value distribution of each pixel point at different distances whose angle in the coordinates is the graduation value. The grayscale value distribution corresponding to each graduation value can be the corresponding relationship between the distance and the grayscale value under the graduation value. As an example, for each graduation value, the corresponding relationship between the distance coordinate and the grayscale value of each pixel point under the graduation value in the polar coordinate system is determined as the grayscale value distribution corresponding to the graduation value.
[0029] Step 104 : Based on the grayscale value distribution corresponding to different scale values, determine the peak center coordinates corresponding to each scale value, perform statistics on the peak center coordinate distribution corresponding to different scale values, and obtain the corresponding standard deviation by performing Gaussian fitting on the statistical results.
[0030] In some embodiments, based on the grayscale value distribution corresponding to different graduation values, the implementation process of determining the peak center coordinates corresponding to each graduation value may include: for the grayscale value distribution corresponding to each graduation value, the distance can be used as the horizontal coordinate and the grayscale value can be used as the vertical coordinate. The grayscale value distribution corresponding to the graduation value is expressed as a line graph formed by connecting different points in the coordinate system, and then the line graph is fitted into a smooth curve. The coordinates corresponding to the peak value in the fitted smooth curve are used as the peak center coordinates corresponding to the graduation value.
[0031] As a possible implementation, Figure 3As shown, based on the grayscale value distribution corresponding to different scale values, determining the peak center coordinates corresponding to each scale value includes: for the grayscale value distribution corresponding to each scale value, performing Gaussian fitting on the peak area in the grayscale value distribution corresponding to the scale value, and determining the peak center coordinates corresponding to the scale value based on the Gaussian fitting result. The peak area in the grayscale value distribution can be an area where the grayscale value is significantly higher than the grayscale values corresponding to other distance values, and the peak area can be determined based on the rate of change of the grayscale value. The grayscale value distribution corresponding to each scale value is converted into a smooth curve through Gaussian fitting, and the coordinates corresponding to the grayscale value peak in the curve are used as the peak center coordinates.
[0032] It should be noted that the peak center coordinates are coordinates in a polar coordinate system, including distance coordinate values and their corresponding graduation values (angle coordinate values).
[0033] The process of statistically analyzing the distribution of peak center coordinates corresponding to different graduation values refers to the distribution of the distance coordinate values within each peak center coordinate, that is, the number of peak centers corresponding to each distance coordinate value. It is understood that the roundness of the Wolter I focusing lens affects the shape of the light spot, and therefore affects the center position of the light spot at different angles. Therefore, the distribution of the peak center coordinates is statistically analyzed to characterize the distribution of the center position of the light spot at different angles, and the standard deviation obtained by Gaussian fitting is used to characterize the deviation of the center position of the light spot at different angles.
[0034] Step 105 : determining the roundness error of the Wolter I type focusing lens based on the standard deviation.
[0035] In some embodiments, the roundness error of the Wolter I focusing lens can be determined based on actual needs by multiplying the standard deviation by the error coefficient. Based on the diameter at 50% energy defined by angular resolution, the error coefficient for the roundness error is determined to be 1.33. That is, the roundness error of the Wolter I focusing lens is the product of 1.33 and the standard deviation.
[0036] According to an embodiment of the present invention, a roundness error detection method for a Wolter I type focusing lens is provided. The method comprises the following steps: obtaining a defocus state image of the Wolter I type focusing lens under visible light irradiation; determining the center coordinates of the light spot of the defocus state image in a rectangular coordinate system; using the center coordinates of the light spot as the origin, converting each pixel point in the defocus state image from a rectangular coordinate system to a polar coordinate system, and determining the grayscale value distribution corresponding to different scale values based on the grayscale value of each pixel point in the polar coordinate system; determining the peak center coordinate corresponding to each scale value based on the grayscale value distribution corresponding to the different scale values, and statistically analyzing the peak center coordinate distribution corresponding to each different scale value, obtaining the corresponding standard deviation by Gaussian fitting the statistical results; and determining the roundness error of the Wolter I type focusing lens based on the standard deviation. The present invention realizes the detection of roundness error by statistically analyzing the peak center coordinates in the grayscale value distribution corresponding to different scale values, and then determining the roundness error of the Wolter I type focusing lens based on the Gaussian fitting standard deviation.
[0037] Figure 4 This is a second flow chart of a method for detecting the roundness error of a Wolter I type focusing lens provided by an embodiment of the present invention. Figure 4 As shown, based on the above embodiment, Figure 1 The implementation process of step 102 may include the following steps.
[0038] Since the defocused light spot of the focusing lens is affected by the diffraction of visible light, there will be deviations when the position of the center of the light spot is directly determined by circle fitting. Therefore, in order to eliminate the influence of visible light diffraction and improve the accuracy of the obtained roundness standard deviation, the embodiment of the present invention is achieved through multiple iterations.
[0039] Step 401: With the center coordinates of the i-th light spot as the origin, each pixel in the defocused image is converted from a rectangular coordinate system to a polar coordinate system, and based on the grayscale values of each pixel in the polar coordinate system, the i-th grayscale value distribution corresponding to different graduation values is determined; wherein, i is a positive integer; when i=1, the center coordinates of the i-th light spot are determined based on the grayscale values of each pixel in the defocused image in the rectangular coordinate system.
[0040] The i-th spot center is the spot center determined in the i-th iteration. That is, in each iteration, the most recently determined spot center coordinates are used as the origin to transform each pixel in the defocused image from a rectangular coordinate system to a polar coordinate system.
[0041] In some embodiments, the different scale values may be consistent with the scale values in the above-described embodiments. The process of determining the i-th grayscale value distribution corresponding to different scale values based on the grayscale values of each pixel point in the polar coordinate system includes: for each scale value, based on the grayscale values of each pixel point in the current polar coordinate system, determining the correspondence between the distance coordinates and the grayscale values of each pixel point in the current polar coordinate system at the scale value, and using the correspondence as the i-th grayscale value distribution corresponding to the scale value.
[0042] In some embodiments, when i=1, the center coordinates of the i-th light spot are determined based on the grayscale value of each pixel point of the defocused image in a rectangular coordinate system, specifically including the following steps.
[0043] Step S1 : determining the grayscale value distribution of the X axis and the grayscale value distribution of the Y axis based on the grayscale value of each pixel in the defocused state image in a rectangular coordinate system.
[0044] In some embodiments, the defocused image in a rectangular coordinate system is projected onto the X-axis by adding or averaging the grayscale values of all pixels with the same x-value to obtain a grayscale value distribution along the X-axis. The defocused image in a rectangular coordinate system is projected onto the Y-axis by adding or averaging the grayscale values of all pixels with the same Y-value to obtain a grayscale value distribution along the Y-axis. The grayscale value distribution along the X-axis and the grayscale value distribution along the Y-axis can each be a single curve. For example, the grayscale value distribution curve along the X-axis can be a curve with the X-value on the horizontal axis and the grayscale value on the vertical axis.
[0045] Step S2: determining the center coordinates of the i-th light spot based on the grayscale value distribution of the X axis and the grayscale value distribution of the Y axis.
[0046] In some embodiments, the peak coordinates in the grayscale value distribution on the X axis and the peak coordinates in the grayscale value distribution on the Y axis may be used as the center coordinates of the i-th light spot.
[0047] As a possible implementation method, the process of determining the center coordinates of the i-th light spot based on the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis includes: performing Gaussian fitting on the grayscale value distribution of the X-axis to obtain the peak horizontal coordinate based on the fitting; performing Gaussian fitting on the grayscale value distribution of the Y-axis to obtain the peak vertical coordinate based on the fitting; and determining the center coordinates of the i-th light spot based on the peak horizontal coordinate and the peak vertical coordinate.
[0048] Step 402 : Based on the distribution of the i-th grayscale values corresponding to different graduation values, determine the center coordinates of the i-th peak corresponding to each graduation value.
[0049] In some embodiments, based on the i-th grayscale value distribution corresponding to different graduation values, determining the center coordinates of the i-th peak corresponding to each graduation value includes: for the i-th grayscale value distribution corresponding to each graduation value, performing Gaussian fitting on the peak area in the i-th grayscale value distribution corresponding to the graduation value, and determining the center coordinates of the i-th peak corresponding to the graduation value based on the Gaussian fitting result. The peak area in the i-th grayscale value distribution can be an area where the grayscale value is significantly higher than the grayscale values corresponding to other distance values, and the peak area can be determined based on the rate of change of the grayscale value. The i-th grayscale value distribution corresponding to each graduation value is converted into a smooth curve through Gaussian fitting, and the coordinates corresponding to the grayscale value peak in the smooth curve are used as the center coordinates of the i-th peak.
[0050] Step 403 : converting the i-th peak center coordinate corresponding to each graduation value into a rectangular coordinate system, and performing circle fitting on the converted i-th peak center coordinate to obtain the fitted i+1-th spot center coordinate.
[0051] In some embodiments, the process of converting the center coordinates of the i-th peak corresponding to each graduation value into a rectangular coordinate system includes: for the center coordinates of the i-th peak corresponding to the graduation value a (a, r), where r is the distance in polar coordinates, the center coordinates of the i-th light spot (xi, yi), converting the center coordinates of the i-th peak (a, r) into coordinates in the rectangular coordinate system as (rcosa+xi,rsina+yi).
[0052] It can be understood that after the i-th peak center coordinates of each scale value are converted, a corresponding rectangular coordinate system coordinate is obtained. Since these peak centers are calculated at different scale values, the i-th peak center coordinates can be fitted with a circle, and the center coordinates of the fitted circle are used as the center coordinates of the i+1th spot.
[0053] Step 404: If the difference between the center coordinates of the i-th light spot and the center coordinates of the (i+1)-th light spot is greater than or equal to the threshold, each pixel in the defocused image is further converted from the rectangular coordinate system to the polar coordinate system with the center coordinates of the (i+1)-th light spot as the origin.
[0054] Step 405: If the difference between the center coordinates of the i-th light spot and the center coordinates of the (i+1)-th light spot is less than a threshold, the center coordinates of the i-th light spot are determined as the center coordinates of the light spot.
[0055] That is to say, if the difference between the center coordinates of the light spot obtained by two consecutive iterations is less than the threshold, it means that the center coordinates of the light spot obtained have eliminated the influence of visible light diffraction, and the center coordinates of the i-th light spot can be determined as the final center coordinates of the light spot; if the difference between the center coordinates of the light spot obtained by two consecutive iterations is large, it means that the influence of visible light diffraction has not been eliminated, and it is necessary to continue iteration, that is, set i to i+1, and return to step 401 until the difference between the center coordinates of the light spot obtained by two consecutive iterations is less than the threshold.
[0056] It should be noted that, in combination with the above embodiment, if the process of determining the center coordinates of the light spot of the defocused image in the rectangular coordinate system is implemented through the above steps 401 to 405, then Figure 1 The grayscale value distribution corresponding to the different scale values in step 103 and the peak center coordinates corresponding to each scale value in step 104 can both directly use the i-th grayscale value distribution corresponding to the different scale values and the i-th peak center coordinates corresponding to each scale value from the last iteration. In other words, if the difference between the i-th spot center coordinate and the (i+1)-th spot center coordinate is less than a threshold, the i-th peak center coordinate distribution corresponding to each scale value obtained in the current iteration is directly statistically analyzed, and the corresponding standard deviation is obtained by Gaussian fitting the statistical results. Based on the standard deviation, the roundness error of the Wolter I focusing lens is determined.
[0057] According to the roundness error detection method of the Wolter I focusing lens according to the embodiment of the present invention, the influence of visible light diffraction is eliminated through multiple fitting iterations to improve the accuracy of the determined center coordinates of the light spot, thereby improving the accuracy of the standard deviation and the accuracy of the roundness error determination.
[0058] The following describes a roundness error detection device for a Wolter I type focusing lens provided by an embodiment of the present invention. The roundness error detection device for a Wolter I type focusing lens described below and the roundness error detection method for a Wolter I type focusing lens described above can be referenced to each other.
[0059] Figure 5 Schematic diagram of the structure of the roundness error detection device of the Wolter I type focusing lens provided by the embodiment of the present invention. Figure 5As shown, the apparatus includes: a first acquisition module 510, a first determination module 520, a second determination module 530, a statistics module 540, and a third determination module 550. The first acquisition module 510 is used to acquire a defocus state image of the Wolter I type focusing lens under visible light illumination; the first determination module 520 is used to determine the center coordinates of the light spot of the defocus state image in a rectangular coordinate system; the second determination module 530 is used to convert each pixel point in the defocus state image from a rectangular coordinate system to a polar coordinate system with the center coordinates of the light spot as the origin, and determine the grayscale value distribution corresponding to different scale values based on the grayscale value of each pixel point in the polar coordinate system; the statistics module 540 is used to determine the peak center coordinate corresponding to each scale value based on the grayscale value distribution corresponding to the different scale values, and statistically analyze the peak center coordinate distribution corresponding to each of the different scale values, and obtain the corresponding standard deviation by performing Gaussian fitting on the statistical results; the third determination module 550 is used to determine the roundness error of the Wolter I type focusing lens based on the standard deviation.
[0060] In some embodiments, the statistics module 540 is specifically used to: perform Gaussian fitting on the peak area of the grayscale value distribution corresponding to each graduation value, and determine the peak center coordinates corresponding to the graduation value based on the Gaussian fitting result.
[0061] In some embodiments, the first determination module 520 is specifically used to: take the center coordinates of the i-th light spot as the origin, convert each pixel point in the defocused state image from the rectangular coordinate system to the polar coordinate system, and determine the i-th grayscale value distribution corresponding to different graduation values based on the grayscale value of each pixel point in the polar coordinate system; wherein, i is a positive integer; when i=1, the center coordinates of the i-th light spot are determined based on the grayscale values of each pixel point in the defocused state image in the rectangular coordinate system; based on the i-th grayscale value distribution corresponding to the different graduation values, determine the center coordinates of the i-th peak corresponding to each graduation value; each of the The center coordinates of the i-th peak corresponding to the graduation value are converted to the rectangular coordinate system, and the converted center coordinates of the i-th peak are circularly fitted to obtain the fitted center coordinates of the i+1-th light spot; if the difference between the center coordinates of the i-th light spot and the center coordinates of the i+1-th light spot is greater than or equal to the threshold, the center coordinates of the i+1-th light spot are used as the origin, and each pixel point in the defocused state image continues to be converted from the rectangular coordinate system to the polar coordinate system; if the difference between the center coordinates of the i-th light spot and the center coordinates of the i+1-th light spot is less than the threshold, the center coordinates of the i-th light spot are determined as the center coordinates of the light spot.
[0062] In some embodiments, the first determination module 520 is further used to: when i=1, determine the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis based on the grayscale value of each pixel point in the defocused state image in the rectangular coordinate system; determine the center coordinates of the i-th light spot based on the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis.
[0063] In some embodiments, the first determination module 520 is further used to: perform Gaussian fitting on the grayscale value distribution of the X-axis to obtain a peak horizontal coordinate based on the fitting; perform Gaussian fitting on the grayscale value distribution of the Y-axis to obtain a peak vertical coordinate based on the fitting; and determine the center coordinates of the i-th light spot based on the peak horizontal coordinate and the peak vertical coordinate.
[0064] In some embodiments, the third determination module is specifically configured to determine the product of the standard deviation and the error coefficient as the roundness error of the Wolter I type focusing lens.
[0065] According to an embodiment of the present invention, a roundness error detection method for a Wolter I type focusing lens comprises the following steps: obtaining a defocus state image of a Wolter I type focusing lens under visible light illumination by a first acquisition module; determining the center coordinates of the light spot of the defocus state image in a rectangular coordinate system by a first determination module; converting each pixel in the defocus state image from a rectangular coordinate system to a polar coordinate system with the center coordinates of the light spot as the origin by a second determination module, and determining the grayscale value distribution corresponding to different scale values based on the grayscale value of each pixel in the polar coordinate system; determining the peak center coordinate corresponding to each scale value based on the grayscale value distribution corresponding to different scale values by a statistical module, and performing statistics on the peak center coordinate distribution corresponding to each scale value, and obtaining the corresponding standard deviation by performing Gaussian fitting on the statistical results; and determining the roundness error of the Wolter I type focusing lens based on the standard deviation by a third determination module. The present invention achieves roundness error detection by performing statistics on the peak center coordinates in the grayscale value distribution corresponding to different scale values and then determining the roundness error of the Wolter I type focusing lens based on the Gaussian fitting standard deviation.
[0066] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call a computer program in the memory 630 to execute the steps of the roundness error detection method for a Wolter I-type focusing lens provided in the above-mentioned embodiments.
[0067] Furthermore, the logic instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0068] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the roundness error detection method of the Wolter I type focusing lens provided in the above embodiments.
[0069] On the other hand, an embodiment of the present invention further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable a processor to execute the steps of the roundness error detection method of the Wolter I type focusing lens provided in the above embodiments.
[0070] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs)), etc.
[0071] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0072] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for detecting the roundness error of a Wolter I type focusing lens, characterized in that: include: Acquire a defocused image of the Wolter I-type focusing lens under visible light illumination; Determining the center coordinates of the spot of the defocused image in a rectangular coordinate system; Taking the center coordinates of the light spot as the origin, converting each pixel in the defocused state image from a rectangular coordinate system to a polar coordinate system, and determining the grayscale value distribution corresponding to different graduation values based on the grayscale value of each pixel in the polar coordinate system; Based on the grayscale value distribution corresponding to the different graduation values, determining the peak center coordinates corresponding to each of the graduation values, and statistically analyzing the distribution of the peak center coordinates corresponding to each of the different graduation values, and obtaining the corresponding standard deviation by performing Gaussian fitting on the statistical results; Based on the standard deviation, the roundness error of the Wolter I type focusing lens is determined.
2. The method according to claim 1, characterized in that The determining, based on the grayscale value distribution corresponding to the different graduation values, the peak center coordinates corresponding to each graduation value includes: For the grayscale value distribution corresponding to each of the graduation values, Gaussian fitting is performed on the peak area in the grayscale value distribution corresponding to the graduation value, and based on the Gaussian fitting result, the peak center coordinates corresponding to the graduation value are determined.
3. The method according to claim 1, characterized in that Determining the spot center coordinates of the defocused state image in a rectangular coordinate system includes: Taking the center coordinates of the i-th light spot as the origin, convert each pixel in the defocused state image from a rectangular coordinate system to a polar coordinate system, and determine the i-th grayscale value distribution corresponding to different graduation values based on the grayscale values of each pixel in the polar coordinate system; where i is a positive integer; when i=1, the center coordinates of the i-th light spot are determined based on the grayscale values of each pixel in the defocused state image in the rectangular coordinate system; Based on the i-th grayscale value distribution corresponding to the different graduation values, determining the center coordinates of the i-th peak corresponding to each of the graduation values; The center coordinates of the i-th peak corresponding to each of the graduation values are converted into a rectangular coordinate system, and the converted center coordinates of the i-th peak are subjected to circle fitting to obtain the fitted center coordinates of the i+1-th light spot; If the difference between the center coordinates of the i-th light spot and the center coordinates of the (i+1)-th light spot is greater than or equal to a threshold, continue converting each pixel point in the defocused state image from a rectangular coordinate system to a polar coordinate system with the center coordinates of the (i+1)-th light spot as the origin; If the difference between the center coordinates of the i-th light spot and the center coordinates of the (i+1)-th light spot is smaller than the threshold, the center coordinates of the i-th light spot are determined as the center coordinates of the light spot.
4. The method according to claim 3, characterized in that When i=1, the center coordinates of the i-th light spot are determined by the following steps: Determining the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis based on the grayscale value of each pixel point of the defocused state image in a rectangular coordinate system; The center coordinates of the i-th light spot are determined based on the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis.
5. The method according to claim 4, characterized in that The determining the center coordinates of the i-th light spot based on the grayscale value distribution of the X-axis and the grayscale value distribution of the Y-axis includes: Performing Gaussian fitting on the grayscale value distribution of the X-axis to obtain a peak position abscissa based on the fitting; Performing Gaussian fitting on the grayscale value distribution of the Y axis to obtain a peak position ordinate based on the fitting; The center coordinates of the i-th light spot are determined based on the peak position abscissa and the peak position ordinate.
6. The method according to any one of claims 1 to 5, characterized in that Determining the roundness error of the Wolter I type focusing lens based on the standard deviation includes: The product of the standard deviation and the error coefficient is determined as the roundness error of the Wolter I type focusing lens.
7. A roundness error detection device for a Wolter I type focusing lens, characterized in that: include: A first acquisition module is used to acquire a defocus state image of the Wolter I type focusing lens under visible light irradiation; A first determining module is used to determine the center coordinates of the spot of the defocused image in a rectangular coordinate system; a second determining module, configured to convert each pixel point in the defocused state image from a rectangular coordinate system to a polar coordinate system with the coordinates of the center of the light spot as the origin, and determine the grayscale value distribution corresponding to different graduation values based on the grayscale value of each pixel point in the polar coordinate system; a statistical module, configured to determine the peak center coordinates corresponding to each of the graduation values based on the grayscale value distributions corresponding to the different graduation values, perform statistical analysis on the peak center coordinate distributions corresponding to the different graduation values, and obtain the corresponding standard deviation by performing Gaussian fitting on the statistical results; The third determining module is configured to determine the roundness error of the Wolter I type focusing lens based on the standard deviation.
8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the roundness error detection of the Wolter I type focusing lens according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the roundness error detection of the Wolter I type focusing lens according to any one of claims 1 to 6 is realized.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the roundness error detection of the Wolter I type focusing lens according to any one of claims 1 to 6 is realized.