Spatial dimension push-broom dispersion spectral imaging system and calculation focusing method thereof

Through deep learning technology and hyperspectral image clarity evaluation function, combined with mountain climbing search method, the computational focus of the spatial dimension push-swept dispersion spectral imaging system is realized, solving the problem of difficult to judge focusing in the existing technology, and improving the quality and imaging efficiency of the spectral image.

CN119595104AActive Publication Date: 2025-03-11HENAN ZHONGKE XUANRAN MEDICAL TECHNOLOGY CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411501940.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-03-11
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The existing spatial dimension push-sweep dispersion spectral imaging system is difficult to determine whether it is in the optimal imaging position during the focusing process, resulting in a decrease in spectral image clarity and signal-to-noise ratio.

Method used

Deep learning technology is used to build a deep neural network that predicts the defocus level, optimize the convolution kernel parameters through batch gradient descent, combine the hyperspectral image clarity evaluation function and mountain climbing search method to calculate focus and quickly determine the optimal imaging position.

Benefits of technology

The focusing process of the spatial dimension push-sweep dispersion spectral imaging system has been greatly simplified, the quality of the spectral image is improved, the optimal imaging position is ensured after focusing, and the quality and efficiency of the imaging data are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119595104A_ABST
    Figure CN119595104A_ABST
Patent Text Reader

Abstract

The invention relates to a focusing method of a spatial dimension push-broom dispersion spectral imaging system, in particular to a spatial dimension push-broom dispersion spectral imaging system and a calculation focusing method thereof, and solves the technical problem that the focusing method of the existing spatial dimension push-broom dispersion spectral imaging system is difficult to judge whether the system is at an optimal imaging position after focusing. According to the invention, based on deep learning and definition evaluation, spatial dimension push-broom motion is not needed, accurate determination of the optimal image plane can be rapidly realized only through analysis of the one-dimensional spectral image, the focusing flow in the actual use process of the spatial dimension push-broom dispersion spectral imaging system is greatly simplified, and the focusing efficiency is improved. The method solves the problem that the measurement efficiency is affected by repeated focusing, can accurately obtain the optimal imaging position, improves the quality of the spectral image, and is of great significance to the improvement of the imaging data quality and the imaging efficiency of a spectral imaging system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a focusing method of a space-dimensional push-scan dispersion spectrum imaging system, and in particular to a space-dimensional push-scan dispersion spectrum imaging system and a computational focusing method thereof. Background Art

[0002] Spatial push-scan dispersive spectral imaging technology is a very important and commonly used spectral imaging technology among the various current technologies. It has broad application prospects in agricultural pest and disease monitoring, industrial testing, biomedicine, food safety and other fields.

[0003] The spatial push-scan dispersion spectral imaging system is generally composed of a front imaging optical unit, a spectral imaging unit and a control computer. The spectral imaging unit is composed of a slit assembly, a collimator assembly, a dispersion spectrometer assembly, an imaging mirror assembly and a detector focal plane assembly. The front imaging optical unit can be a telescopic imaging optical system, a microscopic imaging optical system or a photographic system. The spectral imaging unit is affected by the slit assembly. The spectral image obtained on the detector focal plane assembly is one-dimensional spatial information and one-dimensional spectral information. To obtain three-dimensional hyperspectral cube information, a push-scan motion must be performed in another spatial dimension. If the position of the best image formed by the front imaging unit is not at the slit position, the spectral image obtained by the detector focal plane assembly is in a defocused position, which will inevitably cause the clarity of the spectral image to decrease, thereby affecting the signal-to-noise ratio of the spectral image.

[0004] Since the spatial push-scanning dispersion spectral imaging system is affected by the slit component, the two-dimensional spatial image information cannot be seen in real time on the focal plane component of the detector, but only the one-dimensional slit dispersion spectral data can be seen. It is uncertain whether the position imaged by the front imaging optical unit is exactly at the slit position. Only after push-scanning imaging in another one-dimensional spatial direction can the image be checked whether it is clear. If it is not clear, the imaging position of the front imaging optical unit needs to be adjusted along the optical axis or the front and rear positions of the spectral imaging unit need to be adjusted so that the image of the front imaging unit is exactly at the slit position of the spectral imaging unit. However, this adjustment is blind because the two-dimensional spatial image information cannot be displayed in real time on the focal plane component of the detector. Therefore, even if the imaging position of the front imaging optical unit is adjusted again or the front and rear positions of the spectral imaging unit are adjusted, it is impossible to determine whether the adjusted position is in the optimal imaging position. This makes the spatial push-scanning dispersion spectral imaging system very troublesome in actual use. Therefore, repeated adjustments are required to obtain clear high-spectral spectrum data.

[0005] To solve the above problems, a Chinese patent with publication number CN107144346 A proposes a hyperspectral imager with visualized focus. By adding a secondary imaging and optical path turning pentagonal prism at the rear end of the front imaging optical component, real-time observation of the primary image formed by the front imaging optical component is achieved, thereby achieving visualized focus. Although this solution achieves visualized focus, the system is relatively complex, and to achieve visualized focus, the focusing screen and the slit in the turning optical path must be simultaneously at the primary image plane position of the front imaging optical component, which requires repeated precise adjustment and fixation, which invisibly increases the difficulty of installation and adjustment, and it is also impossible to determine whether it is in the best imaging position after focusing. A Chinese patent with publication number CN115326199A proposes a built-in push-broom hyperspectral imager with computational focus. The focusing process is simplified by improving the hardware system, but it does not disclose how to determine whether it is in the best imaging position after focusing. Summary of the invention

[0006] The purpose of the present invention is to solve the technical problem that the focusing method of the existing spatial push-scan dispersive spectral imaging system is difficult to judge whether it is in the best imaging position after focusing, and to provide a spatial push-scan dispersive spectral imaging system and its calculation focusing method.

[0007] To achieve the above object, the technical solution adopted by the present invention is:

[0008] A space-dimensional push-scan dispersion spectral imaging system comprises a front imaging optical unit and a spectral imaging unit located on the same optical axis, and a control computer electrically connected to the spectral imaging unit;

[0009] Its special features are: it also includes transmission components;

[0010] The transmission assembly can move along the optical axis, and a front imaging optical unit or a spectral imaging unit is arranged on it, which is used to adjust the focal position of the front imaging optical unit, or to make the spectral imaging unit be located at the focal position of the front imaging optical unit.

[0011] The present invention also provides a computational focusing method for the above-mentioned spatial push-scan dispersive spectral imaging system, which is special in that it includes the following steps:

[0012] S1. Acquire M spectral images with known different defocus distances to obtain an original data set, and preprocess the original data set to obtain a data set to be analyzed, wherein M≥3, and M is an integer;

[0013] S2, constructing an initial deep neural network for predicting a defocus level, and then inputting the data set to be analyzed into the initial deep neural network for training to obtain a trained deep neural network; the defocus level is a defocus distance range;

[0014] S3, using the batch gradient descent method, the convolution kernel parameters of the training deep neural network are optimized through partial derivatives to obtain the optimized deep neural network;

[0015] S4, inputting m spectral images in the data group to be analyzed into the optimized deep neural network to obtain a predicted defocus level, comparing it with the defocus distance of the corresponding spectral image, taking the mean value of the convolution kernel parameter of the optimized deep neural network when the predicted defocus level is accurate as the convolution kernel parameter of the deep neural network, and obtaining a deep neural network, wherein 0≤m≤M;

[0016] S5, coarse focusing stage: using the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured, and sending it to the control computer, the control computer inputs the spectral image of the target to be measured into the deep neural network, performs iterative prediction, and obtains the coarse focusing range;

[0017] S6, fine focusing stage: move the transmission component within the coarse focusing range, and then use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured after each movement of the transmission component, and evaluate its clarity through the control computer, and then use the peak search method to obtain the transmission component position corresponding to the spectral image with the highest clarity within the coarse focusing range, and complete the computational focusing of the spatial-dimensional push-scan dispersion spectral imaging system.

[0018] Furthermore, S2 is specifically:

[0019] S2.1. constructing an initial deep neural network for predicting defocus levels, then inputting the data set to be analyzed into the initial deep neural network, and dividing the defocus levels into N categories, where 5≤N≤20, and N is an integer;

[0020] S2.2, using the initial deep neural network to output the probability that the defocus distance of one of the spectral images in the data group to be analyzed is in N defocus level categories, and outputting the defocus level category with the highest probability as the predicted defocus level of the spectral image;

[0021] S2.3, comparing the defocus level predicted by the spectral image with the corresponding defocus distance. If the predicted defocus level includes the defocus distance, the predicted defocus level is accurate, and the predicted defocus level is output. Then, the process returns to step 2.2 to predict the next spectral image until the spectral images in the data group to be analyzed are traversed to obtain a trained deep neural network.

[0022] Otherwise, adjust the convolution kernel parameters of the initial deep neural network and return to step 2.2.

[0023] Furthermore, S5 is specifically:

[0024] S5.1. Collect the spectral image of the target to be measured by using the front imaging optical unit and the spectral imaging unit, and send it to the control computer, and then set the defocus distance threshold;

[0025] S5.2, controlling the computer to input the spectral image of the target to be measured into the deep neural network to obtain the defocus level predicted by the spectral image of the target to be measured;

[0026] S5.3, comparing the predicted defocus level of the spectral image of the target to be measured with the defocus distance threshold, if the predicted maximum defocus level is less than the defocus distance threshold, the predicted defocus level is recorded as the coarse focus range, and executing step S6; otherwise, calculating the initial clarity of the spectral image of the target to be measured, and then moving the transmission component according to the predicted defocus level of the spectral image of the target to be measured;

[0027] S5.4. Use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured again, and transmit it to the control computer, calculate the adjusted clarity of the spectral image of the target to be measured, and if the adjusted clarity is higher than the initial clarity, return to step S5.2; otherwise, move the transmission component in the opposite direction according to the predicted defocus level of the spectral image of the target to be measured, use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured again, and transmit it to the control computer, and then return to step S5.2.

[0028] Furthermore, S6 is specifically:

[0029] S6.1, the transmission component moves within the coarse focus range, and the position of the transmission component after each movement is recorded, and then the spectral image of the target to be measured is collected by using the front imaging optical unit and the spectral imaging unit after each movement of the transmission component to obtain the spectral image within the coarse focus range;

[0030] S6.2, controlling the computer to receive the spectral image within the coarse focus range collected by the spectral imaging unit, and then using the hyperspectral image clarity evaluation function to evaluate the clarity of the spectral image within the coarse focus range to obtain a clarity curve;

[0031] S6.3, moving the transmission component to a transmission component position before a sampling point of the spectral image with the highest clarity in the clarity curve;

[0032] S6.4. Use the peak search method to fine-tune the position of the transmission component between the sampling point corresponding to the spectrum image of the target to be measured with the highest clarity and the previous sampling point, search for the transmission component position corresponding to the spectrum image of the target to be measured with the highest clarity, and complete the computational focus of the spatial-dimensional push-scan dispersion spectrum imaging system.

[0033] Furthermore, in S6.2, the hyperspectral image clarity evaluation function is a Laplace function.

[0034] Furthermore, in S6.4, the peak search method is a hill climbing search.

[0035] Furthermore, S6.4 is specifically:

[0036] S6.4.1. Define the search threshold of clarity. When the search reaches the search threshold, stop the search and determine it as the highest point. Set the search step size.

[0037] S6.4.2, move the transmission component in one direction by a step length less than the search step length, collect the spectral image of the target to be measured by using the front imaging optical unit and the spectral imaging unit, and send it to the control computer to calculate its clarity. If the clarity is improved, move the transmission component in the direction according to the search step length; otherwise, move the transmission component in the opposite direction according to the search step length;

[0038] S6.4.3, after the transmission assembly moves, collect the spectral image of the target to be measured and calculate its clarity;

[0039] S6.4.4. If the clarity improves, the transmission component continues to move in the moving direction; otherwise, it moves in the opposite direction of the moving direction with a step size that decreases exponentially relative to the search step size, and returns to step S6.4.3 until the clarity reaches the search threshold. At this time, the clarity of the spectral image of the target to be measured is the highest, and the computational focus of the spatial-dimensional push-scan dispersion spectral imaging system is completed.

[0040] Furthermore, in S2.1, the initial deep neural network includes an input layer, four convolutional layers, a fully connected layer and an output layer connected in sequence, and the activation function of each convolutional layer is a RELU activation function.

[0041] Furthermore, in S1, the preprocessing includes image enhancement and image cropping, and the image enhancement includes image rotation and histogram equalization.

[0042] Compared with the prior art, the present invention has the following beneficial technical effects:

[0043] 1. The present invention provides a computational focusing method for a spatial push-scan dispersion spectral imaging system. Based on deep learning and clarity evaluation, the method does not require spatial push-scanning motion, and can quickly and accurately determine the optimal imaging position only by analyzing a one-dimensional spectral image. This greatly simplifies the focusing process during the actual use of the spatial push-scan dispersion spectral imaging system, solves the problem of affecting measurement efficiency due to repeated focusing, and can accurately obtain the optimal imaging position, thereby improving the quality of the spectral image. The present invention can quickly realize the computational focusing of the spatial push-scan dispersion spectral imaging system, realize computational focusing, and is of great significance to improving the imaging data quality and imaging efficiency of the spectral imaging system.

[0044] 2. In the computational focusing method of a spatial push-scan dispersive spectral imaging system provided by the present invention, a batch gradient descent method is used to optimize the parameters of a deep neural network. All data of the data group to be analyzed are used in each iteration, and a global optimal solution is easily obtained;

[0045] 3. In the computational focusing method of a spatial push-scan dispersive spectral imaging system provided by the present invention, the hyperspectral image clarity evaluation function adopts the Laplace function, and the clarity evaluation is more accurate and efficient;

[0046] 4. In the computational focusing method of a spatial push-scan dispersive spectral imaging system provided by the present invention, a hill climbing search is adopted to prevent the search process from falling into a local optimum;

[0047] 5. In the computational focusing method of a spatial-dimensional push-scan dispersive spectral imaging system provided by the present invention, the initial deep neural network includes four convolutional layers and one fully connected layer. The number of parameters is small and easy to train. The activation function of each convolutional layer is a RELU activation function, which can prevent negative numbers and degradation of the deep neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0049] Figure 2 is a flow chart of step S5 in an embodiment of the present invention;

[0050] Figure 3 1 is a comparison diagram of the spectral images of the target to be measured at the initial position and the coarse focus range in an embodiment of the present invention, wherein (a) is the spectral image of the target to be measured at the initial position, and (b) is the spectral image of the target to be measured in the coarse focus range;

[0051] Figure 41 is an experimental comparison diagram of the hyperspectral image clarity evaluation function in the embodiment of the present invention, wherein (a) is an experimental comparison diagram of the hyperspectral image clarity evaluation function with poor clarity evaluation, and (b) is an experimental comparison diagram of the hyperspectral image clarity evaluation function with good clarity evaluation;

[0052] Figure 5 1 is a comparison diagram of pseudo-color images of the initial position, coarse focus range and fine focus position in an embodiment of the present invention, wherein (a) is a pseudo-color image of the target to be measured at the initial position, (b) is a pseudo-color image of the target to be measured in the coarse focus range, and (c) is a pseudo-color image of the target to be measured at the fine focus position. DETAILED DESCRIPTION

[0053] The following is a further detailed description of a spatial push-scan dispersion spectral imaging system and a computational focusing method thereof proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0054] A spatial-dimensional push-scan dispersion spectral imaging system includes a pre-imaging optical unit and a spectral imaging unit located on the same optical axis, a transmission assembly movable along the optical axis, and a control computer electrically connected to the spectral imaging unit. The pre-imaging optical unit or the spectral imaging unit is arranged on the transmission assembly, and the transmission assembly is used to adjust the focal position of the pre-imaging optical unit, or to make the spectral imaging unit located at the focal position of the pre-imaging optical unit.

[0055] When the front imaging optical unit is arranged on the transmission assembly, the transmission assembly acts as a focusing assembly, driving the front imaging optical unit to move forward and backward along the optical axis to achieve the purpose of focusing, that is, to make the primary imaging image plane position of the front imaging optical unit accurately located at the incident slit position in the spectral imaging unit. At the same time, a scale mark on the mechanical housing of the transmission assembly can be designed to mark the forward and backward movement amount along the optical axis direction, and this scale value is used to reflect the specific value of the actual focusing amount along the optical axis direction. The marked scale value is used for the subsequent calculation of the focus position.

[0056] When the spectral imaging unit is arranged on the transmission component, the transmission component can use a precision linear translation stage to drive the spectral imaging unit to move precisely along the optical axis, so as to achieve the primary image formed by the front imaging optical unit to be precisely located at the incident slit position in the spectral imaging unit, thereby achieving the purpose of focusing. The mobile focusing of the transmission component can adopt an electronically controlled calculation movement method, and the focusing movement amount can be positionally fed back, and the position feedback value is used for subsequent calculation and determination of the focus position.

[0057] This embodiment also provides a computational focusing method for the above-mentioned spatial-dimensional push-scan dispersion spectral imaging system, such as Figure 1As shown, the following steps are included:

[0058] S1. Obtain M spectral images of known different defocus distances to obtain an original data set, and perform image enhancement and image cropping preprocessing to obtain a data set to be analyzed. Among them, image enhancement includes image rotation and histogram equalization, and each time the specific position of the corresponding image is randomly cropped to meet the matrix requirements of the deep neural network input. In the coarse focus stage, since a large amount of time will be wasted if all image stacks are scanned in a push-broom hyperspectral imaging system, in order to improve the focusing efficiency, the time complexity of the defocus prediction method based on deep learning cannot be too large, so only M images with different defocus distances are selected. Among them, M≥3, and M is an integer. In this embodiment, M is 3.

[0059] S2, constructing an initial deep neural network for predicting the defocus level, and then inputting the data set to be analyzed into the initial deep neural network for training to obtain a trained deep neural network. Specifically:

[0060] S2.1. Construct an initial deep neural network for predicting the defocus level, then input the data group to be analyzed into the initial deep neural network, and divide the defocus level into N categories, where 5≤N≤20, and N is an integer. The initial deep neural network includes an input layer, four convolutional layers, a fully connected layer and an output layer connected in sequence. The number of parameters is small and easy to train. The activation function of each convolutional layer is a RELU activation function to prevent negative numbers and degradation of the deep neural network. The deep neural network only needs to predict a focus range to meet the requirements, so the deep neural network is not a regression task but a classification task. In this embodiment, N is 13, and the category of the defocus level is determined according to the focusing experience, which determines the degree of fineness of the correction. The known defocus distance Δd is used as the target of deep neural network training. The output of the deep neural network is the probability distribution of 13 different defocus distance ranges Δd, each Δd is a neighborhood, and the predicted defocus level is the one with the largest probability.

[0061] S2.2. The initial deep neural network outputs the probability that the defocus distance of one of the spectral images in the data group to be analyzed is in N defocus level categories, and outputs the defocus level category with the highest probability as the predicted defocus level of the spectral image.

[0062] S2.3, comparing the defocus level predicted by the spectral image with the corresponding defocus distance. If the predicted defocus level includes the defocus distance, the predicted defocus level is accurate, and the predicted defocus level is output. Then, the process returns to step 2.2 to predict the next spectral image until the spectral images in the data group to be analyzed are traversed to obtain a trained deep neural network.

[0063] Otherwise, adjust the convolution kernel parameters of the initial deep neural network and return to step 2.2.

[0064] S3. Using the batch gradient descent method, the convolution kernel parameters of the deep neural network training are optimized through partial derivatives to obtain the optimized deep neural network.

[0065] In this step, the batch gradient descent method is used to optimize the parameters of the deep neural network. All the data in the data group to be analyzed are used in each iteration, making it easy to obtain the global optimal solution.

[0066] S4. Input the m spectral images in the data group to be analyzed into the optimized deep neural network to obtain the predicted defocus level, compare it with the defocus distance of the corresponding spectral image, take the mean of the convolution kernel parameters of the optimized deep neural network when the predicted defocus level is accurate, and use it as the convolution kernel parameter of the deep neural network to obtain the deep neural network, where 0≤m≤M.

[0067] S5, coarse focus stage: the spectral image of the target to be measured is collected by the front imaging optical unit and the spectral imaging unit, and sent to the control computer. The control computer inputs the spectral image of the target to be measured into the deep neural network for iterative prediction to obtain the coarse focus range. Figure 2 As shown, specifically:

[0068] S5.1. Collect the spectral image of the target to be measured by using the front imaging optical unit and the spectral imaging unit, send it to the control computer, and then set the defocus distance threshold.

[0069] S5.2. The control computer inputs the spectral image of the target to be measured into the deep neural network to obtain the defocus level predicted by the spectral image of the target to be measured.

[0070] S5.3. Compare the predicted defocus level of the spectral image of the target to be measured with the defocus distance threshold. If the predicted maximum defocus level is less than the defocus distance threshold, the predicted defocus level is recorded as the coarse focus range, and execute step S6; otherwise, calculate the initial clarity of the spectral image of the target to be measured, and then move the transmission component according to the predicted defocus level of the spectral image of the target to be measured.

[0071] S5.4. Use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured again, and transmit it to the control computer, calculate the adjusted clarity of the spectral image of the target to be measured, and if the adjusted clarity is higher than the initial clarity, return to step S5.2; otherwise, move the transmission component in the opposite direction according to the predicted defocus level of the spectral image of the target to be measured, use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured again, and transmit it to the control computer, and then return to step S5.2.

[0072] In the coarse focus stage, in order to further improve the accuracy of the coarse focus range, the prediction starts from the starting position and a position is obtained. This position is used as the starting position for the next prediction. The automatic focus prediction of the iterative deep neural network is performed in this way, and the coarse focus range is determined by the output results. Figure 3 As shown, it is a comparison diagram of the spectral image of the target to be measured at the initial position and the coarse focus range. It can be seen that the clarity of the spectral image of the target to be measured in the coarse focus range is significantly improved compared with the initial position, indicating that the position of the best image formed by the front imaging unit is less offset from the focus position of the spectral imaging unit at this time.

[0073] S6, fine focusing stage: Move the transmission component within the coarse focusing range, then use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured after each movement of the transmission component, and evaluate its clarity, and then use the peak search method to obtain the transmission component position corresponding to the spectral image with the highest clarity within the coarse focusing range, and complete the computational focus of the spatial-dimensional push-scan dispersion spectral imaging system. Step S6 is specifically:

[0074] S6.1. The transmission component moves within the coarse focus range and records the position of the transmission component after each movement. Then, the front imaging optical unit and the spectral imaging unit are used to collect the spectral image of the target to be measured after each movement of the transmission component to obtain the spectral image within the coarse focus range.

[0075] S6.2, the control computer receives the spectral image within the coarse focus range collected by the spectral imaging unit, and then uses the hyperspectral image clarity evaluation function to evaluate the clarity of the spectral image within the coarse focus range to obtain a clarity curve. In this embodiment, the hyperspectral image clarity evaluation function is a Laplace function. The hyperspectral image clarity evaluation function should be a curve with fewer extreme points, such as Figure 4 As shown in the figure, the Laplace function is more sensitive to hyperspectral images, and is more accurate and efficient than other clarity evaluation functions. The peak search speed is faster and more accurate in a small range than in a large range, so the Laplace function is selected as the final hyperspectral image clarity evaluation function.

[0076] S6.3, moving the transmission component to a transmission component position before a sampling point of the spectral image with the highest clarity in the clarity curve;

[0077] S6.4, using the peak search method, fine-tune the position of the transmission component between the sampling point corresponding to the spectrum image of the target to be measured with the highest clarity and the previous sampling point, search for the transmission component position corresponding to the spectrum image with the highest clarity of the spectrum image of the target to be measured, and complete the computational focus of the spatial-dimensional push-scan dispersion spectrum imaging system. In this embodiment, the peak search method is a hill climbing search, and S6.4 is specifically:

[0078] S6.4.1. Define the search threshold of clarity. When the search reaches the search threshold, stop the search and determine it as the highest point. Set the search step size.

[0079] S6.4.2, move the transmission component in one direction by a step length less than the search step length, collect the spectral image of the target to be measured by using the front imaging optical unit and the spectral imaging unit, and send it to the control computer to calculate its clarity. If the clarity is improved, move the transmission component in the direction according to the search step length; otherwise, move the transmission component in the opposite direction according to the search step length;

[0080] S6.4.3, after the transmission assembly moves, collect the spectral image of the target to be measured and calculate its clarity;

[0081] S6.4.4. If the clarity improves, the transmission component continues to move in the moving direction; otherwise, it moves in the opposite direction of the moving direction with a step size that decreases exponentially relative to the search step size, and returns to step S6.4.3 until the clarity reaches the search threshold. At this time, the clarity of the spectral image of the target to be measured is the highest, and the computational focus of the spatial-dimensional push-scan dispersion spectral imaging system is completed.

[0082] Hill climbing search is divided into three stages. In the first stage, we first try to move a small distance in one direction to determine the change in clarity to determine the search direction. In the second stage, we move a larger step along the determined direction to prevent the search process from falling into a local optimum. When the second stage search finds that the change in clarity is no longer gradually clear but gradually blurred, the second stage ends because the highest point of the clarity curve has been crossed, and the third stage changes the moving direction. The third stage search reduces the step size exponentially. When the clarity change gradient decreases again, the third stage is repeated until the stage threshold is reached.

[0083] In the fine focus stage, since the theoretical error of the deep neural network is Δd, and the fine focus can find the focal plane in the neighborhood of Δd, the error of the fine focus judgment is ≤Δd. Select a clarity evaluation function, calculate the clarity of the data in the neighborhood of the coarse focus range, and then search for the peak point of the clarity curve to finally obtain the optimal image plane position. The hill climbing search method is an efficient extreme value search method for the hyperspectral image clarity evaluation function with unimodality and unbiasedness. The transmission component moves in small steps within the coarse focus range predicted by the deep neural network. A small step is set, and the transmission component drives the front imaging optical unit or the spectral imaging unit from the starting position, and the small step runs through the entire focus stroke. After each movement, a frame of image is collected to calculate the clarity of the current image. After traversing the entire focusing process, the hyperspectral image clarity evaluation function is used to obtain the transmission component position corresponding to the spectral image with the highest clarity. The transmission component moves in the opposite direction and brings the front imaging optical unit or the spectral imaging unit back to the previous sampling point at the maximum value of the hyperspectral image clarity evaluation function, which is the starting point of the fine-tuning interval. Finally, the peak search is used for small step fine-tuning. At the starting point of the fine-tuning segment, the transmission component moves with the smallest step length, and the hill climbing search is used to determine the transmission component position corresponding to the spectral image with the highest clarity, that is, the optimal imaging position. At this time, the entire computational focusing process is completed.

[0084] like Figure 5 As shown, it is a pseudo-color comparison diagram of the target to be measured at the initial position, coarse focus range and fine focus position. It can be seen that compared with the initial position, the clarity of the pseudo-color diagram of the target to be measured in the coarse focus range is significantly improved, and compared with the coarse focus range, the clarity of the pseudo-color diagram of the target to be measured in the fine focus position is further improved, indicating that the computational focusing method of the space-dimensional push-scanning dispersion spectral imaging system provided in this embodiment can greatly improve the quality of the spectral image.

[0085] In this embodiment, data extraction is first performed, and the data set is marked and constructed. Then, the image is enhanced and cropped, and the image is divided into slices that meet the input size of the following deep neural network. A deep learning neural network is designed, including an input layer, four convolutional layers, a fully connected layer, and an output layer. The network is a classification network rather than a regression network. The image is classified into one of N categories, thereby obtaining one of N ranges, namely the coarse focus range. Then, the Laplace function is used to evaluate the clarity within the range, reducing the amount of calculation and obtaining a clarity curve. On this basis, a random peak search is used to obtain the fine focus distance, which also reduces the risk of a local optimal solution.

Claims

1. A spatial-dimensional push-scan dispersion spectral imaging system, comprising a front imaging optical unit and a spectral imaging unit located on the same optical axis, and a control computer electrically connected to the spectral imaging unit; Features: Also includes a transmission assembly; The transmission assembly can move along the optical axis, and a front imaging optical unit or a spectral imaging unit is arranged on it, which is used to adjust the focal position of the front imaging optical unit, or to make the spectral imaging unit be located at the focal position of the front imaging optical unit.

2. A computational focusing method for the spatial push-scan dispersive spectral imaging system according to claim 1, characterized in that: The following steps are involved: S1. Acquire M spectral images with known different defocus distances to obtain an original data set, and preprocess the original data set to obtain a data set to be analyzed, wherein M≥3, and M is an integer; S2, constructing an initial deep neural network for predicting a defocus level, and then inputting the data set to be analyzed into the initial deep neural network for training to obtain a trained deep neural network; the defocus level is a defocus distance range; S3, using the batch gradient descent method, the convolution kernel parameters of the training deep neural network are optimized through partial derivatives to obtain the optimized deep neural network; S4, inputting m spectral images in the data group to be analyzed into the optimized deep neural network to obtain a predicted defocus level, comparing it with the defocus distance of the corresponding spectral image, taking the mean value of the convolution kernel parameter of the optimized deep neural network when the predicted defocus level is accurate as the convolution kernel parameter of the deep neural network, and obtaining a deep neural network, wherein 0≤m≤M; S5, coarse focusing stage: using the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured, and sending it to the control computer, the control computer inputs the spectral image of the target to be measured into the deep neural network, performs iterative prediction, and obtains the coarse focusing range; S6, fine focusing stage: move the transmission component within the coarse focusing range, and then use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured after each movement of the transmission component, and evaluate its clarity through the control computer, and then use the peak search method to obtain the transmission component position corresponding to the spectral image with the highest clarity within the coarse focusing range, and complete the computational focusing of the spatial-dimensional push-scan dispersion spectral imaging system.

3. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 2, characterized in that: S2 is specifically: S2.

1. constructing an initial deep neural network for predicting defocus levels, then inputting the data set to be analyzed into the initial deep neural network, and dividing the defocus levels into N categories, where 5≤N≤20, and N is an integer; S2.2, using the initial deep neural network to predict the probability that the defocus distance of one of the spectral images in the data group to be analyzed is in N defocus level categories, and outputting the defocus level category with the highest probability as the predicted defocus level of the spectral image; S2.3, comparing the defocus level predicted by the spectral image with the corresponding defocus distance. If the predicted defocus level includes the defocus distance, the predicted defocus level is accurate, and the predicted defocus level is output. Then, the process returns to step 2.2 to predict the next spectral image until the spectral images in the data group to be analyzed are traversed to obtain a trained deep neural network. Otherwise, adjust the convolution kernel parameters of the initial deep neural network and return to step 2.

2.

4. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 3, characterized in that: S5 is as follows: S5.

1. Collect the spectral image of the target to be measured by using the front imaging optical unit and the spectral imaging unit, and send it to the control computer, and then set the defocus distance threshold; S5.2, controlling the computer to input the spectral image of the target to be measured into the deep neural network to obtain the defocus level predicted by the spectral image of the target to be measured; S5.3, comparing the predicted defocus level of the spectral image of the target to be measured with the defocus distance threshold, if the predicted maximum defocus level is less than the defocus distance threshold, the predicted defocus level is recorded as the coarse focus range, and executing step S6; otherwise, calculating the initial clarity of the spectral image of the target to be measured, and then moving the transmission component according to the predicted defocus level of the spectral image of the target to be measured; S5.

4. Use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured again, and transmit it to the control computer, calculate the adjusted clarity of the spectral image of the target to be measured, and if the adjusted clarity is higher than the initial clarity, return to step S5.2; otherwise, move the transmission component in the opposite direction according to the predicted defocus level of the spectral image of the target to be measured, use the front imaging optical unit and the spectral imaging unit to collect the spectral image of the target to be measured again, and transmit it to the control computer, and then return to step S5.

2.

5. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 4, characterized in that: S6 is specifically: S6.1, the transmission component moves within the coarse focus range, and the position of the transmission component after each movement is recorded, and then the spectral image of the target to be measured is collected by using the front imaging optical unit and the spectral imaging unit after each movement of the transmission component to obtain the spectral image within the coarse focus range; S6.2, controlling the computer to receive the spectral image within the coarse focus range collected by the spectral imaging unit, and then using the hyperspectral image clarity evaluation function to evaluate the clarity of the spectral image to obtain a clarity curve; S6.3, moving the transmission component to a transmission component position before a sampling point of the target spectrum image to be measured having the highest clarity in the clarity curve; S6.

4. Use the peak search method to fine-tune the position of the transmission component between the sampling point corresponding to the spectrum image of the target to be measured with the highest clarity and the previous sampling point, search for the transmission component position corresponding to the spectrum image of the target to be measured with the highest clarity, and complete the computational focus of the spatial-dimensional push-scan dispersion spectrum imaging system.

6. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 5, characterized in that: In S6.2, the hyperspectral image clarity evaluation function is a Laplace function.

7. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 6, characterized in that: In S6.4, the peak search method is hill climbing search.

8. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 7, characterized in that: S6.4 specifically states: S6.4.

1. Define the search threshold of clarity. When the search reaches the search threshold, stop the search and determine it as the highest point. Set the search step size. S6.4.2, move the transmission component in one direction by a step length less than the search step length, collect the spectral image of the target to be measured by using the front imaging optical unit and the spectral imaging unit, and send it to the control computer to calculate its clarity. If the clarity is improved, move the transmission component in the direction according to the search step length; otherwise, move the transmission component in the opposite direction according to the search step length; S6.4.3, after the transmission assembly moves, collect the spectral image of the target to be measured and calculate its clarity; S6.4.

4. If the clarity improves, the transmission component continues to move in the moving direction; otherwise, it moves in the opposite direction of the moving direction with a step size that decreases exponentially relative to the search step size, and returns to step S6.4.3 until the clarity reaches the search threshold. At this time, the clarity of the spectral image of the target to be measured is the highest, and the computational focus of the spatial-dimensional push-scan dispersion spectral imaging system is completed.

9. A computational focusing method for a spatial push-scan dispersive spectral imaging system according to any one of claims 3 to 8, characterized in that: In S2.1, the initial deep neural network includes an input layer, four convolutional layers, a fully connected layer and an output layer connected in sequence, and the activation function of each convolutional layer is a RELU activation function.

10. The computational focusing method of a spatial push-scan dispersive spectral imaging system according to claim 9, characterized in that: In S1, the preprocessing includes image enhancement and image cropping, and the image enhancement includes image rotation and histogram equalization.

Citation Information

Patent Citations

  • Visualized focusing high-spectrum imaging instrument

    CN107144346A

  • Automatic focusing built-in push-broom hyperspectral imager

    CN115326199A

  • Multifunctional push-broom hyperspectral imaging method and system

    CN111579071A

  • Optical system for debugging hyperspectral imaging subsystem instead of coaxial three-reflector system

    CN113777766A

  • Image definition evaluation method based on pulse coupling neural network and terminal equipment

    CN114359200A