Grating image target positioning optimization, wavelength characteristic analysis method and device
Through the combination of density centroid method and Gaussian surface fitting method, it solves the difficult recognition problem of traditional raster image target positioning algorithm under asymmetric image and noise interference, achieves more accurate spot center extraction and three-dimensional feature analysis, and improves spectral Identification and measurement accuracy.
Patent Information
- Application Number
- CN202111059003.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-09-10
AI Technical Summary
The traditional grating image target positioning algorithm has shortcomings in detection speed, interference resistance and accuracy. Especially when asymmetric grating images and background noise interfere, it is difficult to accurately identify the spot center, affecting high-precision spectrum recognition and measurement.
The combined method of density centroid method and Gaussian surface fitting method is used for raster image preprocessing and feature extraction. The density centroid method is used for grayscale and denoising processing. The Gaussian surface fitting method extracts the spot center and image quality parameters, and calculates the half of the spot. Height, width and bias angle are used to calibrate the mechanical platform and update the dispersion model, calibrating the relationship between wavelength and position.
It improves the accuracy and detection precision of raster image target recognition, enhances light spot feature extraction, improves system performance, lays a good foundation for multi-band characteristic analysis of light sources, and reduces system errors and error calibration.
Smart Images

Figure CN113935948B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and a device for analyzing target positioning optimization and wavelength characteristics based on grating images, and belongs to the technical field of photoelectric testing. Background Art
[0002] In terms of image recognition technology, there are currently a variety of sub-pixel extraction methods for the center of the light spot. Commonly used methods include single methods such as the center method, centroid method and fitting method. The fitting methods mainly include polynomial fitting, Gaussian surface fitting and ellipse fitting, etc. There are also combined methods that use several single methods together, such as the combination of cross-correlation and Gaussian surface fitting.
[0003] Traditional target positioning algorithms each have certain deficiencies in detection speed, anti-interference and accuracy. Among them, the traditional centroid method can be regarded as a weighted method with grayscale as the weight. Only targets with symmetrical grayscale distribution can achieve ideal results. Due to the asymmetry of some grating images caused by the optical imaging characteristics, it is difficult to greatly improve the accuracy of the target position center of the grating image using the centroid method. The classic centroid method is suitable for feature recognition in scenes with regular spot shapes and relatively uniform grayscale. Otherwise, the center of the identified spot will have a certain error from the actual position. Due to the characteristics of spectral imaging of the target light source point and background noise interference, the center of the target spot deviates. For example, when the light source is transmitted over a long distance, there is a certain intensity of light incident from the side, and the measurement result has a large error and is unusable.
[0004] Due to the characteristics of spectral imaging of target light source points and the interference of background noise, the accuracy of automatic recognition and position extraction of image targets is limited. High-precision grating measurement systems and spectral recognition calibration are crucial for large-aperture space astronomical telescope observations. Combining intelligent image recognition with grating measurement systems can solve the problems of difficult target recognition and difficult feature extraction in traditional grating testing. Summary of the invention
[0005] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a method and device for optimizing the target positioning and analyzing the wavelength characteristics of grating images. Since the grating images captured by CMOS cameras have background noise, the grayscale distribution function of the light spot in the grating image can be approximately regarded as a Gaussian distribution. In order to better enhance the light spot characteristics in the grating image and obtain a more accurate light spot position, an image recognition method combining the density centroid method and the Gaussian surface fitting method is adopted. First, the grating image is preprocessed by the density centroid method, and then the Gaussian surface fitting method is used to extract the center of a single or multiple targets in the grating image, thereby laying a good foundation for the multi-band characteristic analysis of the light source.
[0006] To achieve the above object, the present invention provides a method for optimizing grating image target positioning and analyzing wavelength characteristics, comprising:
[0007] Based on the Gaussian surface fitting method, the centers of all characteristic spots in the grating image are extracted respectively to obtain the position coordinates and image quality parameters of all characteristic spots.
[0008] Preferably, based on the position coordinates of each characteristic light spot and the image quality parameters of the characteristic light spot, the half-height width of the corresponding characteristic light spot is calculated;
[0009] The bias angle of the light spot imaging is calculated based on the position coordinates of the characteristic light spot, and the servo motor control system of the five-degree-of-freedom mechanical linkage platform is calibrated according to the bias angle of the light spot imaging;
[0010] Based on the position coordinates of the characteristic light spot, the deviated position information in the existing dispersion model table is updated to form a new benchmark; based on the position coordinates of the characteristic light spot and the light source information composed of known wavelengths, the calibration relationship between the wavelength and the position coordinates of the characteristic light spot is fitted;
[0011] Based on the fitting results of the half-width of the characteristic light spot and the calibration relationship, the resolvable wavelength and resolution corresponding to the characteristic light spot are calculated. Preferably, the center of all characteristic light spots in the grating image is extracted based on the Gaussian surface fitting method to obtain the position coordinates of all characteristic light spots and the image quality parameters of the characteristic light spots, including:
[0012] The image quality parameters of the characteristic spot include the standard deviation σ in the X-axis direction x and the standard deviation σ in the Y-axis direction y ,
[0013] The Gaussian fitting method of normal distribution is used to obtain the center coordinates of all sub-pixel characteristic spots and the fitted pixel amplitude A:
[0014] The pixel brightness at the diffuse part of the characteristic light spot is:
[0015]
[0016] Where f(x,y) is the brightness value at (x,y) in the grating image, A is the fitted pixel amplitude, (x0,y0) is the center coordinate of the theoretical feature spot, (x,y) is the actual position coordinate of the feature spot, A, x o ,y o , σ x and σ y is the coefficient to be fitted; take the logarithm of both sides of equation (1) and simplify it into a polynomial to obtain:
[0017] ln f=ax 2 +by 2 +cx+dy+e (2),
[0018]
[0019] Solve it by the least square method to minimize the sum of squares of the residual ε, and get:
[0020] ε=ax 2 +by 2 +cx+dy+e-ln f (4);
[0021] According to the least squares principle, a, b, c, d and e are determined by the following formula:
[0022]
[0023] Formula (5) obtains A, x o ,y o , σ x and σ y , substitute into formula (1) to obtain the extreme point (x0, y0) of the Gaussian surface, and use the extreme point (x0, y0) as the center position coordinate of the characteristic spot; repeat the above steps until the center coordinates of all characteristic spots are obtained. Preferably, based on the position coordinates of each characteristic spot and the image quality parameters of the characteristic spot, the half-height width of the corresponding characteristic spot is calculated, including:
[0024] The half-height width of the characteristic spot is calculated based on formula (6):
[0025] FWHM x方向 =2.352σ x
[0026] FWHM y方向 =2.352σ y (6)
[0027] Where, FWHM x方向 is the half-height width in the X-axis direction, FWHM y方向 is the half-height width in the Y-axis direction;
[0028] When conducting an experiment, if the light source is dispersed along the X-axis, calculate the FWHM x方向 ; If the light source is dispersed along the Y axis, calculate the FWHM y方向 .
[0029] Preferably, the bias angle of the light spot imaging is calculated based on the position coordinates of the characteristic light spot, and the servo motor control system of the five-degree-of-freedom mechanical linkage platform is calibrated according to the bias angle of the light spot imaging, including:
[0030] Based on the half-width of the characteristic light spot, it is determined whether the characteristic light spot is in a focused state at this time;
[0031] If the characteristic light spot is in a defocused state, the characteristic light spot with the smallest half-width is found. When adjusting the five-degree-of-freedom mechanical linkage platform, if the position coordinate of the characteristic light spot changes in the X-axis direction or the Y-axis direction, the deviation angle of the characteristic light spot is calculated, and the deviation angle of the light spot imaging is fed back to the servo motor control system of the five-degree-of-freedom mechanical linkage platform for calibration, thereby adjusting the grating surface to the expected position.
[0032] Preferably, the deviated position information in the existing dispersion model table is updated based on the position coordinates of the characteristic light spot to form a new benchmark, including:
[0033] The actual relative position coordinates of each characteristic light spot and the zero pole are obtained by the Gaussian surface fitting method. Secondly, the actual distance corresponding to the actual relative position coordinates is compared with the position distance recorded in the dispersion model table. If the difference between the actual distance and a certain distance position recorded in the dispersion model table is within the set range, the actual distance is used to replace and update the distance position in the dispersion model table to obtain a new benchmark.
[0034] Preferably, based on the position coordinates of the characteristic light spot and the light source information composed of known wavelengths, the calibration relationship between the wavelength and the position coordinates of the characteristic light spot is fitted, including:
[0035] After the light source with known wavelength composition is dispersed by the grating surface, characteristic light spots corresponding to different wavelengths are formed on the grating original image. Based on the Gaussian surface fitting method, the position coordinates of the ±1-level characteristic light spots corresponding to different wavelengths are obtained;
[0036] The least square method is used to fit the calibration relationship diagram of the central coordinates of the characteristic light spot and the wavelength, and the functional relationship between the central coordinates of the characteristic light spot and the wavelength is obtained:
[0037] W=0.01Z 2 -2.4987Z+199.81 (7),
[0038] Where Z is the wavelength and W is the characteristic spot position.
[0039] Preferably, based on the fitting result of the half-width of the characteristic light spot and the calibration relationship, the resolvable wavelength and resolution corresponding to the characteristic light spot are calculated, including:
[0040] The formula for calculating the resolvable wavelength is: Δλ=FWHM×ξ;
[0041] The resolution is calculated as follows: R = λ / Δλ = λ / (FWHM×ξ); if the light source is dispersed along the X-axis, the FWHM is FWHM x方向 If the light source is dispersed along the Y axis, the FWHM is y方向 ; ξ is the dispersion coefficient.
[0042] Preferably, before extracting the centers of all characteristic light spots in the grating image based on the Gaussian surface fitting method to obtain the position coordinates of all characteristic light spots and the image quality parameters of the characteristic light spots, the acquired grating original image is preprocessed to obtain a grating image with clearer light spots;
[0043] The acquired grating original image is preprocessed to obtain a grating image with a clearer light spot, including:
[0044] Based on the density centroid method, the acquired grating original image is preprocessed including grayscale, color inversion and fuzzy denoising to eliminate the background noise and uneven characteristics of the grating original image; the threshold value of the grating original image is selected to obtain a grating image with a clearer light spot.
[0045] A grating image target positioning optimization and wavelength characteristic analysis device comprises a control processor, a five-degree-of-freedom mechanical linkage platform, a light source, a grating surface, a camera guide rail and a camera. The light source and the grating surface are both fixed on the five-degree-of-freedom mechanical linkage platform, the camera is fixed on the camera guide rail, the light source is located above the grating surface, the camera is located below the grating surface, and the control processor is electrically connected to the light source and the camera.
[0046] The beneficial effects achieved by the present invention are:
[0047] In the process of target positioning based on grating image recognition, the density centroid method is used for image preprocessing. The grating image is preprocessed by grayscale, color inversion and fuzzy denoising to enhance the light spot characteristics. Compared with traditional preprocessing methods such as median filter denoising, the light spot characteristics after preprocessing by the density centroid method are more obvious.
[0048] The image light spot is then identified by the Gaussian surface fitting algorithm. Due to the irregular characteristics of the light spot, the Gaussian surface fitting method is more accurate in extracting the center position of the light spot than the traditional density centroid method, and the distribution characteristics of the light spot pixels can also be obtained. Compared with the traditional density centroid method image target recognition method, the target recognition algorithm proposed in the present invention more accurately extracts the center of the light spot and three-dimensional features, improves the performance and detection accuracy of the system, and lays a good foundation for the next step of analyzing the multi-band characteristics of the light source.
[0049] In the analysis process of grating characteristics proposed by the present invention, according to the position and half-height width information of the light spot in the grating image, the calibration function of the system, the establishment of the benchmark, the fitting of the calibration relationship between the wavelength composition and the light spot position, and the calculation of the resolvable wavelength and resolution corresponding to the light spot are realized;
[0050] The research on grating constant measurement and system error calibration in grating test systems can have a wide range of applications, and can also provide valuable references for research on optoelectronic test systems such as diffraction and speckle measurement and spectral analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a schematic diagram of a target positioning optimization device based on grating image recognition according to the present invention;
[0052] Figure 2 It is a functional framework diagram of the grating test and analysis system of the present invention;
[0053] Figure 3 It is a framework diagram of the target recognition algorithm of the present invention;
[0054] Figure 4 This is a Gaussian fitting recognition effect diagram of the present invention;
[0055] Figure 5 This is a diagram of light source dispersion effect;
[0056] Figure 6 It is a calibration relationship diagram of the present invention. DETAILED DESCRIPTION
[0057] The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and are not intended to limit the protection scope of the present invention.
[0058] In the grating image target positioning optimization and wavelength characteristic analysis method, the grating original image is obtained, including:
[0059] Adjust and fix the light source position, grating surface position and camera position;
[0060] The light emitted by the light source is refracted by the grating surface to form light waves. The camera captures the light waves to obtain the original grating image.
[0061] There are many models of the five-DOF mechanical linkage platform, light source, grating surface, camera rail and CMOS camera in the prior art. Those skilled in the art can select appropriate models according to actual needs, and this embodiment will not give examples one by one.
[0062] The spatial posture of the light source, grating surface and CMOS camera is coordinated by the five-degree-of-freedom mechanical linkage platform and the camera rail to fine-tune and calibrate the spatial posture relationship between the three. The five-degree-of-freedom mechanical linkage platform drives the light source to the predetermined spatial point. The multi-band light emitted by the light source is refracted by the grating surface, which will produce spot features in the grating image taken by the CMOS camera. By processing the grating image, the spot features in the grating image are extracted, thus laying the foundation for the multi-band characteristic analysis of the light source.
[0063] The functional framework of the grating test and analysis system is as follows: Figure 2 As shown in the figure, from the functional logic point of view, the grating test and analysis system based on observation image recognition is divided into a control layer and an analysis layer. The control layer is responsible for driving the predetermined point of the light source, controlling the grating surface, configuring the CMOS camera and controlling the CMOS camera shooting, etc. The analysis layer is responsible for processing the grating image taken by the CMOS camera, identifying the features of the grating image, calibrating the system, establishing the benchmark, fitting the calibration relationship, and calculating the resolvable wavelength and resolution corresponding to the light spot. The five-degree-of-freedom mechanical linkage platform in the figure is an independent system. The control strategy corresponding to the five-degree-of-freedom mechanical linkage platform is used to obtain the X-axis parameters of the grating surface and the spatial position coordinates of the light source. The five-degree-of-freedom mechanical linkage platform belongs to the prior art, and the function of the five-degree-of-freedom mechanical linkage platform is not described in detail.
[0064] The control strategy of the five-degree-of-freedom mechanical linkage platform is defined and generated by the five-degree-of-freedom mechanical linkage platform, which is used as the input of the grating test and analysis system. The control strategy belongs to the prior art and will not be elaborated in detail in the present invention.
[0065] The system control functional modules and business processes are as follows: (1) Place the light source on the end effector of the five-degree-of-freedom mechanical linkage platform, preset the initial position of the light source according to the structural offset, and adjust the posture of the end effector to reach the target posture through the transformation of the five-degree-of-freedom combined motor in the five-degree-of-freedom mechanical linkage platform to obtain the spatial position and direction of the light source.
[0066] (2) The control strategy of the five-degree-of-freedom mechanical linkage platform determines the posture of the light source and the spatial position of the grating surface. The grating surface moves synchronously along the X-axis direction with the light source by the same distance.
[0067] (3) After the CMOS camera is configured and calibrated, its spatial position is driven by the camera rail.
[0068] When the control layer of the grating test and analysis system is executed, the functions of the grating image analysis layer are executed, including:
[0069] (1) The CMOS camera captures the light waves emitted by the light source and refracted by the grating surface, and outputs the original grating image;
[0070] (2) Design a grating image recognition algorithm, which includes the density centroid method and Gaussian surface fitting method to preprocess and identify the spot features in the grating original image.
[0071] (3) Based on the position and half-width of the light spot in the grating image, the system calibration function, the establishment of the benchmark, the fitting of the calibration relationship between the wavelength composition and the light spot position, and the calculation of the resolvable wavelength and resolution corresponding to the light spot are realized;
[0072] Raster image recognition algorithm framework Figure 3 As shown in the figure, considering the background noise of the grating image taken by the CMOS camera, in order to obtain better spot recognition performance, a combined method of image preprocessing based on the density centroid method and Gaussian surface fitting is adopted.
[0073] In the present invention, the curve width corresponding to half the maximum height of the brightness value distribution curve is called the half-height width of each characteristic light spot. The half-height width can be used to observe the focusing effect of the light source. The smaller the half-height width, the better the focusing effect, and vice versa.
[0074] The VS and Open CV environments are used to implement image preprocessing based on the density centroid method: the original grating image is grayed and inverted, then blurred and denoised to eliminate image background noise and uneven features, and finally a threshold is selected to obtain a clearer spot area.
[0075] After the original grating image is preprocessed by the density centroid method, the center of the characteristic spot is extracted by Gaussian surface fitting to obtain the position coordinates and image quality parameters of the characteristic spot, thereby obtaining the enhanced features of the grating image.
[0076] The specific workflow of the grating system analysis side is as follows: after the light source is dispersed by the grating surface, light spots corresponding to different wavelengths are formed on the grating image. The detection of the light source wavelength requires image recognition through Gaussian surface fitting to obtain the characteristic light spot information in the grating image, including the center position coordinates of the characteristic light spot and the image quality parameters of the characteristic light spot, so as to further calculate the half-width of the light spot and other information, realize the system calibration function, establish the benchmark, fit the calibration relationship between the wavelength composition and the light spot position, and calculate the resolvable wavelength and resolution corresponding to the light spot.
[0077] Step 1: Gaussian surface fitting
[0078] Since the grayscale distribution of the characteristic light spot is similar to the normal distribution, that is, the Gaussian distribution, the center position of the light spot can be obtained by using the Gaussian fitting method of the normal distribution. Although this method is relatively complex in calculation, it can obtain the sub-pixel level center position of the light spot and obtain the three-dimensional pixel distribution characteristics of the light spot, such as Figure 4 .
[0079] The basic principle of Gaussian surface fitting method: Gaussian surface fitting method uses Gaussian function to fit the point spread function PSF of the imaging process. Assuming f(x0,y0) is the brightness value at (x,y) in the grating image, (x0,y0) is the center of the target, then the pixel brightness at the diffuse part of the target is:
[0080]
[0081] In the above formula, A is the fitted pixel amplitude, (x0, y0) is the theoretical center coordinate, (x, y) is the position coordinate of the imaging spot, and σ x , σ y are the standard deviations in the X and Y directions, respectively, where A, x o ,y o , σ x and σ y is the coefficient to be fitted. Taking the logarithm of both sides of equation (1) and simplifying it into a polynomial, we get the following equation:
[0082] ln f=ax 2 +by 2 +cx+dy+e (2)
[0083] The corresponding relationship between the parameters is:
[0084]
[0085] Solve it by the least squares method to minimize the sum of squares of the residual coefficients and take the residual as ε:
[0086] ε=ax 2 +by 2 +cx+dy+e-ln f (4)
[0087] According to the least squares principle, a, b, c, d and e can be determined by the following formula:
[0088]
[0089] Formula (5) obtains A, x o ,y o , σ x and σ y , substitute into formula (1) to obtain the extreme point (x0, y0) of the Gaussian surface, and use the extreme point (x0, y0) as the center position coordinate of the characteristic light spot; repeat the above steps until the center coordinates of all characteristic light spots are obtained.
[0090] The extreme point (x0, y0) is taken as the center coordinate of the characteristic light spot. According to the dispersion direction of the light source, the fitted σ x or y To represent the image quality of the light spot imaging. Calculate the half-height width of the characteristic light spot:
[0091] FWHM x方向 =2.352σ x
[0092] FWHM y方向 =2.352σ y
[0093] When conducting an experiment, if the light source is dispersed along the X-axis, calculate the FWHM x方向 ; If the light source is dispersed along the Y axis, calculate the FWHM y方向 In the present invention, the half-width is used to observe the focusing effect of the light source. The smaller the half-width, the better the focusing effect, and vice versa. On the other hand, the half-width is used to calculate the resolvable wavelength and resolution.
[0094] Step 2: Calibration of the grating system
[0095] The spot position and half-width information obtained by the Gaussian surface fitting method can be used to calibrate the grating system and reduce the system error to a certain extent. The specific steps are as follows:
[0096] Based on the half-height width and light intensity of each light spot, it is judged whether the light spot is in the focused state at this time. If there is a light spot in the defocused state, the light spot with the smallest half-height width is found. When adjusting the five-degree-of-freedom mechanical linkage platform, the position coordinates of the characteristic light spot should change in the X-axis direction or the Y-axis direction. If the position movement direction of the light spot imaging deviates from the X-axis direction or the Y-axis direction, the bias angle of the light spot imaging is calculated, and the bias angle is fed back to the existing high-precision servo motor control system for calibration, so as to adjust the grating surface to the expected position and reduce the system error. The calibration process is realized by debugging the computer program. The calibration of the precision servo motor control system is a prior art and will not be elaborated in detail in this embodiment. Calculating the bias angle of the light spot imaging is a prior art and will not be elaborated in detail in this embodiment.
[0097] Step 3: Build a new benchmark
[0098] In the workflow of the grating test and analysis system proposed by the present invention, the light source dispersion effect diagram is as follows: Figure 6 As shown, the relevant definition of the light spot is as follows:
[0099] The light source is dispersed through the grating surface to form multiple light spots that are distributed approximately in a linear shape, among which the largest light spot in the middle is called the zero pole. The zero pole light spot and the characteristic light spot are imaged in one picture. The coordinates of the zero pole and the characteristic light spot are the spot coordinates obtained by the Gaussian surface fitting method. The calculation principle is the same and the present application will not elaborate on it in detail. Each of the remaining light spots corresponds to a different wavelength. Except for the zero pole, each wavelength type has a corresponding ±1-level light spot. The position coordinates of the ±1-level characteristic light spots corresponding to different wavelengths are obtained based on the Gaussian surface fitting method. It is based on the principle of optical dispersion. A beam of light source includes dispersed light of different wavelengths. The different light spots formed after a beam of light is dispersed should correspond to different wavelengths.
[0100] There is a known dispersion model table in the workflow of the grating test and analysis system proposed in the present invention, as shown in Table 1. In the known dispersion model table, there is a certain deviation between the relative distance between the characteristic light spot and the zero pole and the actual relative distance between the characteristic light spot and the zero pole, so it needs to be updated. The actual relative position coordinates of each characteristic light spot and the zero pole are obtained by the Gaussian surface fitting method, and then the actual distance between the characteristic light spot and the zero pole is compared with the distance position recorded in the dispersion model table. If the difference between the actual distance and a certain distance position recorded in the dispersion model table is within the set range, it is judged to be the pole corresponding to the characteristic light spot. The set range is within ±3-10pixel, and the value of this embodiment is ±5pixel. If the difference between the actual detected distance position and the distance position in the dispersion model table is within ±5pixel, the actual distance is used to update the distance in the table to obtain a new benchmark. If there are multiple distance positions within the range, the distance position with the smallest error is taken.
[0101] The position coordinates of the ±1-level characteristic light spots corresponding to different wavelengths are obtained based on the Gaussian surface fitting method. This is based on the principle of optical dispersion. A beam of light includes dispersed light of different wavelengths. Different light spots formed after a beam of light is dispersed should correspond to different wavelengths. The specific corresponding relationship is shown in steps 3 and Figure 5 For example, if the coordinates of a light spot are 201.02 pixels, we can find the 200 pixels close to it in Table 1, and then we know that the light spot is the -1 pole corresponding to the wavelength λ1. Then we can use the actual distance to correct the distance in the dispersion model table, and finally get a new benchmark.
[0102] Definition: ① Zero pole, +1 pole, -1 pole;
[0103] ② Wavelength composition: λ1, λ2, λ3;
[0104] Table 1 Dispersion model table
[0105]
[0106] Step 4: Calibration relationship fitting
[0107] In the workflow of the grating test and analysis system proposed in the present invention, after a light source with a known wavelength composition is dispersed by the grating surface, light spots corresponding to different wavelengths are formed on the CCD image. The position coordinates of the ±1-order light spots corresponding to different wavelengths are obtained by the Gaussian surface fitting method, and the dispersion relationship of the ±1-order light spots can be fitted. The specific steps are to use the least squares method to fit the P-λ relationship image, that is, the calibration relationship diagram of the position and wavelength, and obtain the functional relationship between the light spot position and the wavelength.
[0108] The calibration relationship fitting process is an experiment conducted with light of a given wavelength composition. When a beam of light source of unknown wavelength composition to be detected is dispersed by the grating surface and forms light spots corresponding to different wavelengths on the grating original image, the wavelength composition of the unknown light source is inferred based on the calibration relationship diagram of the center coordinates and wavelength of the characteristic light spot in the known light experiment and the relative position coordinates of the characteristic light spot in the unknown light experiment, and the distinguishable wavelength and resolution are further calculated. The specific steps of calibration are as follows (taking the -1 level light spot as an example):
[0109] Given: ① Assume that the wavelength of the incident light source is 250nm, 350nm, and 400nm; ② The relative positions of the three light spots of -1 order and the zero-order light are: 200.01pixel, 550.02pixel, and 800.01pixel. Use the least squares method to fit the calibration relationship diagram of parameters ① and ②. The fitted function relationship between the light spot position and the wavelength is:
[0110] W=0.01Z 2 -2.4987Z+199.81, where Z is the wavelength and W is the characteristic spot position.
[0111] Step 5: The dispersion coefficient ξ can be obtained based on the calibration relationship fitted by the least squares method above, which is the slope (derivative) of the curve corresponding to each λ in the figure. The resolvable wavelength and resolution can be calculated based on the dispersion coefficient ξ and the half-height width FWHM. The relationship is as follows:
[0112] Resolvable wavelength: Δλ=FWHM×ξ,
[0113] Resolution: R=λ / Δλ=λ / (FWHM×ξ).
[0114] If the light source is dispersed along the X-axis, the FWHM is FWHM x方向 If the light source is dispersed along the Y axis, the FWHM is y方向 : ξ is the dispersion coefficient.
[0115] In the target positioning process based on grating image recognition, the density centroid method is used for image preprocessing, and then the image spot is recognized by the Gaussian surface fitting algorithm. Compared with the traditional density centroid method image target recognition method, the target recognition algorithm proposed in the present invention can more accurately extract the center of the spot and three-dimensional features, reduce the error of grating detection, and lay the foundation for light source characteristic analysis.
[0116] In the analysis process of grating characteristics proposed in the present invention, the system calibration function, the establishment of the benchmark, the fitting of the calibration relationship between the wavelength composition and the spot position are realized according to the position and half-height width of the light spot in the grating image, and the resolvable wavelength and resolution corresponding to the light spot are calculated.
[0117] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. Grating image target positioning optimization and wavelength characteristic analysis method, characterized in that: include: Based on the Gaussian surface fitting method, the centers of all characteristic light spots in the grating image are extracted respectively to obtain the position coordinates and image quality parameters of all characteristic light spots. Based on the position coordinates of each characteristic light spot and the image quality parameters of the characteristic light spot, the half-height width of the corresponding characteristic light spot is calculated; The bias angle of the light spot imaging is calculated based on the position coordinates of the characteristic light spot, and the servo motor control system of the five-degree-of-freedom mechanical linkage platform is calibrated according to the bias angle of the light spot imaging; Based on the position coordinates of the characteristic light spot, the deviated position information in the existing dispersion model table is updated to form a new benchmark; Based on the position coordinates of the characteristic light spot and the light source information composed of known wavelengths, the calibration relationship between the wavelength and the position coordinates of the characteristic light spot is fitted; Based on the fitting results of the half-width of the characteristic light spot and the calibration relationship, the resolvable wavelength and resolution corresponding to the characteristic light spot are calculated; Based on the position coordinates of each characteristic light spot and the image quality parameters of the characteristic light spot, the half-height width of the corresponding characteristic light spot is calculated, including: The half-height width of the characteristic spot is calculated based on formula (6): FWHM x方向 =2.352σ x FWHM y方向 =2.352σ y (6), Where, FWHM x方向 is the half-height width in the X-axis direction, FWHM y方向 is the half-height width in the Y-axis direction; When conducting an experiment, if the light source is dispersed along the X-axis, calculate the FWHM x方向 ; If the light source is dispersed along the Y axis, calculate the FWHM y方向 .
2. The grating image target positioning optimization and wavelength characteristic analysis method according to claim 1, characterized in that: Based on the Gaussian surface fitting method, the centers of all characteristic light spots in the grating image are extracted respectively to obtain the position coordinates and image quality parameters of all characteristic light spots, including: The image quality parameters of the characteristic spot include the standard deviation σ in the X-axis direction x and the standard deviation σ in the Y-axis direction y , The Gaussian fitting method of normal distribution is used to obtain the center coordinates of all sub-pixel characteristic spots and the fitted pixel amplitude A: The pixel brightness at the diffuse part of the characteristic light spot is: Where f(x,y) is the brightness value at (x,y) in the grating image, A is the fitted pixel amplitude, (x0,y0) is the center coordinate of the theoretical feature spot, (x,y) is the actual position coordinate of the feature spot, A, x o ,y o , σ x and σ y are the coefficients to be fitted; Taking the logarithm of both sides of equation (1) and simplifying it into a polynomial, we get: lnf=ax 2 +by 2 +cx+dy+e (2), Solve it by the least square method to minimize the sum of squares of the residual ε, and get: ε=ax 2 +by 2 +cx+dy+e-lnf (4); According to the least squares principle, a, b, c, d and e are determined by the following formula: Formula (5) obtains A, x o ,y o , σ x and σ y , substitute into formula (1) to obtain the extreme point (x0, y0) of the Gaussian surface, and use the extreme point (x0, y0) as the center position coordinate of the characteristic light spot; repeat the above steps until the center coordinates of all characteristic light spots are obtained.
3. The grating image target positioning optimization and wavelength characteristic analysis method according to claim 1, characterized in that: The deviation angle of the spot imaging is calculated based on the position coordinates of the characteristic spot, and the servo motor control system of the five-degree-of-freedom mechanical linkage platform is calibrated according to the deviation angle of the spot imaging, including: Based on the half-width of the characteristic light spot, it is determined whether the characteristic light spot is in a focused state at this time; If the characteristic light spot is in a defocused state, the characteristic light spot with the smallest half-width is found. When adjusting the five-degree-of-freedom mechanical linkage platform, if the position coordinate of the characteristic light spot changes in the X-axis direction or the Y-axis direction, the deviation angle of the characteristic light spot is calculated, and the deviation angle of the light spot imaging is fed back to the servo motor control system of the five-degree-of-freedom mechanical linkage platform for calibration, thereby adjusting the grating surface to the expected position.
4. The grating image target positioning optimization and wavelength characteristic analysis method according to claim 3 is characterized in that: Based on the position coordinates of the characteristic light spot, the deviated position information in the existing dispersion model table is updated to form a new benchmark, including: The actual relative position coordinates of each characteristic light spot and the zero pole are obtained by the Gaussian surface fitting method. Secondly, the actual distance corresponding to the actual relative position coordinates is compared with the position distance recorded in the dispersion model table. If the difference between the actual distance and a certain distance position recorded in the dispersion model table is within the set range, the actual distance is used to replace and update the distance position in the dispersion model table to obtain a new benchmark.
5. The method for optimizing grating image target positioning and analyzing wavelength characteristics according to claim 4, characterized in that: Based on the position coordinates of the characteristic light spot and the light source information composed of known wavelengths, the calibration relationship between the wavelength and the position coordinates of the characteristic light spot is fitted, including: After the light source with known wavelength composition is dispersed by the grating surface, characteristic light spots corresponding to different wavelengths are formed on the grating original image. The position coordinates of the ±1-level characteristic light spots corresponding to different wavelengths are obtained based on the Gaussian surface fitting method. The calibration relationship diagram of the center coordinates of the characteristic light spots and the wavelength is fitted by the least squares method, and the functional relationship between the center coordinates of the characteristic light spots and the wavelength is obtained: W=0.01Z 2 -2.4987Z+199.81 (7), Where Z is the wavelength and W is the characteristic spot position.
6. The method for optimizing grating image target positioning and analyzing wavelength characteristics according to claim 1, characterized in that: Based on the fitting results of the half-width of the characteristic light spot and the calibration relationship, the resolvable wavelength and resolution corresponding to the characteristic light spot are calculated, including: The formula for calculating the resolvable wavelength is: Δλ=FWHM×ξ; The resolution is calculated as follows: R = λ / Δλ = λ / (FWHM×ξ); if the light source is dispersed along the X-axis, the FWHM is FWHM x方向 If the light source is dispersed along the Y axis, the FWHM is y方向 ; ξ is the dispersion coefficient.
7. The method for optimizing grating image target positioning and analyzing wavelength characteristics according to claim 1, characterized in that: Before extracting the centers of all characteristic light spots in the grating image based on the Gaussian surface fitting method and obtaining the position coordinates and image quality parameters of all characteristic light spots, the acquired grating original image is preprocessed to obtain a grating image with clearer light spots; The acquired grating original image is preprocessed to obtain a grating image with a clearer light spot, including: Based on the density centroid method, the acquired grating original image is preprocessed including grayscale, color inversion and fuzzy denoising to eliminate the background noise and uneven characteristics of the grating original image; Threshold selection is performed on the original grating image to obtain a grating image with a clearer light spot.
8. A device for optimizing grating image target positioning and analyzing wavelength characteristics according to any one of claims 1 to 7, characterized in that: The system comprises a control processor, a five-degree-of-freedom mechanical linkage platform, a light source, a grating surface, a camera guide rail and a camera. The light source and the grating surface are both fixed on the five-degree-of-freedom mechanical linkage platform. The camera is fixed on the camera guide rail. The light source is located above the grating surface, and the camera is located below the grating surface. The control processor is electrically connected to the light source and the camera.
Citation Information
Patent Citations
High-precision method for quickly positioning centers of two-dimensional Gaussian distribution spot images
CN102496015A
Laser focusing spot positioning method and device
CN105855696A
