Adaptive Raman spectrum baseline correction method and device based on Gaussian smoothing and morphological filtering, and medium
By combining the cascade filtering structure of Gaussian smoothing and morphological filtering and the dynamic convergence mechanism, adaptive Raman spectroscopy baseline correction is achieved, solving the problems of parameter sensitivity and low computational efficiency of traditional methods in complex backgrounds, and significantly improving the accuracy and efficiency of baseline correction.
Patent Information
- Application Number
- CN202510570661.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-05-06
AI Technical Summary
The traditional Raman spectroscopy baseline correction method is sensitive to parameter selection, has low computational efficiency, and insufficient feature retention when dealing with complex backgrounds.
Adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering is adopted to achieve efficient processing of spectral signals and accurate correction of baselines through cascade filtering structure and dynamic convergence mechanism.
It significantly improves the accuracy and efficiency of baseline correction, can effectively handle complex backgrounds in high real-time scenarios, retain spectral characteristics, and solves the problems of parameter sensitivity and low computational efficiency of traditional methods.
Smart Images

Figure CN120084775A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of spectral signals, and more specifically, to an adaptive Raman spectral baseline correction method, device, and medium based on Gaussian smoothing and morphological filtering. Background Technique
[0002] Raman spectroscopy analysis is a non-destructive testing technique widely used in fields such as chemistry, biology, and materials, which can provide molecular structure information of substances. However, Raman spectra are often interfered by the problem of baseline drift in practical applications. Especially in the presence of high fluorescence backgrounds, the fluorescence signal will mask the Raman characteristic peaks, seriously affecting the accuracy and interpretability of the spectra. Baseline drift is mainly caused by factors such as fluorescence background and instrument noise, resulting in the overall shift or distortion of the spectral signal, and thus affecting the identification and quantitative analysis of characteristic peaks. Therefore, how to effectively process and correct the interfered Raman spectral signals is an important research direction in spectral signal processing.
[0003] Commonly used baseline correction methods include polynomial fitting, wavelet transform, and morphological filtering, etc. Although these methods can alleviate the baseline drift problem to a certain extent, there are still limitations: polynomial fitting is easily interfered by noise, resulting in inaccurate fitting; although wavelet transform can separate signals and noise, it is sensitive to parameter selection and has complex calculations; morphological filtering (such as minimum filtering) can initially estimate the baseline, but it is difficult to balance noise suppression and feature retention.
[0004] Therefore, how to solve the problems of traditional methods being sensitive to parameter selection, low computational efficiency, and insufficient feature retention when dealing with complex backgrounds is the main research content of the present invention. Summary of the Invention
[0005] In view of this, the present invention provides an adaptive Raman spectral baseline correction method, device, and medium based on Gaussian smoothing and morphological filtering, ensuring the integrity of spectral features during the correction process, and is particularly suitable for complex background analysis in high-real-time scenarios.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] An adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering, comprising:
[0008] Step 1: Perform Gaussian smoothing on the Raman spectral signal to obtain the smoothed signal;
[0009] Step 2: Perform morphological filtering on the smoothed signal to initially estimate the baseline;
[0010] Step 3: Perform Gaussian smoothing on the initially estimated baseline to obtain the smoothed baseline;
[0011] Step 4: Subtract the smoothed baseline from the Raman spectral signal to obtain the corrected spectral signal;
[0012] Step 5: Calculate the total area of the corrected spectral signal, and determine whether the relative change in the total area between adjacent iterations is less than a preset threshold. If the convergence condition is met, proceed to Step 6; otherwise, repeat the iterative process and execute Steps 1 to 5;
[0013] Step 6: Output the finally corrected spectral signal and the baseline estimation result.
[0014] Preferably, Step 1 specifically includes:
[0015] Step 101: Construct the standard deviation of Gaussian smoothing based on the noise intensity of the Raman spectrum;
[0016] Step 102: Perform edge extension on the Raman spectral signal to obtain the extended signal after mirror filling:
[0017]
[0018] where, is the k-th data point of the extended signal after mirror filling in the i-th iteration, is the Raman spectral signal in the (i - 1)-th iteration, is the k-th data point of the Raman spectral signal in the (i - 1)-th iteration, k is the index of the extended signal after filling, , N is the total length of the Raman spectral signal, σ is the standard deviation of Gaussian smoothing. For the first iteration, i.e., when i = 1, the original Raman spectral signal is equivalent to the original input signal Y;
[0019] Step 103: Perform a convolution kernel operation on the extended signal to obtain the smoothed signal:
[0020]
[0021] where, is the smoothed signal in the i-th iteration, is the extended signal after mirror filling in the i-th iteration, is used to define the weight value at each position in the Gaussian kernel function in the i-th iteration, m is the position parameter in the kernel, i.e., the discretized offset from the center point, taking an integer value, and is used to represent the distance of each element in the kernel to the center point.
[0022] Preferably, Step 2 specifically includes:
[0023] Step 201: Set the structural element width of morphological filtering based on the standard deviation of Gaussian smoothing;
[0024] Step 202: Traverse the sliding window for the smoothed signal to determine the neighborhood window range:
[0025]
[0026] Among them, is the window data set for the i-th iteration, n is the current processing position index, W is the structural element width, is the k-th data point of the smoothed signal for the i-th iteration;
[0027] Step 203: Perform a window minimum transformation on the window data set, and extract the minimum value within the window as the baseline estimate value:
[0028]
[0029] Among them, is the baseline estimate value at the n-th point for the i-th iteration;
[0030] Step 204: Sort the minimum values into the estimated baseline:
[0031]
[0032] Among them, is the generated estimated baseline for the i-th iteration.
[0033] Preferably, step 5 specifically includes:
[0034] Step 501: Calculate the total area of the original Raman spectrum signal:
[0035]
[0036] Among them, is the total area of the original Raman spectrum signal, is the k-th data point of the input original Raman spectrum signal;
[0037] Step 502: Calculate the total area of the spectrum signal after the first-round iteration steps 1 - 4 correction, and determine whether the relative change between the total area of the spectrum signal after correction and the total area of the original Raman spectrum signal is less than a preset threshold. If the convergence condition is met, go to step 6; otherwise, repeat the iteration process to execute steps 1 to 5, and determine whether the relative change in the total area between adjacent iterations is less than the preset threshold.
[0038] Preferably, the formula for calculating the relative change in the total area between adjacent iterations is:
[0039]
[0040] Among them, is the relative change rate of the area at the i-th iteration, , where M is the maximum number of iterations, is the total area of the corrected spectral signal at the i-th iteration, is the total area of the corrected spectral signal at the (i - 1)-th iteration.
[0041] Preferably, the preset threshold is set to ≤0.01.
[0042] A computer device, comprising: a memory and a processor, wherein a computer program that can run on the processor is stored in the memory, and when the processor executes the computer program, an adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering is implemented.
[0043] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, an adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering is implemented.
[0044] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses an adaptive Raman spectral baseline correction method, device and medium based on Gaussian smoothing and morphological filtering. Through a cascaded filtering structure, while suppressing high-frequency noise, spectral features are effectively retained. Combining a dynamic convergence mechanism and an iterative dynamic baseline update strategy, using the relative change amount of the total signal area as an adaptive termination condition, significantly improves the accuracy and efficiency of baseline correction, and solves problems such as sensitivity to parameter selection, low computational efficiency, and insufficient feature retention in traditional methods when dealing with complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0046] Figure 1 It is a flowchart of the adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering provided by the present invention.
[0047] Figure 2 It is a flowchart of the Gaussian smoothing process provided by the present invention.
[0048] Figure 3 It is a flowchart of the morphological filtering provided by the present invention.
[0049] Figure 4 It is a flowchart of the dynamic convergence mechanism and iterative dynamic baseline update provided by the present invention.
[0050] Figure 5 Schematic diagram of relative area change provided by the present invention.
[0051] Figure 6 Schematic diagram of baseline iteration process provided by the present invention.
[0052] Figure 7 Comparison chart of the corrected signal and the Raman spectral frequency shift standard value of cyclohexane provided by the present invention. Detailed implementation manners
[0053] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0054] An embodiment of the present invention discloses an adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering, as Figure 1 shown, including:
[0055] Step 1: Perform Gaussian smoothing on the Raman spectral signal to reduce high-frequency noise interference and obtain a smoothed signal;
[0056] Step 2: Perform morphological filtering on the smoothed signal to preliminarily estimate the baseline;
[0057] Step 3: Perform Gaussian smoothing on the preliminarily estimated baseline to improve the stability of the baseline estimation and obtain a smoothed baseline;
[0058] Step 4: Subtract the smoothed baseline from the Raman spectral signal to obtain a corrected spectral signal;
[0059] Step 5: Calculate the total area of the corrected spectral signal and determine whether the relative change with the area of the previous round is less than a preset threshold. If the convergence condition is met, go to Step 6; otherwise, update the smoothed signal and repeat Steps 1 to 5;
[0060] Step 6: Output the finally corrected spectral signal and the baseline estimation result.
[0061] The present invention constructs a cascaded filtering structure, Gaussian smoothing - morphological filtering - Gaussian smoothing, combines Gaussian smoothing with morphological filtering, and precisely corrects the baseline of Raman spectra. First, Gaussian smoothing is performed on the baseline to optimize it, effectively suppressing the interference of high - frequency noise on baseline estimation while preserving spectral features. Then, the baseline is initially estimated through morphological filtering (such as minimum - value filtering), and then Gaussian smoothing is performed on the initially estimated baseline to obtain a relatively stable baseline. Next, the initial signal is baseline - subtracted to retain the true information of the Raman spectrum to the greatest extent.
[0062] In this embodiment, as Figure 2 shown, step 1 specifically includes:
[0063] Step 101: Construct the standard deviation of Gaussian smoothing based on the noise intensity of the Raman spectrum; here, the value of σ being 5 is the comprehensive result of noise characteristic analysis, parameter linkage design, iterative efficiency optimization, and experimental verification. Its core advantage lies in effectively balancing noise suppression and signal retention, and synergistically optimizing with the morphological filtering parameter W, which improves the algorithm convergence speed and is suitable for efficient processing of actual spectra.
[0064] Step 102: Expand the edges of the Raman spectrum signal to eliminate the boundary truncation effect and ensure the smooth continuity of the signal at the head and tail regions:
[0065]
[0066] Among them, is the k - th data point of the extended signal after mirror filling in the i - th iteration, is the input signal in the (i - 1) - th iteration, is the k - th data point of the signal Y in the (i - 1) - th iteration, k is the index of the filled and extended signal, and the range is usually , σ is the standard deviation of Gaussian smoothing, N is the total length of the Raman spectrum signal. For the first iteration, that is, when i = 1, is the original Raman spectrum signal, which is equivalent to the original input signal Y;
[0067] Step 103: Perform a convolution kernel operation on the extended signal to achieve double smoothing of the spectrum and the baseline, reducing the interference of noise on baseline extraction and baseline removal:
[0068]
[0069] Among them, is the smoothed signal result of the convolution of the Gaussian kernel and the extended signal in the i - th iteration, is the extended signal after mirror filling in the i - th iteration, is the Gaussian kernel function, It is used to define the weight value at each position in the kernel of the i-th iteration. Its core function is to achieve a balance between noise suppression and signal detail preservation through weight assignment and frequency domain filtering. σ is the standard deviation of Gaussian smoothing, which is used to control the width and smoothing intensity of the Gaussian kernel. m is the position parameter within the kernel, that is, the discretized offset distance from the center point, taking only integer values, and is used to represent the distance of each element in the kernel to the center point.
[0070] In this embodiment, as Figure 3 shown, step 2 specifically includes:
[0071] Step 201: Based on the smoothing parameter Set the width W of the structural element for morphological filtering. The value of W being 250 is the result of the combined action of signal characteristics, mathematical principles, experimental parameter tuning, and domain knowledge, aiming to balance the accuracy of baseline estimation and computational efficiency.
[0072] Step 202: Traverse the sliding window for the smoothed signal, determine the neighborhood window range of the current point n, extract the local signal segment, and cover the characteristic peak width through the sliding window to avoid signal boundary overflow problems:
[0073]
[0074] Among them, is the window data set of the i-th iteration, n is the current processing position index, W is the width of the structural element, is the k-th data point of the smoothed signal of the i-th iteration.
[0075] After the window data extraction is completed, perform a window minimum value transformation on these data, execute a morphological erosion operation, and extract the minimum value within the window as the baseline estimation value. Erosion can suppress high-frequency noise. The formula for extracting the minimum value within the window as the baseline estimation value is:
[0076]
[0077] Among them, is the baseline estimation value at the n-th point of the i-th iteration, reflecting the latest point of the local signal.
[0078] Step 204: After extracting the window minimum value, sort the minimum values to construct the estimated baseline:
[0079]
[0080] Among them, is the estimated baseline signal generated in the i-th iteration.
[0081] An output estimation baseline is obtained, and the output estimation baseline is Gaussian-smoothed to obtain a smoothed baseline. Although morphological filtering can effectively extract the baseline trend, local high-frequency noise may remain. Through the convolution operation of the Gaussian kernel, these remaining noises are further filtered to make the baseline smoother, avoiding the introduction of high-frequency interference during subsequent baseline subtraction and suppressing the remaining noise of morphological filtering.
[0082] Through this cascaded structure of Gaussian smoothing - morphological filtering - Gaussian smoothing, double smoothing of the signal and the baseline is achieved, suppressing the influence of high-frequency noise on the baseline processing of Raman spectral signals. Therefore, when facing complex background noise, the suppression of noise and the retention of signal characteristics can be balanced. Especially in a high-fluorescence background or a complex noise environment, the interference in the peak area can be suppressed.
[0083] In this embodiment, the smoothed baseline is subtracted from the Raman spectral signal to obtain a corrected spectral signal, and the calculation formula is:
[0084]
[0085] where is the corrected spectral signal of the i-th iteration, is the corrected spectral signal of the (i - 1)-th iteration, is the smoothed baseline of the i-th iteration. For the first iteration, that is, when is the input original Raman spectral signal, which is equivalent to the original input signal Y.
[0086] In this embodiment, the present invention aims at the problem that traditional baseline correction methods rely on a fixed number of iterations, which easily leads to overcorrection or undercorrection. Under a high-fluorescence background, the baseline morphology is complex and variable, and it is difficult for static baseline estimation methods to adaptively adjust. A dynamic convergence mechanism and an iterative dynamic baseline update strategy are proposed, using the relative change in the total signal area as the convergence criterion. When the area change between adjacent iterations is less than a preset threshold, the calculation is automatically terminated, avoiding the blindness of artificially setting the number of iterations. Each iteration re-estimates the baseline based on the previous correction result, and through gradually approaching the true baseline morphology, high adaptability correction for non-uniform backgrounds is achieved.
[0087] As Figure 4 shown, it specifically includes:
[0088] Step 501: First is the dynamic convergence mechanism. After the original Raman spectral signal is input, the initial area is calculated first. The original Raman spectral signal without any processing is directly accumulated and summed, laying the foundation for calculating the relative area change later:
[0089]
[0090] where It is the sum of all data points of the original Raman spectral signal.
[0091] Step 502: Calculate the total area of the spectral signal after correction in the first round of iteration steps 1 - 4. Calculate the relative area change based on the total area of the original Raman spectral signal and the total area of the corrected spectral signal after the first iteration. Measure the iteration convergence according to this area relative change rate. If the change rate is less than the threshold, it is considered that the Raman spectral signal after baseline removal has converged, that is, the baseline has been basically removed. Otherwise, repeat the iteration process.
[0092] In this solution, the convergence condition threshold is set to the area relative change rate being less than 0.01, which can avoid premature termination of iteration, reduce baseline residue, and is especially suitable for the high-fluorescence background scenario of small signals. Tiny baseline residue may mask the effective peaks of the spectral signal. In this solution, the baseline gradually approaches the true value during iteration. A strict threshold can ensure that the baseline subtraction in the last iteration is thorough enough, and at the same time avoid the risk of underfitting. When the baseline adjustment amplitude is small during the iteration process, the algorithm gradually fine-tunes the baseline shape by increasing the number of iterations. This method can capture the broad background with gentle changes and interference signals with complex fluctuations more accurately, and significantly improve the baseline fitting accuracy.
[0093] The formula for calculating the relative change in the total area between adjacent iterations is:
[0094]
[0095] where is the area relative change rate at the i-th iteration, , where is the maximum number of iterations, is the area of the Raman spectral signal after the i-th iteration.
[0096] The present invention realizes cyclic iterative baseline through a dynamic convergence mechanism and an iterative dynamic baseline update strategy, achieving the situation where the baseline can be removed just without overfitting or underfitting. This strategy has a small computational amount and hardware resource consumption, especially in applications with high real-time requirements.
[0097] In the iterative dynamic baseline update strategy of this embodiment, the convergence condition threshold is set to ≤0.01. The relative area of its iteration process is as Figure 5As shown, the curve shows the convergence process of the relative area change in the iteration, verifying the efficiency of the dynamic convergence mechanism. When the relative area is greater than 0.01, it is considered that the Raman spectral signal has not converged, that is, the baseline has not been completely removed. At this time, the signal with the baseline removed will return to the cascade filtering structure: Gaussian smoothing - morphological filtering - Gaussian smoothing, and the signal is smoothed by Gaussian again. The morphological filtering is used to obtain the estimated baseline, the estimated baseline is smoothed, the smoothed baseline is subtracted, and the relative area change is calculated until the relative area change rate is less than 0.01.
[0098] Figure 6 It shows the baseline iteration process after cascade filtering. To visualize the baseline iteration process, the "sum of the baselines of the i-th iteration" in the figure is the result of accumulating the smoothed baselines obtained from the previous i iterations:
[0099]
[0100] Among them, is the result of accumulating the smoothed baselines obtained from the previous i iterations, is the smoothed baseline obtained from the i-th iteration. It can be seen from the figure that the baseline is closer to the target baseline of the original signal than the baseline obtained from the previous iteration. The baseline of the corrected signal is basically removed, and the characteristic peaks are clearly visible, verifying the effectiveness of the cascade filtering.
[0101] Figure 7 It shows the comparison diagram of the characteristic peak positions between the corrected spectrum and the cyclohexane Raman frequency shift reference substance. The characteristic peak positions of the corrected spectrum are basically aligned with the standard values, and there is no peak position shift or intensity loss, verifying the integrity of the spectral characteristics. The present invention ensures the integrity of the spectral characteristics during the correction process through cascade filtering and dynamic convergence mechanism.
[0102] The experimental results show that the method converges rapidly (relative area change rate ≤ 0.01) in multiple iterations, can accurately separate the baseline interference and the true signal, and ensure the integrity of the position and intensity of the characteristic peaks. Compared with the traditional method, the present invention constructs a cascade filtering structure combined with a dynamic convergence mechanism and an iterative dynamic baseline update strategy, while retaining the Raman spectral signal characteristics, realizes the filtering of high fluorescence background and noise, and is especially suitable for complex background analysis in high real-time scenarios.
[0103] This embodiment provides a computer device, including: a memory and a processor. A computer program that can run on the processor is stored in the memory. When the processor executes the computer program, it implements an adaptive Raman spectral baseline correction method based on Gaussian smoothing and morphological filtering.
[0104] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, an adaptive Raman spectrum baseline correction method based on Gaussian smoothing and morphological filtering is implemented.
[0105] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: various media that can store program codes such as removable storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0106] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same and similar parts among the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.
[0107] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An adaptive Raman spectroscopy baseline correction method based on Gaussian smoothing and morphological filtering, characterized in that: include: Step 1: Perform Gaussian smoothing on the Raman spectrum signal to obtain a smoothed signal; Step 2: Perform morphological filtering on the smoothed signal to preliminarily estimate the baseline; Step 3: Perform Gaussian smoothing on the initially estimated baseline to obtain a smoothed baseline; Step 4: Subtract the smoothed baseline from the Raman spectrum signal to obtain a corrected spectrum signal; Step 5: Calculate the total area of the corrected spectral signal and determine whether the relative change of the total area between adjacent iterations is less than a preset threshold. If the convergence condition is met, proceed to step 6. Otherwise, repeat the iterative process to execute steps 1 to 5; Step 6: Output the final corrected spectral signal and baseline estimation result.
2. The adaptive Raman spectroscopy baseline correction method based on Gaussian smoothing and morphological filtering according to claim 1 is characterized in that: Step 1 specifically includes: Step 101: constructing a standard deviation of Gaussian smoothing based on the noise intensity of the Raman spectrum; Step 102: Perform edge extension on the Raman spectrum signal to obtain an extended signal after mirror filling: ; in, is the kth data point of the extended signal after mirror filling of the i-th iteration, is the Raman spectrum signal of the i-1th iteration, is the kth data point of the Raman spectrum signal of the i-1th iteration, k is the index of the extended signal after filling, , N is the total length of the Raman spectrum signal, σ is the standard deviation of Gaussian smoothing, for the first iteration, that is, when i=1, is the input original Raman spectrum signal; Step 103: Perform convolution kernel operation on the extended signal to obtain a smoothed signal: ; in, is the smoothed signal of the i-th iteration, is the extended signal after mirror filling of the i-th iteration, The Gaussian kernel function used to define the i-th iteration The weight value of each position in the kernel, m is the position parameter in the kernel, that is, the discretized offset from the center point, which is an integer and is used to represent the distance from each element in the kernel to the center point.
3. The adaptive Raman spectroscopy baseline correction method based on Gaussian smoothing and morphological filtering according to claim 2 is characterized in that: Step 2 specifically includes: Step 201: Setting the width of the structural element of the morphological filter based on the standard deviation of the Gaussian smoothing; Step 202: traverse the sliding window for the smoothed signal to determine the neighborhood window range: ; in, is the window data set of the i-th iteration, n is the current processing position index, W is the width of the structural element, is the kth data point of the smoothed signal of the i-th iteration; Step 203: Perform a window minimum value transformation on the window data set, and extract the minimum value in the window as the baseline estimate: ; in, is the baseline estimate of n points at the i-th iteration; Step 204: Sort the minimum values into an estimated baseline: ; in, The estimated baseline generated for the ith iteration.
4. The adaptive Raman spectroscopy baseline correction method based on Gaussian smoothing and morphological filtering according to claim 1 is characterized in that: Step 5 specifically includes: Step 501: Calculate the total area of the input original Raman spectrum signal: ; in, is the total area of the original Raman spectrum signal, is the kth data point of the input original Raman spectrum signal; Step 502: Calculate the total area of the corrected spectral signal in the first round of iterations of steps 1 to 4, and determine whether the relative change between the total area of the corrected spectral signal and the total area of the original Raman spectral signal is less than a preset threshold. If the convergence condition is met, proceed to step 6; otherwise, repeat the iterative process to execute steps 1 to 5, and determine whether the relative change of the total area between adjacent iterations is less than a preset threshold.
5. The adaptive Raman spectroscopy baseline correction method based on Gaussian smoothing and morphological filtering according to claim 4 is characterized in that: The relative change in total area between adjacent iterations is calculated as: ; in, is the relative rate of change of area at the i-th iteration, , M is the maximum number of iterations, is the total area of the corrected spectral signal at the i-th iteration, is the total area of the corrected spectral signal at the i-1th iteration.
6. The method for adaptive Raman spectroscopy baseline correction based on Gaussian smoothing and morphological filtering according to claim 4, characterized in that: The default threshold is set to ≤0.
01.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Raman spectrum denoising method based on adaptive sparse decomposition
CN116380869A
Full-automatic spectrum baseline correction method for spectrum
CN117007184A
Self-calibration measurement method and system for concentration spectrum of boric acid solution by using Raman spectrum
CN118671049A
System and method for automated baseline correction for raman spectra
US20070136014A1
Peak-preserving and enhancing baseline correction methods for raman spectroscopy
US20210270742A1
Cited By
Raman spectrum processing method based on adaptive baseline correction
CN122084600A
A raman spectrum processing method based on adaptive baseline correction
CN122084600B