Signal filtering method, device, electronic device and computer program product
The interference map output by Fourier spectrometer is reduced by noise reduction through sparse constraints, which solves the problem of the reduction in the accuracy of the spectrogram under the influence of noise, and achieves the cleaning processing of the interference map and the accuracy of the spectrogram.
Patent Information
- Application Number
- CN202411035304.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-30
AI Technical Summary
The interference graph output by the Fourier spectrometer is susceptible to noise, resulting in a decrease in the accuracy of the spectrum.
The interference graph output by Fourier spectrometer is denoised by using sparse constraint conditions. Through the sparse constraint denoising optimization equation and sparse constraint denoising algorithm, the deviation of the interference graph is within the preset range and its sparseness is maximized. Generate a clean interference map and improve the accuracy of the spectrum map.
It effectively reduces the noise in the spectrum graph, improves the accuracy and signal-to-noise ratio of the spectrum graph, and ensures the fidelity and sparseness of the interference graph.
Smart Images

Figure CN118583290B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing, and in particular to a signal filtering method, device, electronic device and computer program product. Background Art
[0002] In specific applications, a spectrum is often obtained by performing Fourier transform based on the interference pattern output by a Fourier spectrometer.
[0003] However, in actual implementation, the internal structure of the Fourier spectrometer, such as the jitter of the motion mechanism, or the acquisition circuit used to collect the interference signal, often causes the interference pattern finally output by the Fourier spectrometer to be affected by the noise signal. Once the interference pattern introduces noise, the subsequent spectrum obtained by Fourier transforming the interference pattern will also contain noise, affecting the accuracy of the spectrum. Summary of the invention
[0004] The present application provides a signal filtering method, an apparatus, an electronic device and a computer program product to reduce noise in a spectrogram.
[0005] The present application provides a signal filtering method, which includes:
[0006] According to the set sparse constraint condition, the first time-series interferogram output by the Fourier spectrometer is subjected to denoising to obtain a second time-series interferogram; the sparse constraint condition is used to constrain the deviation between the second time-series interferogram and the first time-series interferogram to be within a preset deviation range, and constrain the second time-series interferogram to have the maximum sparsity without distortion;
[0007] A spectrum diagram is generated according to the second time-series interference diagram.
[0008] Optionally, the sparse constraint condition is represented by a sparse constraint denoising optimization equation;
[0009] The sparse constraint denoising optimization equation includes at least: a fidelity term and a sparse constraint term; wherein the fidelity term is used to constrain the deviation between the second time-series interference graph and the first time-series interference graph to be within a preset deviation range; the sparse constraint term is used to constrain the second time-series interference graph to have the maximum sparsity without distortion;
[0010] The step of performing denoising on the first time-series interference graph output by the Fourier spectrometer according to the sparse constraint condition to obtain the second time-series interference graph includes: solving the sparse constraint denoising optimization equation according to a set solution algorithm to obtain the second time-series interference graph.
[0011] Optionally, the sparse constraint denoising optimization equation is expressed by the following formula:
[0012] ;
[0013] in, represents a second sequence of light intensity values of each interference point in the second time-series interference pattern, represents the fidelity term to constrain the deviation between the second timing interference graph and the first timing interference graph to be within a preset deviation range; represents the sparse constraint term, is negatively correlated with the sparsity of the second temporal interference pattern. Take the minimum value When , the second temporal interference graph has the largest sparsity without distortion.
[0014] Optionally, the sparse constraint term is represented by a first-order norm of a second sequence composed of light intensity values of each interference point in the second time-series interference graph; or,
[0015] The sparse constraint term is obtained by the following steps: performing total variation processing on the second sequence, and using the first-order norm or the second-order norm of the processing result to represent the sparse constraint term.
[0016] Optionally, the fidelity term is expressed as express;
[0017] Wherein, S represents a first sequence composed of light intensity values of each interference point in the first time-series interference pattern; A second sequence consisting of light intensity values of each interference point in the second time-series interference pattern; represents the square of the second-order norm of the difference sequence; the difference sequence is obtained by subtracting the first sequence from the second sequence;
[0018] Among them, the Less than the preset deviation range Among them, when , it indicates that the deviation between the second timing interference graph and the first timing interference graph is within a preset deviation range.
[0019] Optionally, the method further comprises: training a sparse constraint denoising algorithm according to the sparse constraint condition; wherein the trained sparse constraint denoising algorithm is used to perform denoising on the input timing interference graph and output a noise-free timing interference graph; the deviation between the output timing interference graph and the input timing interference graph is within a preset deviation range and the output timing interference graph has the maximum sparsity without distortion;
[0020] The step of performing denoising on the first time-series interference pattern output by the Fourier spectrometer according to the sparse constraint condition to obtain the second time-series interference pattern comprises: inputting the first time-series interference pattern output by the Fourier spectrometer into the sparse constraint denoising algorithm to obtain the second time-series interference pattern.
[0021] Optionally, generating a spectrum diagram according to the second time-series interference diagram includes:
[0022] Performing equal optical path resampling processing on the second time-series interference pattern to obtain a sampling pattern; or,
[0023] The second time-series interference graph is subjected to equal optical path resampling processing, and the processing result is subjected to truncation processing to obtain a sampling graph; the optical path difference values corresponding to any two interference point pairs in the sampling graph are the same; wherein any interference point pair includes two adjacent interference points; the optical path difference value corresponding to any interference point pair is the difference between the optical path difference of one interference point and the optical path difference of another interference point; the truncation processing is used to cut off each interference point that is not within a first set optical path difference range; the first set optical path difference range is related to the resolution of the Fourier spectrometer;
[0024] A spectrum graph is generated according to the sampling graph.
[0025] Optionally, generating a spectrogram according to the sampling graph includes:
[0026] Performing phase correction processing on the sampling graph to obtain a phase correction graph; the phase correction processing is used to align signals from different phases in terms of phase angle;
[0027] Performing an apodization process on the phase correction image to obtain an apodization image; the apodization process is used to cut off each interference point in the phase correction image that is not within the second set optical path difference range;
[0028] The apodization image is zero-filled so that the resolution of the processed interference image meets the set requirements, and the processed interference image is Fourier transformed to generate a spectrum image.
[0029] The present application also provides a signal filtering device, the device comprising:
[0030] A noise reduction module, used for performing noise reduction processing on the first time-series interference pattern output by the Fourier spectrometer according to the set sparse constraint conditions, so as to obtain a second time-series interference pattern; the sparse constraint conditions are used to constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range, and constrain the second time-series interference pattern to have the maximum sparsity without distortion;
[0031] A spectrum diagram generating module is used to generate a spectrum diagram according to the second time-series interference diagram.
[0032] The present application also provides an electronic device, including:
[0033] Processor; and
[0034] A memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor is caused to perform the steps in any of the above methods.
[0035] An embodiment of the present application also provides a computer program product, including a computer program, which implements any of the above methods when executed by a processor.
[0036] It can be seen from the above technical solutions that the embodiment of the present application sets sparse constraints by means of the difference in sparsity between the interference signal and the noise signal, so as to perform noise reduction processing on the first time-series interference graph containing the interference signal and the noise signal output by the Fourier spectrometer, and then perform Fourier transform based on the second time-series interference graph obtained after the noise reduction processing to obtain a spectrum graph. Compared with the existing spectrum graph obtained by directly using the interference graph to perform Fourier transform, this can reduce the noise in the spectrum graph and improve the accuracy of the spectrum graph.
[0037] Further, based on the description of the above-mentioned sparse constraint conditions, the sparse constraint conditions constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range, so as to retain the light intensity value of each interference point in the first time-series interference pattern, avoid distortion of the second time-series interference pattern, and improve the accuracy of the spectrum pattern obtained based on the second time-series interference pattern; and the sparse constraint conditions also constrain the second time-series interference pattern to achieve the maximum sparsity without distortion, so as to fully filter the noise signal in the second time-series interference pattern, improve the signal-to-noise ratio of the second time-series interference pattern, and ensure the accuracy of the spectrum pattern obtained based on the second time-series interference pattern. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0039] Figure 1 A flow chart of the method provided in the embodiment of the present application;
[0040] Figure 2 An example diagram of a first timing interference diagram provided in an embodiment of the present application;
[0041] Figure 3 An example of a spectrum diagram provided in an embodiment of the present application;
[0042] Figure 4 A flow chart of a method for recovering a spectral image provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of an implementation of a spectral image restoration method provided in an embodiment of the present application;
[0044] Figure 6A schematic diagram of the device structure provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0047] See also Figure 1 , Figure 1 This is a flow chart of a method provided in an embodiment of the present application. The process can be applied to electronic devices, such as a Fourier spectrometer, or other devices independent of the Fourier spectrometer, and the present application does not make any special limitation on this.
[0048] like Figure 1 As shown, the process may include the following steps:
[0049] S101, according to the set sparse constraint conditions, the first time-series interferogram output by the Fourier spectrometer is subjected to denoising processing to obtain a second time-series interferogram; the sparse constraint conditions are used to constrain the deviation between the second time-series interferogram and the first time-series interferogram to be within a preset deviation range, and to constrain the second time-series interferogram to have the maximum sparsity without distortion.
[0050] For ease of description, the temporal interferogram output by the Fourier spectrometer is referred to as the first temporal interferogram. This is just for naming and not for limitation. Correspondingly, the second temporal interferogram is also named for ease of description and not for limitation.
[0051] In a specific implementation, the interference signal and the noise signal are different in sparsity. For example, if the number of non-zero elements in the noise signal is relatively large, the sparsity of the noise signal is relatively low; if the number of non-zero elements in the interference signal is relatively small, the sparsity of the interference signal is relatively high. By virtue of the difference in sparsity between the interference signal and the noise signal, this embodiment sets a sparse constraint condition to perform noise reduction processing on the first time-series interference pattern (including the interference signal and the noise signal) output by the Fourier spectrometer.
[0052] The embodiment of the present application does not specifically limit the sparse constraint condition. For example, the sparse constraint condition is used to constrain the deviation between the second timing interference graph and the first timing interference graph to be within a preset deviation range when it is set.
[0053] The above-mentioned preset deviation range is set according to actual needs, for example, it is set according to the requirement that the deviation between the second timing interference graph and the first timing interference graph is not large, so as to avoid distortion of the second timing interference graph. As an embodiment, the above-mentioned deviation can be measured by the difference between the light intensity value of each interference point in the second timing interference graph and the light intensity value of each interference point in the first timing interference graph. How to determine the deviation between the light intensity value of each interference point in the second timing interference graph and the light intensity value of each interference point in the first timing interference graph will be described later, and will not be repeated here.
[0054] Furthermore, the sparse constraint condition in the embodiment of the present application is also used to constrain the sparsity of the second timing interference graph to be maximum without distortion.
[0055] As described above, the sparsity of the noise signal in the time-series interference graph is relatively low, and the sparsity of the interference signal is relatively high. Therefore, when the sparse constraint condition constrains the sparsity of the second time-series interference graph to reach the maximum without distortion, the noise signal in the second time-series interference graph is filtered to the greatest extent, thereby improving the signal-to-noise ratio of the second time-series interference graph, thereby improving the accuracy of the spectrum graph determined based on the second time-series interference graph.
[0056] How to determine whether the sparsity of the second timing interference graph reaches the maximum will be described later and will not be described here in detail.
[0057] S102, generating a spectrum diagram according to the second time-series interference diagram.
[0058] How to generate a spectrum diagram based on the second time-series interference diagram will be described in detail later and will not be described here.
[0059] So far, completed Figure 1 The process shown.
[0060] Depend on Figure 1 It can be seen from the process shown that the embodiment of the present application sets sparse constraints by means of the difference in sparsity between the interference signal and the noise signal, so as to perform noise reduction processing on the first time-series interference graph containing the interference signal and the noise signal output by the Fourier spectrometer, and then perform Fourier transform on the second time-series interference graph obtained after the noise reduction processing to obtain a spectrum graph. Compared with the existing spectrum graph obtained by directly performing Fourier transform on the interference graph, this can reduce the noise in the spectrum graph and improve the accuracy of the spectrum graph.
[0061] Further, based on the description of the above-mentioned sparse constraint conditions, the sparse constraint conditions constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range, so as to retain the light intensity value of each interference point in the first time-series interference pattern, avoid distortion of the second time-series interference pattern, and improve the accuracy of the spectrum pattern obtained based on the second time-series interference pattern; and the sparse constraint conditions also constrain the second time-series interference pattern to achieve the maximum sparsity without distortion, so as to fully filter the noise signal in the second time-series interference pattern, improve the signal-to-noise ratio of the second time-series interference pattern, and ensure the accuracy of the spectrum pattern obtained based on the second time-series interference pattern.
[0062] In addition, the types of Fourier spectrometers in the present application include but are not limited to near-infrared spectrometers, medium-wave infrared spectrometers, long-wave infrared spectrometers and Fourier Raman spectrometers. The present application provides a general signal filtering method that can improve the signal-to-noise ratio of a spectrum obtained based on an interference pattern.
[0063] A description is given below of an implementation method of performing noise reduction processing on the first time-series interference pattern output by the Fourier spectrometer according to the set sparse constraint condition in S101 to obtain the second time-series interference pattern.
[0064] As an optional embodiment, the sparse constraint condition is represented by a sparse constraint denoising optimization equation;
[0065] The sparse constraint denoising optimization equation includes at least: a fidelity term and a sparse constraint term; wherein the fidelity term is used to constrain the deviation between the second timing interference graph and the first timing interference graph to be within a preset deviation range; the sparse constraint term is used to constrain the second timing interference graph to have the maximum sparsity without distortion.
[0066] According to the sparse constraint condition, the first time-series interference pattern output by the Fourier spectrometer is subjected to denoising to obtain the second time-series interference pattern, which includes: solving the sparse constraint denoising optimization equation according to the set solution algorithm to obtain the second time-series interference pattern.
[0067] In this embodiment, the sparse constraint condition is specifically expressed by the sparse constraint denoising optimization equation. The above fidelity term can be expressed as ,in, represents the second sequence of light intensity values of each interference point in the second time-series interference pattern. is an expression related to the second sequence, for The specific manifestation of will be described later, and will not be repeated here. The above preset deviation range can be set according to actual needs, and this application does not make any special restrictions on this.
[0068] The above sparse constraint term can be expressed as , is an expression related to the second sequence. As an embodiment, is negatively correlated with the sparsity of the second temporal interference pattern. Therefore, when Take the minimum value When , the second temporal interference graph has the largest sparsity without distortion. The specific manifestations will be described later and will not be elaborated here.
[0069] After determining the above sparse constraint denoising optimization equation, the second timing interference graph can be obtained by solving the sparse constraint denoising optimization equation according to the set solution algorithm. The above set solution algorithm includes but is not limited to convex optimization algorithm, non-convex optimization algorithm and greedy algorithm, etc., and this application does not make any special restrictions on this.
[0070] For example, when using a convex optimization algorithm to solve the above sparse constraint denoising optimization equation, the above fidelity term and the sparse constraint term are converted into an optimization equation, and a convex optimization algorithm such as a gradient descent method or a conjugate gradient method is selected to determine the second sequence when the stop condition of the convex optimization algorithm is satisfied. The value of each element in the second sequence is the light intensity value corresponding to each interference point included in the second time-series interference graph, so the second time-series interference graph can be determined based on the second sequence.
[0071] The following is the fidelity item Describe the specific manifestations.
[0072] As an embodiment, the above-mentioned fidelity item = ; Wherein, S represents the first sequence composed of the light intensity values of each interference point in the first time-series interference pattern, Represents a second sequence consisting of light intensity values of interference points in the second time-series interference pattern. Represents the square of the second-order norm of the difference sequence, where the difference sequence is obtained by subtracting the first sequence from the second sequence.
[0073] in, Less than the preset deviation range Among them, when , it indicates that the deviation between the second timing interference graph and the first timing interference graph is within a preset deviation range.
[0074] The first sequence is composed of the light intensity values of each interference point in the first time-series interference graph, and the second sequence is composed of the light intensity values of each interference point in the second time-series interference graph. This is just for naming and is not intended to be limiting. Figure 2 , Figure 2 This is an example diagram of the first timing interference diagram provided in the embodiment of the present application. Figure 2 Taking the five interference points with optical path differences of -2, -1, 0, 1 and 2 as an example, the first sequence of light intensity values of the five interference points is (0, 0, 0.7, 0, 0).
[0075] The difference sequence is obtained by subtracting the first sequence from the second sequence. For example, the number of light intensity values included in the first sequence is equal to the number of light intensity values included in the second sequence, and the difference sequence is obtained by subtracting the light intensity values at the same positions in the first sequence and the second sequence.
[0076] For example, the first sequence and the second sequence are both one-dimensional vectors consisting of N light intensity values, that is, , , the number of interference points included in the first time-series interference graph and the number of interference points included in the second time-series interference graph are both N. The first element of the difference sequence is the difference obtained by subtracting the first light intensity value in the first sequence from the first light intensity value in the second sequence, and so on, the Nth element of the difference sequence is the difference obtained by subtracting the Nth light intensity value in the first sequence from the Nth light intensity value in the second sequence.
[0077] The fidelity term in the sparse constrained denoising optimization equation is the square of the second-order norm of the above difference sequence, that is, . The square of the second-order norm of the difference sequence is the sum of the squares of the differences obtained by subtracting the light intensity values at the same positions in the first sequence and the second sequence. The square of the second-order norm of the above-mentioned difference sequence can be used to determine the deviation between the light intensity values of each interference point in the second time-series interference pattern and the light intensity values of each interference point in the first time-series interference pattern. When the square of the second-order norm of the difference sequence is smaller, the deviation between the light intensity values of each interference point in the second time-series interference pattern and the light intensity values of each interference point in the first time-series interference pattern is smaller, and the deviation between the second time-series interference pattern and the first time-series interference pattern is also smaller.
[0078] Therefore, the fidelity term in the sparse constrained denoising optimization equation is = , 𝜀 represents the preset deviation range, and the value of 𝜀 can be set according to actual needs. When , it indicates that the deviation between the second timing interference graph and the first timing interference graph is within the preset deviation range, thereby achieving the purpose of constraining the second timing interference graph to be undistorted by the fidelity term.
[0079] The following is the sparse constraint term Describe the specific manifestations.
[0080] The embodiment of the present application considers that although the zero norm of the second sequence corresponding to the second time-series interference graph can be used to measure the sparsity of the second time-series interference graph, it is impossible to solve the zero norm of the second sequence. Therefore, the embodiment of the present application provides the following three expression terms for sparse constraints: way.
[0081] As an embodiment, the sparse constraint term is represented by the first-order norm of the second sequence composed of the light intensity values of each interference point in the second time-series interference graph, that is, the sparse constraint term is .
[0082] The first-order norm of the second sequence is the sum of the light intensity values in the second sequence. In the embodiment of the present application, the first-order norm of the second sequence is introduced as a sparse constraint term. When the sparse constraint term, i.e., the first-order norm of the second sequence, is minimum, the sparsity of the second sequence reaches the maximum, and the sparsity of the second time-series interference graph corresponding to the second sequence reaches the maximum, thereby filtering out noise signals with low sparsity to the greatest extent, and improving the accuracy of the spectrum graph determined based on the second time-series interference graph.
[0083] As an embodiment, the sparse constraint term can also be obtained by the following steps: performing total variation processing on the second sequence, and using the first-order norm of the processing result as the sparse constraint term. That is, the sparse constraint term can be expressed as , where TV represents total variation processing.
[0084] The total variation processing in the above embodiment may also be called total variation processing, which is mainly used to describe the gradient change of the second sequence. represents the processing result of the second sequence after total variation processing, represents the first-order norm of the processing result after the second series is processed by total variation, Specifically refers to The sum of the elements included.
[0085] In the present application, the As a sparse constraint, by minimizing The sparsity of the second sequence can be maximized, and the sparsity of the second time-series interference graph corresponding to the second sequence can be maximized, thereby filtering out noise signals with low sparsity to the greatest extent and improving the accuracy of the spectrum graph determined based on the second time-series interference graph.
[0086] As an embodiment, the sparse constraint term can also be obtained by the following steps: performing total variation processing on the second sequence, and using the second-order norm of the processing result to represent the sparse constraint term. That is, the sparse constraint term can be represented as , where TV represents total variation processing.
[0087] The total variation processing in the above embodiment may also be called total variation processing, which is mainly used to describe the gradient change of the second sequence. represents the processing result of the second sequence after total variation processing, represents the first-order norm of the processing result after the second series is processed by total variation, The steps to determine are as follows: Determine Include the squares of the elements; Take the square root of the sum of the squares of the included elements.
[0088] In the present application, the As a sparse constraint, by minimizing The sparsity of the second sequence can be maximized, and the sparsity of the second time-series interference graph corresponding to the second sequence can be maximized, thereby filtering out noise signals with low sparsity to the greatest extent and improving the accuracy of the spectrum graph determined based on the second time-series interference graph.
[0089] Another implementation method of performing noise reduction processing on the first time-series interference pattern output by the Fourier spectrometer according to the set sparse constraint condition in S101 to obtain the second time-series interference pattern is described below.
[0090] As an optional embodiment, the method further includes: training a sparse constraint denoising algorithm according to sparse constraint conditions; wherein the trained sparse constraint denoising algorithm is used to perform noise reduction processing on the input timing interference graph and output a noise-free timing interference graph; the deviation between the output timing interference graph and the input timing interference graph is within a preset deviation range and the output timing interference graph has the maximum sparsity without distortion.
[0091] In this embodiment, before the first time-series interference graph is subjected to noise reduction processing, the sparse constraint denoising algorithm is pre-trained according to the sparse constraint condition. The sparse constraint denoising algorithm is also subject to the sparse constraint condition when performing noise reduction processing on the input time-series interference graph, that is, the deviation between the output time-series interference graph and the input time-series interference graph is within a preset deviation range, and the output time-series interference graph has the maximum sparsity without distortion.
[0092] As an embodiment, a timing interference graph as a training sample and a first noise-free timing interference graph corresponding to the timing interference graph can be obtained in advance. The above timing interference graph is input into a sparse constraint denoising algorithm to obtain a second noise-free timing interference graph output by the sparse constraint denoising algorithm. The loss function is used to determine whether the deviation between the second noise-free timing interference graph and the first noise-free timing interference graph meets the requirements. For example, when it is determined that the loss function value of the second noise-free timing interference graph and the first noise-free timing interference graph is less than a preset threshold, it is determined that the second noise-free timing interference graph output by the sparse constraint denoising algorithm meets the requirements. The above preset threshold can be set according to actual needs, and the embodiment of the present application does not limit this.
[0093] The above-mentioned sparse constrained denoising algorithm includes but is not limited to machine learning algorithms such as dictionary learning, folding learning, Gaussian process learning, and deep learning algorithms such as convolutional neural networks, Transformer, graph neural networks, and pulse neural networks. The embodiments of the present application do not specifically limit this.
[0094] The above-mentioned sparse constraint denoising algorithm is used to perform denoising on the input timing interference graph and output a noise-free timing interference graph. The algorithm can ensure that the deviation between the output timing interference graph and the input timing interference graph is within a preset deviation range (that is, the output timing interference graph is guaranteed to be undistorted), and the output timing interference graph has the maximum sparsity without distortion (that is, the noise signal in the input timing interference graph is fully filtered out), thereby achieving denoising of the timing interference graph, improving the signal-to-noise ratio of the denoised timing interference graph, and further improving the accuracy of the spectrum graph determined based on the denoised timing interference graph.
[0095] On this basis, in S102, according to the sparse constraint condition, the first time-series interference pattern output by the Fourier spectrometer is denoised to obtain the second time-series interference pattern, including: inputting the first time-series interference pattern output by the Fourier spectrometer into the sparse constraint denoising algorithm to obtain the second time-series interference pattern.
[0096] When the first time-series interference graph is subjected to denoising, the first time-series interference graph is input into the above-mentioned sparse constraint denoising algorithm, and the output of the sparse constraint denoising algorithm is the second time-series interference graph after denoising. In essence, the denoising of the first time-series interference graph is also performed relying on the sparse constraint condition, which can also ensure that the noise signal in the first time-series interference graph is fully filtered out, improve the signal-to-noise ratio of the second time-series interference graph, and thus improve the accuracy of the spectrum graph determined based on the second time-series interference graph.
[0097] The following describes how the spectrum diagram is generated according to the second time-series interference diagram in S102.
[0098] See also Figure 5 , Figure 5 This is a flow chart of the spectrum recovery method provided in the embodiment of the present application. Figure 5 As shown, the process includes the following steps:
[0099] S501, perform equal optical path resampling processing on the second time-series interference graph, perform truncation processing on the processing result, and obtain a sampling graph; the optical path difference corresponding to any two interference point pairs in the sampling graph is the same; wherein any interference point pair contains two adjacent interference points; the optical path difference corresponding to any interference point pair is the difference between the optical path difference of one interference point and the optical path difference of another interference point; the truncation processing is used to cut off each interference point that is not within the first set optical path difference range. The first set optical path difference range is related to the resolution of the Fourier spectrometer, wherein the resolution of the Fourier spectrometer refers to the minimum difference between two wavelengths that the Fourier spectrometer can distinguish. For example, the first set optical path difference range is positively correlated with the resolution of the Fourier spectrometer.
[0100] Considering that when the Fourier spectrometer actually collects interference signals, each interference signal is collected according to a preset time interval, that is, the interference points in the interference diagram are at equal time intervals, but the movement speed of the moving mechanism in the Fourier spectrometer fluctuates, and it cannot be guaranteed that the optical path difference corresponding to any two interference point pairs in the interference diagram is equal.
[0101] Therefore, the embodiment of the present application first performs equal optical path resampling processing on the second sequential interferogram, so that after the second sequential interferogram is subjected to equal optical path resampling processing, the optical path difference corresponding to any two interference point pairs is the same. Any of the above interference point pairs includes two adjacent interference points. The optical path difference corresponding to any interference point pair is the difference between the optical path difference of one interference point and the optical path difference of another interference point. By performing equal optical path resampling processing on the second sequential interferogram, the accuracy of the subsequently generated spectrum is further improved.
[0102] Methods for performing equal optical path resampling processing include, but are not limited to, nearest neighbor interpolation, linear interpolation, polynomial interpolation, cubic spline interpolation, and β-spline interpolation, etc., and this application does not make any special limitation on this.
[0103] Taking the equal optical path resampling process using the nearest interpolation method as an example, the set optical path difference value is determined in advance, and the new optical path differences corresponding to the horizontal axis of the second time-series interference graph are determined according to the first set optical path difference range and the set optical path difference value. The light intensity value of the interference point corresponding to each new optical path difference can be determined in the following manner: the light intensity value of the interference point corresponding to the optical path difference closest to the new optical path difference (that is, the optical path difference with the smallest optical path difference value) in the second time-series interference graph is used as the light intensity value of the interference point corresponding to the new optical path difference. This method can retain the original light intensity value of the interference point in the second time-series interference graph, does not involve complex interpolation calculations, and can more quickly obtain the interference graph after equal optical path resampling.
[0104] See also Figure 4 , Figure 4 Flow chart of the spectrum recovery method provided in the embodiment of the present application. Figure 4 When S401 is As the sparse constraint term in the sparse constraint denoising optimization equation, use The near-infrared interference pattern is subjected to noise reduction processing to obtain a second time-series interference pattern. The specific process of the noise reduction processing is referred to above and will not be described in detail here.
[0105] accomplish Figure 4In S402, the linear interpolation method is used to perform equal optical path resampling on the second time-series interference graph, and the light intensity value of the interference point corresponding to each new optical path difference can be determined in the following manner: the light intensity value of the interference point corresponding to the new optical path difference is determined by using the interference points with two known light intensity values closest to the new optical path difference (i.e., the optical path difference with the smallest optical path difference value) in the second time-series interference graph. This method can obtain a smoother sampling graph.
[0106] Furthermore, the embodiment of the present application also truncates the processing result after the equal optical path length resampling processing of the second time-series interference graph to obtain a sampling graph, thereby removing redundant interference points. The above redundant interference points are interference points that are not within the first set optical path length difference range. As an embodiment, the first set optical path length difference range can be determined according to the resolution of the Fourier spectrometer, and the embodiment of the present application does not limit the specific determination process.
[0107] S502, performing phase correction processing on the sampling graph to obtain a phase correction graph; the phase correction processing is used to align signals from different phases in terms of phase angle.
[0108] The embodiment of the present application also performs phase correction processing on the sampling diagram to obtain a phase correction diagram, so as to align signals from different phases in terms of phase angle, correct the zero offset of the sampling diagram, and ensure the accuracy of the subsequently restored spectrum diagram.
[0109] As an embodiment, when performing phase correction processing, the position of the sampling diagram is adjusted to move the interference point corresponding to zero optical path difference in the sampling diagram from the current position to the position where the optical path difference is zero. The horizontal axis of the sampling diagram represents the optical path difference, and the vertical axis represents the light intensity value. The entire sampling diagram is moved along the direction of the horizontal axis of the sampling diagram so that the horizontal coordinate of the interference point corresponding to zero optical path difference in the sampling diagram is 0. For example, the interference point under zero optical path difference collected by the Fourier spectrometer is the first interference point, that is, the interference point corresponding to the above zero optical path difference is the first interference point. However, in the sampling diagram, the optical path difference corresponding to the current position A of the first interference point is not zero. In order to ensure the accuracy of the subsequently restored spectrum diagram, it is necessary to move the first interference point from the current position A to the position B where the optical path difference is zero.
[0110] The method for performing the above phase correction processing includes but is not limited to the power spectrum method, the Mertz phase correction method, the Forman phase correction method, etc., which are not particularly limited in the present embodiment. Figure 4 , Figure 4 Flow chart of the spectrum recovery method provided in the embodiment of the present application. Figure 4 In S403, the sampling diagram is phase corrected by the power spectrum method. The specific implementation process of the phase correction by the power spectrum method is not described in detail in this application.
[0111] S503, performing an apodization process on the phase correction image to obtain an apodization image; the apodization process is used to cut off each interference point in the phase correction image that is not within the second set optical path difference range.
[0112] The embodiment of the present application also performs apodization processing on the phase correction diagram to obtain an apodization diagram, so as to cut off each interference point in the phase correction diagram that is not within the second set optical path difference range, thereby suppressing the side lobes of the apodization diagram and reducing frequency domain leakage. The above-mentioned second set optical path difference range can be set according to actual needs, and the present application does not make any special restrictions on this.
[0113] As an embodiment, a phase correction sequence can be formed based on the light intensity values of each interference point in the phase correction diagram, and the sequence obtained by multiplying the phase correction sequence with the apodization function is used as the apodization sequence. The window range of the apodization function corresponds to the second set optical path difference range. The apodization function retains the elements in the phase correction sequence that are within the window range, and sets the elements in the phase correction sequence that are outside the window range to 0. The data included in the apodization sequence is the light intensity value of each interference point in the apodization diagram, and the apodization diagram can be obtained based on the apodization sequence.
[0114] The above-mentioned apodization functions include but are not limited to rectangular window, triangular window, cosine window, Hamming window, Hanning window, Blackman-Harris window, Norton-Beer window, etc.
[0115] See also Figure 4 , Figure 4 Flow chart of the spectrum recovery method provided in the embodiment of the present application. Figure 4 In S404, the phase correction image is apodized using a rectangular window as an apodization function. The rectangular window retains the values in the phase correction sequence that are within the window range and changes the values in the phase correction sequence that are outside the window range to 0. The above window range corresponds to the second set optical path difference range.
[0116] S504, performing zero padding processing on the apodization image so that the resolution of the processed interference image meets the set requirements, and performing Fourier transform on the processed interference image to generate a spectrum image.
[0117] The embodiment of the present application also performs zero padding on the apodization image obtained after the apodization process, so that the resolution of the processed interference image meets the set requirements. As an embodiment, when the apodization image is zero-padded, the number of interference points in the apodization image is increased, so that the number of interference points included in the interference image after the zero-padded process reaches the set value, thereby making the resolution of the zero-padded interference image meet the requirements and ensuring the accuracy of the subsequently restored spectrum. For example, Figure 4 In S405, a zero-filling interference point is added between every two adjacent interference points in the apodization diagram, and the light intensity value corresponding to the zero-filling interference point is 0.
[0118] Finally, the zero-filled interference pattern is Fourier transformed to obtain a spectrum. Figure 3 , Figure 3 This is an example diagram of a spectrum diagram provided in an embodiment of the present application. The horizontal axis of the spectrum diagram restored according to the second time-series interference pattern represents the wave number, and the vertical axis of the spectrum diagram represents the light intensity.
[0119] See also Figure 4 , Figure 4 The flowchart of the spectrum recovery method provided in the embodiment of the present application is that after the near-infrared interference pattern is subjected to noise reduction, equal optical path resampling, phase correction, toe-cutting and zero-filling, the Fourier transform in S406 is performed to restore the near-infrared spectrum, and the Figure 4 The NIR spectra recovered by the shown process have higher accuracy.
[0120] So far, completed Figure 5 The process shown.
[0121] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of a device provided in an embodiment of the present application, the device comprising:
[0122] The noise reduction module 601 is used to perform noise reduction processing on the first time-series interference pattern output by the Fourier spectrometer according to the set sparse constraint condition to obtain a second time-series interference pattern; the sparse constraint condition is used to constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range, and constrain the second time-series interference pattern to have the maximum sparsity without distortion;
[0123] The spectrum diagram generating module 602 is used to generate a spectrum diagram according to the second time-series interference diagram.
[0124] As an optional embodiment, the device further includes: training a sparse constraint denoising algorithm according to a sparse constraint condition; wherein the trained sparse constraint denoising algorithm is used to perform denoising on the input timing interference graph and output a noise-free timing interference graph; the deviation between the output timing interference graph and the input timing interference graph is within a preset deviation range and the output timing interference graph has the maximum sparsity without distortion;
[0125] According to the sparse constraint condition, the first time-series interference pattern output by the Fourier spectrometer is subjected to denoising to obtain the second time-series interference pattern, which includes: inputting the first time-series interference pattern output by the Fourier spectrometer into a sparse constraint denoising algorithm to obtain the second time-series interference pattern.
[0126] As an optional embodiment, the sparse constraint condition is represented by a sparse constraint denoising optimization equation;
[0127] The sparse constraint denoising optimization equation includes at least: a fidelity term and a sparse constraint term; wherein the fidelity term is used to constrain the deviation between the second time-series interference graph and the first time-series interference graph to be within a preset deviation range; the sparse constraint term is used to constrain the second time-series interference graph to have the maximum sparsity without distortion;
[0128] According to the sparse constraint condition, the first time-series interference pattern output by the Fourier spectrometer is subjected to denoising to obtain the second time-series interference pattern, which includes: solving the sparse constraint denoising optimization equation according to the set solution algorithm to obtain the second time-series interference pattern.
[0129] As an optional embodiment, the sparse constraint denoising optimization equation is expressed by the following formula:
[0130] ;
[0131] in, represents a second sequence of light intensity values of each interference point in the second time-series interference pattern, represents a fidelity term to constrain the deviation between the second timing interference graph and the first timing interference graph to be within a preset deviation range; represents the sparse constraint term, is negatively correlated with the sparsity of the second temporal interference pattern. Take the minimum value When , the second temporal interference graph has the largest sparsity without distortion.
[0132] As an optional embodiment, the sparse constraint term is represented by the first-order norm of a second sequence composed of light intensity values of each interference point in the second time-series interference pattern; or,
[0133] The sparse constraint term is obtained by the following steps: performing total variation processing on the second sequence, and using the first-order norm or the second-order norm of the processing result to represent the sparse constraint term.
[0134] As an optional embodiment, the fidelity term is expressed by the following formula: express;
[0135] Wherein, S represents a first sequence composed of light intensity values of each interference point in the first time-series interference pattern; A second sequence consisting of light intensity values of each interference point in the second time-series interference pattern; represents the square of the second-order norm of the difference sequence; the difference sequence is obtained by subtracting the first sequence from the second sequence;
[0136] Among them, the Less than the preset deviation range Among them, when , it indicates that the deviation between the second timing interference graph and the first timing interference graph is within the preset deviation range. Indicates the preset deviation range.
[0137] As an optional embodiment, generating a spectrum diagram according to the second time-series interference diagram includes:
[0138] Perform equal optical path resampling processing on the second time-series interference pattern to obtain a sampling pattern; or,
[0139] The second time-series interference graph is subjected to equal optical path resampling processing, and the processing result is subjected to truncation processing to obtain a sampling graph; the optical path difference values corresponding to any two interference point pairs in the sampling graph are the same; wherein any interference point pair includes two adjacent interference points; the optical path difference value corresponding to any interference point pair is the difference between the optical path difference of one interference point and the optical path difference of another interference point; the truncation processing is used to cut off each interference point that is not within the first set optical path difference range; the first set optical path difference range is related to the resolution of the Fourier spectrometer;
[0140] Generate a spectrum diagram based on the sampling diagram;
[0141] The zero-filled interferogram is Fourier transformed to generate a spectrum.
[0142] As an optional embodiment, generating a spectrum graph according to the sampling graph includes:
[0143] Performing phase correction processing on the sampling graph to obtain a phase correction graph; the phase correction processing is used to align signals from different phases in terms of phase angle;
[0144] Performing apodization processing on the phase correction image to obtain an apodization image; the apodization processing is used to cut off each interference point in the phase correction image that is not within the second set optical path difference range;
[0145] The apodization image is zero-filled to make the resolution of the processed interference image meet the set requirements, and the processed interference image is Fourier transformed to generate a spectrum image.
[0146] For a detailed introduction to the signal filtering device provided in the present application, please refer to the above-mentioned embodiment of the signal filtering method, and the present application will not elaborate on it here.
[0147] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device includes:
[0148] Processor 701; and
[0149] The memory 702 stores computer program instructions, which, when executed by the processor 701, enable the processor 701 to execute the steps in any of the above methods.
[0150] For a detailed introduction to the electronic device provided in this application, please refer to the above-mentioned embodiment of the signal filtering method, and this application will not elaborate on it here.
[0151] An embodiment of the present application further provides a computer program product, including a computer program, which implements any of the above-mentioned signal filtering methods when executed by a processor.
[0152] For a detailed introduction to the computer program product provided in the embodiments of the present application, please refer to the embodiments of the signal filtering method described above, which will not be elaborated herein.
[0153] In this specification, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0154] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A signal filtering method, characterized in that: The method comprises: According to the set sparse constraint conditions, the first time-series interference pattern output by the Fourier spectrometer is subjected to denoising to obtain a second time-series interference pattern; the sparse constraint conditions are used to constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range, and constrain the second time-series interference pattern to have the maximum sparsity without distortion; the sparse constraint conditions are represented by a sparse constraint denoising optimization equation; the sparse constraint denoising optimization equation includes at least: a fidelity term and a sparse constraint term; wherein the fidelity term is used to constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range; the sparse constraint term is used to constrain the second time-series interference pattern to have the maximum sparsity without distortion; according to the sparse constraint conditions, the first time-series interference pattern output by the Fourier spectrometer is subjected to denoising to obtain a second time-series interference pattern, including: solving the sparse constraint denoising optimization equation according to a set solution algorithm to obtain a second time-series interference pattern; A spectrum diagram is generated according to the second time-series interference diagram.
2. The signal filtering method according to claim 1, characterized in that: The sparse constrained denoising optimization equation is expressed by the following formula: ; in, represents a second sequence of light intensity values of each interference point in the second time-series interference pattern, represents the fidelity term, which is used to constrain the deviation between the second timing interference graph and the first timing interference graph to be within a preset deviation range; represents the sparse constraint term, is negatively correlated with the sparsity of the second temporal interference pattern. Take the minimum value When , the second temporal interference graph has the largest sparsity without distortion.
3. The signal filtering method according to claim 1 or 2, characterized in that: The sparse constraint term is represented by the first-order norm of a second sequence composed of light intensity values of each interference point in the second time-series interference graph; or, The sparse constraint term is obtained by the following steps: performing total variation processing on the second sequence, and using the first-order norm or the second-order norm of the processing result to represent the sparse constraint term.
4. The signal filtering method according to claim 1 or 2, characterized in that: The fidelity term Through the following formula express; Wherein, S represents a first sequence composed of light intensity values of each interference point in the first time-series interference pattern; A second sequence consisting of light intensity values of each interference point in the second time-series interference pattern; represents the square of the second-order norm of the difference sequence, wherein the difference sequence is obtained by subtracting the first sequence from the second sequence; Among them, the Less than the preset deviation range ;when , it indicates that the deviation between the second timing interference graph and the first timing interference graph is within a preset deviation range.
5. The signal filtering method according to claim 1, characterized in that: The method further comprises: training a sparse constraint denoising algorithm according to the sparse constraint condition; wherein the trained sparse constraint denoising algorithm is used to perform denoising on the inputted time-series interference graph and output a noise-free time-series interference graph; the deviation between the outputted time-series interference graph and the inputted time-series interference graph is within a preset deviation range and the outputted time-series interference graph has the maximum sparsity without distortion; The step of performing denoising on the first time-series interference pattern output by the Fourier spectrometer according to the sparse constraint condition to obtain the second time-series interference pattern comprises: inputting the first time-series interference pattern output by the Fourier spectrometer into the sparse constraint denoising algorithm to obtain the second time-series interference pattern.
6. The signal filtering method according to claim 1, characterized in that: Generating a spectrum diagram according to the second time-series interference diagram comprises: Performing equal optical path resampling processing on the second time-series interference pattern to obtain a sampling pattern; or, The second time-series interference graph is subjected to equal optical path resampling processing, and the processing result is subjected to truncation processing to obtain a sampling graph; the optical path difference values corresponding to any two interference point pairs in the sampling graph are the same; wherein any interference point pair includes two adjacent interference points; the optical path difference value corresponding to any interference point pair is the difference between the optical path difference of one interference point and the optical path difference of another interference point; the truncation processing is used to cut off each interference point that is not within a first set optical path difference range; the first set optical path difference range is related to the resolution of the Fourier spectrometer; A spectrum graph is generated according to the sampling graph.
7. The signal filtering method according to claim 6, characterized in that: The step of generating a spectrum graph according to the sampling graph comprises: Performing phase correction processing on the sampling graph to obtain a phase correction graph; the phase correction processing is used to align signals from different phases in terms of phase angle; Performing an apodization process on the phase correction image to obtain an apodization image; the apodization process is used to cut off each interference point in the phase correction image that is not within the second set optical path difference range; The apodization image is zero-filled so that the resolution of the processed interference image meets the set requirements, and the processed interference image is Fourier transformed to generate a spectrum image.
8. A signal filtering device, characterized in that: The device comprises: A denoising module, for performing denoising on a first time-series interference pattern output by a Fourier spectrometer according to a set sparse constraint condition to obtain a second time-series interference pattern; the sparse constraint condition is used to constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range, and constrain the second time-series interference pattern to have the maximum sparsity without distortion; the sparse constraint condition is represented by a sparse constraint denoising optimization equation; the sparse constraint denoising optimization equation includes at least: a fidelity term and a sparse constraint term; wherein the fidelity term is used to constrain the deviation between the second time-series interference pattern and the first time-series interference pattern to be within a preset deviation range; the sparse constraint term is used to constrain the second time-series interference pattern to have the maximum sparsity without distortion; performing denoising on the first time-series interference pattern output by a Fourier spectrometer according to the sparse constraint condition to obtain a second time-series interference pattern includes: solving the sparse constraint denoising optimization equation according to a set solution algorithm to obtain a second time-series interference pattern; A spectrum diagram generating module is used to generate a spectrum diagram according to the second time-series interference diagram.
9. An electronic device, characterized in that: include: processor; as well as A memory, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor is caused to perform the steps in any one of the methods of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
