CN110032988B - Real-time noise reduction enhancement method for ultraviolet Raman spectrum system - Google Patents

Real-time noise reduction enhancement method for ultraviolet Raman spectrum system Download PDF

Info

Publication number
CN110032988B
CN110032988B CN201910327330.4A CN201910327330A CN110032988B CN 110032988 B CN110032988 B CN 110032988B CN 201910327330 A CN201910327330 A CN 201910327330A CN 110032988 B CN110032988 B CN 110032988B
Authority
CN
China
Prior art keywords
raman
spectrum
region
peak
noise
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910327330.4A
Other languages
Chinese (zh)
Other versions
CN110032988A (en
Inventor
金伟其
郭一新
何玉青
赵曼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN201910327330.4A priority Critical patent/CN110032988B/en
Publication of CN110032988A publication Critical patent/CN110032988A/en
Application granted granted Critical
Publication of CN110032988B publication Critical patent/CN110032988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • G06F2218/04Denoising
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Abstract

The invention discloses a real-time noise reduction enhancing method for an ultraviolet Raman spectrum system, and belongs to the fields of spectrum detection, spectrum processing technology and signal processing. The method collects the ultraviolet Raman signals in real time, counts the collected Raman signal data, and predicts the effective peak values of the Raman signals, wherein the effective peak values comprise effective valleys and peaks. Processing each collected Raman spectrum, dividing each Raman spectrum into each block area according to the obtained effective valley, respectively judging the attribute of each divided block area, filtering the noise area, and then splicing the Raman signal area and the filtered noise area. And then, splicing the processed N +1 frames of spectra into a 2D image along a time axis, filtering the 2D image by an iterative bilateral filtering method, and superposing and normalizing the N +1 frames of spectra along the time axis after filtering to obtain a Raman spectrum subjected to noise reduction.

Description

Real-time noise reduction enhancement method for ultraviolet Raman spectrum system
Technical Field
The invention relates to a noise reduction enhancement method for an ultraviolet Raman spectrum system, in particular to a method for enhancing a Raman peak signal by reducing spectrum random noise of a real-time ultraviolet Raman signal and improving a signal-to-noise ratio, and belongs to the fields of spectrum detection and spectrum processing technologies and signal processing.
Background
Raman spectroscopy is a non-destructive spectroscopic detection method based on inelastic light scattering (i.e., changes in the energy/frequency of the incident laser light) of the laser light interacting with matter. By measuring the specific Raman spectrum (namely Raman fingerprint spectrum) of the detected molecular system, the method can carry out quick, simple and repeatable non-contact nondestructive detection and quantitative analysis on the sample, and has the characteristics of short required time, small sample consumption, accurate measurement result and the like. However, the sensitivity of Raman spectroscopy detection is low (the intensity of Rayleigh scattered radiation is only 10 times that of the incident light intensity)-3Raman spectrum intensity is about 10 of Rayleigh line only-3) Especially for some small, portable or simple ultraviolet Raman spectrum detection systems, due to the factors of low laser power, unstable laser, large noise of uncooled CCD and the like, the detection result has large noise influence and the signal-to-noise ratio of Raman signals is low.
Some conventional signal processing methods can remove some random noise, but are not necessarily ideal for raman spectroscopy because many weak raman peaks, either in amplitude or waveform, are very close to noise. Therefore, many weak raman signals can be lost in the process of removing random noise, and the signal-to-noise ratio is not improved too much. Therefore, novel methods for removing random noise in a time domain are provided, and weak signals with certain waveforms which do not change along with time can be reserved, such as a prediction filtering method in t-x-y, a Bayesian prediction filtering algorithm and the like.
Because the raman system usually detects only a single sample at a time, the raman signal generated by the single sample has fixed raman characteristic peak position except for amplitude change, and the noise has randomness. Therefore, when the spectral image of a sample is collected in real time, noise signals which constantly change along with the time can be distinguished by counting the peak positions which do not change along with the time, the noise signals are filtered, and the interested effective Raman signals are highlighted. Meanwhile, the method for filtering noise in the time domain is very effective, the spectrum on the x axis is longitudinally expanded along the t axis, the t axis is a time axis, and the x axis is a wavelength or Raman shift axis, so that 2D spectrum construction on the t-x is realized, and then a smooth filtering method with an edge-preserving characteristic is selected for the constructed spectrum image, so that signals can be effectively preserved, noise with random time is filtered, and the signal-to-noise ratio of a Raman spectrum result is improved.
In summary, statistical classification and a 2D filtering method for t-x spectral images performed after the raman detection signal is expanded in the time domain are effective methods for filtering random noise of the raman spectrum, optimizing the raman spectrum, and solving the problems of low signal-to-noise ratio of the raman signal and unclear raman characteristic signal of a small, portable or simple ultraviolet raman spectrum detection system.
Disclosure of Invention
The invention discloses a real-time noise reduction enhancing method of an ultraviolet Raman spectrum system, which aims to solve the technical problems that: the random noise of the real-time Raman spectrum is reduced, the Raman characteristic peak value is enhanced, and the optimization of the real-time spectrum acquired by the Raman spectrum detection system with low Raman signal-to-noise ratio is realized. The Raman spectrum detection system with low Raman signal-to-noise ratio is particularly a small, portable or simple ultraviolet Raman spectrum detection system.
The purpose of the invention is realized by the following technical scheme.
The invention discloses a real-time noise reduction enhancement method for an ultraviolet Raman spectrum system, which is used for collecting ultraviolet Raman signals in real time, counting the collected Raman signal data and further predicting effective peak values of the Raman signals, wherein the effective peak values comprise effective valleys and peaks. Processing each collected Raman spectrum, dividing each Raman spectrum into each block area according to the obtained effective valley, respectively judging the attribute of each divided block area, filtering the noise area, and then splicing the Raman signal area and the filtered noise area. And then, splicing the processed N +1 frames of spectra into a 2D image along a time axis, filtering the 2D image by an iterative bilateral filtering method, and superposing and normalizing the N +1 frames of spectra along the time axis after filtering to obtain a Raman spectrum subjected to noise reduction.
The invention discloses a real-time noise reduction enhancing method of an ultraviolet Raman spectrum system, which comprises the following steps:
the method comprises the following steps: and collecting ultraviolet Raman signals in real time, and counting the collected Raman signal data to predict effective peak values of the Raman signals, wherein the effective peak values comprise effective valleys and peaks.
The method comprises the steps of acquiring ultraviolet Raman signals in real time from a spectrometer in a front-end Raman detection system, transmitting the acquired Raman signals to a signal cache region, wherein the signal cache region is used for keeping access to N +1 frames of spectrums, acquiring a new spectrum every time, deleting the data of the first N +1 frames of spectrums, and finishing the acquisition of Raman signal data. And performing valley and peak statistics on the N +1 frame image, and listing a valley netlist and a peak netlist. Presetting a statistical classification allowable interval step length, dividing the whole spectrum into M allowable intervals along an x axis, wherein the x axis is a wavelength axis or a Raman shift axis, when a peak netlist of the N frames of spectra has peaks in each allowable interval and the absolute value of the slope at the left end or the right end of the interval is greater than a preset threshold value KmaxNamely N frames of spectra all satisfy the following condition,
the allowable interval has f' (x)m)>Kmax&&f'(xm+1)≤0,m∈Cm,m=1,2,…,M
The preset threshold value KmaxEqual to the absolute value of the maximum slope that can be caused by random noise, the peak is marked as a valid peak, the valid peak is a Raman peak with high intensity, and the position of the Raman peak is recorded.
For the valley netlist of the N +1 frame spectrum, the judgment condition of the valley point is given by the following formula,
the allowable interval has f' (x)m)≤0&&f'(xm+1)≥0,m∈Cm,m=1,2,…,M
Then, the true spectrum valley point is predicted by the following method, and the true spectrum valley point is predicted by totally dividing the following three conditions: in the first case, in an allowable interval step length, if a valley point exists in a spectrum of less than or equal to (N +1)/2 frames, the spectrum is not an effective valley; in a step length of an allowable interval, if a valley point exists in the spectrum of more than or equal to N frames, the spectrum is an effective valley, and the effective valley position is calibrated and recorded according to the average value or the weight average value; and thirdly, in a step of an allowable interval, a valley point is formed in the spectrum which is larger than (N +1)/2 and smaller than N frames, which is probably because a low-intensity peak is formed under the influence of noise, and whether the peak is a valid valley is judged through a preset prediction condition. And predicting a true spectrum valley point through the three conditions to obtain a valley netlist. And predicting the effective peak positions of the Raman signal through the statistical low-valley netlist and the statistical peak netlist.
The specific judgment method of the preset prediction condition for judging whether the prediction condition is the effective valley is as follows: and observing whether a high-intensity Raman peak recorded in the peak netlist exists in an allowable interval step region with a low valley value close to the left and right, recording the high-intensity Raman peak into a valley netlist if the high-intensity Raman peak exists in the peak netlist, if the high-intensity Raman peak exists in an effective valley, recording the high-intensity Raman peak into the valley netlist, if the high-intensity Raman peak does not exist in the effective valley, overlapping the N +1 frame spectrum, and if the low valley exists in the allowable interval step, recording the effective valley into the valley netlist.
Step one the step size of the statistical classification tolerance interval is preferably 3.
Step two: and aiming at each frame of Raman spectrum, dividing each frame of Raman spectrum into each block region through the effective valley obtained in the first step, respectively judging the attribute of each divided block region, wherein the region attribute refers to the attribute of a noise region or the attribute of an effective Raman signal region, filtering the noise region, and then splicing the Raman signal region and the filtered noise region.
And C, dividing each frame of Raman spectrum acquired in the step I into each block area through the valley netlist of each frame of Raman spectrum predicted in the step I, judging the attribute of each area, and respectively determining the attribute of each block area, namely respectively determining whether each block area is a noise area or an effective Raman signal area. For a single region, there are two criteria: the first criterion is: when a Raman peak with high intensity recorded in the peak net list obtained in the first step exists in the region, determining the Raman peak as an effective Raman signal region; the second criterion is: selecting the length of p allowable intervals in the step one as a step length, performing least square smoothing, judging the ratio of the standard deviation and the average value of the smoothed data in the region, if the ratio of the standard deviation and the average value is greater than a preset threshold value, determining the region as an effective Raman signal region, and if not, determining the region as a noise region. The preset threshold is one half of the average value of the ratio of the standard deviation to the average value after the least square method smoothing by taking the length of the p allowable intervals in the step one as the step length in all the areas. The first judgment standard is used for detecting a strong peak area; the second criterion is used to make a decision on weak peaks.
And after determining the attribute of each block, performing large-amplitude smooth filtering on the noise area, filtering out the noise of the noise area, and recording all the wavelength or Raman displacement position information of the area judged as the noise attribute. Then, the effective Raman signal region and the filtered noise region are spliced.
In the second step, the number of p in the p allowable intervals is preferably 3.
The principle of the second judgment standard is that the Raman width of a weak peak is larger than the sampling width, the noise width is the sampling width, the least square filtering is carried out according to the estimated step length of the average width of the weak peak, the least square filtering smoothes the noise into an approximate straight line region, the weak peak can be effectively reserved, the ratio of the standard to the average value of the approximate straight line region after smoothing is obviously smaller than the ratio of the standard deviation to the average value of the weak peak region, and then the noise region or the effective Raman signal region is judged by calculating the ratio of the standard deviation to the average value of the region.
And step three, processing each frame of Raman spectrum acquired in the step one in the step two, splicing the N +1 frames of Raman spectrum processed in the step two into a 2D image along a time axis, filtering the 2D image by an iterative bilateral filtering method, and superposing and normalizing the N +1 frames of Raman spectrum along the time axis after filtering to obtain the Raman spectrum subjected to noise reduction processing.
The spectrum processed in the second step still has the problem that two points are large: the first point is that the effective Raman signal area judged in the step two is not processed, so that noise is still contained; the second point is that a frame of complete spectrum formed by splicing the noise region processed in the second step and the unprocessed effective raman signal region is very discontinuous, uneven and unsmooth.
The 2D construction and filtering principle of the spectrum on t-x is to spread the spectrum into a t-x image in time, due to the fact that noise has randomness on a time axis, and the peak position of an effective Raman signal is constant on the time axis. Therefore, the t-x image is subjected to smooth filtering, so that part of noise can be filtered on the conventional x axis, namely the wavelength or the Raman shift axis, so that the curve is smooth, the spectrum synthesized again becomes uniform and continuous, the noise changing along with time can be filtered on the t axis, namely the time axis, and the noise of an unprocessed effective Raman signal area in the step two can be reduced without influencing the characteristic peak value of the Raman signal.
And (3) processing each frame of Raman spectrum acquired in the first step in the second step, splicing the N +1 frames of Raman spectrum processed in the second step into a 2D image along a time axis, wherein the x axis is a wavelength or Raman shift axis, the t axis is a time axis, and the z axis is Raman intensity. The 2D image is filtered through an iterative bilateral filtering method, after filtering, the N +1 spectrum is overlapped and normalized along a time axis, and a Raman spectrum subjected to noise reduction processing is obtained, the spectral signal-to-noise ratio is greatly improved, and the Raman effective peak value is enhanced.
The principle of the bilateral filtering method is as follows: in filtering algorithms, the value of a pixel at a target point is usually determined by the value of a small local neighbor around the position of the pixel. The specific implementation in 2D gaussian filtering is to assign different gaussian weight values to the pixel values in the surrounding predetermined range, and obtain the final result of the current point after weighted averaging. And the gaussian weight factor is generated by using the spatial distance relationship between two pixels. The formulation description is generally as follows:
Figure BDA0002036626270000051
Figure BDA0002036626270000052
where c is the Gaussian weight based on spatial distance and k isd(x) For unitizing the results.
In the low-pass filtering algorithm, only the relation of spatial positions among pixels is considered in the Gaussian filtering, so that the filtering result loses edge information, and the edge information is an effective Raman signal with stable peak position along with time. The bilateral filtering is to add another weight subsection in the gaussian filtering to solve the problem. The preservation of edges in bilateral filtering is achieved by the following expression:
Figure BDA0002036626270000053
Figure BDA0002036626270000054
where s is a Gaussian weight based on the degree of similarity between pixels, kr(x) The same is used to unitize the results. And combining the two to obtain bilateral filtering based on spatial distance and similarity comprehensive consideration:
Figure BDA0002036626270000055
Figure BDA0002036626270000056
the unitized part k (x) in the above formula is obtained by combining two gaussian weights, wherein the calculation of c and s is described in detail as follows:
Figure BDA0002036626270000061
and d (xi, x) ═ d (xi-x) | xi-x |
Figure BDA0002036626270000062
And has sigma (phi, f) as sigma (phi-f) phi-f phi
The expressions given above are all infinite integration in space, which needs to be discretized in a pixelized image. Pixels whose distance exceeds a predetermined level have practically little influence on the current target pixel and can be ignored. The discretization formula after the local sub-region is defined can be simplified into the following form:
Figure BDA0002036626270000063
the iterative bilateral filtering method comprises the following operation steps: (1) setting a sigma factor sigma _ s of a bilateral filter function spatial domain, wherein the spatial domain refers to a t-x region, namely a 2D region formed by time, wavelength or Raman shift, and the sigma factor of the spatial domain is selected to contain more frames of spectra as much as possible but needs to be smaller than the Raman characteristic peak width; (2) setting a sigma factor sigma _ r of a bilateral filter function pixel range region, wherein the pixel range region refers to a Raman intensity range at each wavelength or Raman intensity position on each frame of spectrum, each time the sigma _ r is set, the sigma _ r is halved or subtracted by a preset step length until the sigma factor sigma _ r is smaller than the set minimum value Smin, keeping the sigma _ r equal to the Smin unchanged, selecting an initial value of the sigma _ r, and obtaining the sigma _ r by reserving two decimal numbers according to a result of dividing the sum of the average values of all noise regions by the half of the standard deviation of all noise regions obtained in the step two; (3) bilateral filtering is carried out on the constructed 2D image; (4) and (5) calculating the standard deviation and the average value ratio of each noise area of the filtered image according to the position information of the noise area recorded in the step two, and if the ratio is larger than a preset threshold value, returning to the step (2). (5) And obtaining a final iteration result after filtering.
The bilateral filtering method has the advantages that the noise randomly changing along with time is greatly reduced on the basis of effectively retaining the effective Raman signal with stable peak position along with time. And the weight can be well set by adjusting the size of the sigma _ r parameter, the single smoothing precision is improved by iteration, and the effective Raman signal cannot be blurred when noise is smoothed out like one-time smoothing.
Has the advantages that:
1. according to the real-time noise reduction enhancement method of the ultraviolet Raman spectrum system, the statistical classification, the 2D construction and the iteration bilateral filtering method are adopted according to the physical characteristics of the ultraviolet Raman signal and the random noise, and compared with a common spectrum superposition or smoothing method, the method can effectively reduce the random noise of the Raman spectrum and greatly improve the signal-to-noise ratio.
2. The invention discloses a real-time noise reduction enhancing method of an ultraviolet Raman spectrum system, which is a classification smoothing method after spectrum segmentation based on statistical effective valleys and peaks, effectively predicts and judges the effective valleys and peaks by analyzing the physical characteristics of random noise, effectively classifies the spectrum after the spectrum segmentation, and greatly smoothes a noise area independently.
3. The invention discloses a real-time noise reduction enhancing method of an ultraviolet Raman spectrum system, which is a method for constructing a spectrum into a 2D image along with time.
4. The invention discloses a real-time noise reduction enhancing method of an ultraviolet Raman spectrum system, which is based on a bilateral filtering method of self-adaptive iteration, utilizes the edge protection characteristic of a bilateral filtering algorithm, not only removes noise points which cannot form edges in a Raman spectrum image constructed by 2D, and keeps Raman characteristic peak signals forming the edges, but also can set a very small Gaussian weighting factor for bilateral filtering, can ensure filtering precision through the iteration method, and can not generate the situation that too many filtering at one time causes distortion of a noise reduction spectrum result.
Drawings
Fig. 1 is a general flow chart of the ultraviolet raman spectroscopy system real-time noise reduction enhancement method of the present invention.
FIG. 2 is a flow chart illustrating steps of the present invention.
FIG. 3 is a flow chart illustrating the steps of the present invention.
Fig. 4 is a schematic flow chart of steps of the method, wherein fig. 4a is a schematic flow chart of 2D spectral image construction, and fig. 4b is a schematic flow chart of processing of an iterative bilateral filtering method.
Fig. 5 is a schematic diagram of an example of a heroin ultraviolet raman spectrum processing result according to the present invention, in which fig. 5a is an unprocessed frame of raman spectrum original image, fig. 5b is a temporarily stored 10 frames of raman spectrum original image to be processed, and fig. 5c is a processed raman spectrum result.
Fig. 6 is a schematic diagram showing an example of the processing result of the uv raman spectroscopy on other samples according to the present invention, wherein fig. 6a is an original drawing of the raman spectroscopy of an untreated frame of acetaminophen tablet, fig. 6b is the raman spectroscopy result of the treated acetaminophen tablet, fig. 6c is an original drawing of the raman spectroscopy of an untreated frame of cefixime dispersible tablet, and fig. 6d is the raman spectroscopy result of the treated cefixime dispersible tablet.
Detailed Description
For a better understanding of the objects and advantages of the present invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings and examples.
Example 1:
at present, a portable 266nm laser excitation Raman spectrum system self-developed in a laboratory is utilized to carry out Raman detection on a Heroin Heroin sample, the acquisition integration time is 2 seconds, N is 9, namely, when a computer is kept receiving a new frame of spectrum, the first 9 frames of spectrum are temporarily stored, the x axis is Raman displacement, the sample starts to carry out real-time noise reduction enhancement processing on the ultraviolet Raman spectrum system after being stably placed for 6 seconds, and the real-time noise reduction enhancement processing flow of the ultraviolet Raman spectrum system is shown in figure 1.
The method for enhancing the real-time noise reduction of the ultraviolet Raman spectrum system disclosed by the embodiment comprises the following specific implementation steps:
the method comprises the following steps: as shown in fig. 2, the ultraviolet raman signal of the heroin sample is collected in real time, and the data of the collected raman signal is counted, so as to predict the effective peak value of the raman signal, wherein the effective peak value comprises effective valleys and peaks.
The method comprises the steps of acquiring ultraviolet Raman signals of a heroin sample in real time from a spectrometer in a front-end Raman detection system, transmitting the acquired real-time Raman signals to a computer signal buffer area through USB communication, wherein the signal buffer area is used for keeping 10 frames of stored spectra, deleting the first 10 frames of spectral data when acquiring a new frame of spectrum, and finishing the acquisition of Raman signal data. And performing valley and peak statistics on the 10 frames of images, and listing a valley netlist and a peak netlist. Presetting a statistical classification allowable interval step size to be 3, if the peak netlist of the 9-frame spectrum has peaks in the interval with the step size of 3 and the absolute value of the slope at the left end or the right end of the interval is more than 240, marking the peak as an effective peak, wherein the effective peak is a Raman peak with high intensity, and recording the position of the effective peak. For the 10-frame spectrum valley netlist, the true spectrum valley point is predicted by the following method, and the true spectrum valley point is predicted under the following three conditions: in case one, if the spectrum of less than or equal to 5 frames has a valley in the step length 3, the spectrum is not an effective valley; in the second case, if the spectrum of more than or equal to 9 frames has a valley in one step length 3, the spectrum is an effective valley, and the Raman shift position of the valley is recorded; and thirdly, under the condition that a valley exists in a step length 3 of the spectrum which is more than 5 and less than 9 frames, observing whether the near step length around the valley value is in a region of 3, whether a Raman peak with high intensity recorded in the peak netlist exists, recording the Raman peak into the valley netlist if an effective valley exists, superposing the 10 frames of the spectrum if the effective valley exists in the region of 3, recording the effective valley into the valley netlist, predicting the true spectrum valley point according to the three conditions, and obtaining the valley netlist. And predicting the effective peak positions of the Raman signal through the statistical low-valley netlist and the statistical peak netlist.
Step two: as shown in fig. 3, for each frame of raman spectrum, each frame of raman spectrum is divided into each block region through the effective valley obtained in the first step, the attributes of each divided block region are respectively determined, the noise region is filtered, and then the raman signal region and the filtered noise region are spliced. The region attribute refers to a noise region attribute or an effective raman signal region attribute.
And C, dividing each frame of Raman spectrum acquired in the step I into each block area through the valley netlist of each frame of Raman spectrum predicted in the step I, judging the attribute of each area, and respectively determining the attribute of each block area, namely respectively determining whether each block area is a noise area or an effective Raman signal area. For a single region, there are two criteria: the first criterion is: when a Raman peak with high intensity recorded in the peak net list obtained in the first step exists in the region, determining the Raman peak as an effective Raman signal region; the second criterion is: selecting the length 9 as a step length, carrying out least square method estimation smoothing, judging the ratio of the standard deviation and the average value of the smoothed data in the region, if the ratio of the standard deviation and the average value is more than 0.05, determining the region as an effective Raman signal region, otherwise, determining the region as a noise region.
And after determining the attribute of each block region, performing least square smoothing filtering with the step length of 20 on the noise region, filtering out the noise of the noise region, and recording the Raman displacement position information of all the noise attribute regions. Then, the effective Raman signal region and the filtered noise region are spliced.
And step three, as shown in fig. 4a, processing each frame of raman spectrum acquired in the step one in the step two, splicing the 10 frames of spectra processed in the step two into a 2D image along a time axis, filtering the 2D image by an iterative bilateral filtering method shown in fig. 4b, and after filtering, overlapping and normalizing the 10 spectra along the time axis to obtain a raman spectrum subjected to noise reduction processing.
And (3) processing each frame of Raman spectrum acquired in the step (I) in the step (II), splicing the 10 frames of Raman spectrum processed in the step (II) into a 2D image along a time axis, wherein the x axis is a wavelength or Raman shift axis, the t axis is a time axis, and the z axis is Raman intensity. The 2D image is filtered by an iterative bilateral filtering method.
As shown in fig. 4b, the operation steps of the iterative bilateral filtering method are as follows: (1) setting a sigma factor sigma _ s of a bilateral filter function spatial domain to be 9; (2) setting a sigma factor sigma _ r in a pixel range of the bilateral filter function, selecting an initial value of the sigma _ r to be 0.08, halving the sigma _ r every time the sigma _ r is set, and keeping the sigma _ r to be 0.02 unchanged until the sigma _ r is less than 0.02, namely selecting the Smin to be 0.02; (3) bilateral filtering is carried out on the constructed 2D image; (4) and (5) calculating the ratio of the standard deviation to the mean value of each noise area of the filtered image according to the position information of the noise area recorded in the step two, and if the ratio is more than 0.0113, returning to the step (2). (5) And obtaining a final iteration result after filtering.
After filtering, 10 frames of spectra are overlapped and normalized along a time axis to obtain a Raman spectrum subjected to noise reduction treatment, the signal-to-noise ratio of the spectrum is greatly improved, and the effective Raman peak value is enhanced.
Fig. 5a shows an unprocessed frame of heroin raman spectrum original image, fig. 5b shows a temporarily stored 10 frames of heroin raman spectrum original image to be processed, and fig. 5c shows a heroin raman spectrum result processed by the ultraviolet raman spectroscopy system real-time noise reduction enhancement method.
Example 2:
the real-time noise reduction enhancement method of the ultraviolet Raman spectroscopy system is utilized to process real-time ultraviolet Raman detection signals of acetaminophen tablets and cefixime dispersible tablets respectively, and the acquisition method and conditions of the real-time ultraviolet Raman signals are consistent with those of the embodiment 1. When the real-time noise reduction enhancement method of the ultraviolet Raman spectrum system is implemented on an acetaminophen sheet, the absolute value threshold of the slope at the left end of the interval selected in the step one is 50, the threshold of the ratio of the standard deviation to the average value in the step two is 0.02, the initialization value of sigma _ r in the step three is 0.04, the selection of Smin is 0.01, and the threshold of the ratio of the standard deviation to the average value of each noise area of the filtered image is 0.005. When the method for enhancing the real-time noise reduction of the ultraviolet Raman spectroscopy system is implemented on cefixime dispersible tablets, the absolute value threshold of the slope at the left end of the selected interval in the step one is 50, the threshold of the ratio of the standard deviation to the average value in the step two is 0.05, the initialization value of sigma _ r in the step three is 0.08, the selection of Smin is 0.01, and the threshold of the ratio of the standard deviation to the average value of each noise area of the filtered image is 0.012.
FIG. 6a shows an original image of a Raman spectrum of an untreated one-frame acetaminophen tablet, and FIG. 6b shows a Raman spectrum of a treated acetaminophen tablet; fig. 6c shows an original drawing of the raman spectrum of an untreated frame of cefixime dispersible tablets, and fig. 6d shows the raman spectrum of the treated cefixime dispersible tablets.
The above detailed description is intended to illustrate the objects, aspects and advantages of the present invention, and it should be understood that the above detailed description is only exemplary of the present invention and is not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (7)

1. The real-time noise reduction enhancement method of the ultraviolet Raman spectrum system is characterized by comprising the following steps: comprises the following steps of (a) carrying out,
the method comprises the following steps: collecting ultraviolet Raman signals in real time, and counting the collected Raman signal data to predict effective peak values of the Raman signals, wherein the effective peak values comprise effective valleys and peaks;
step two: for each frame of Raman spectrum, dividing each frame of Raman spectrum into each block region through the effective valley obtained in the first step, respectively judging the attribute of each divided block region, wherein the region attribute refers to the attribute of a noise region or the attribute of an effective Raman signal region, filtering the noise region, and then splicing the Raman signal region and the filtered noise region;
step three, processing each frame of Raman spectrum acquired in the step one in the step two, splicing the N +1 frames of Raman spectrum processed in the step two into a 2D image along a time axis, filtering the 2D image by an iterative bilateral filtering method, and superposing and normalizing the N +1 frames of Raman spectrum along the time axis after filtering to obtain a Raman spectrum subjected to noise reduction processing;
the first implementation method comprises the following steps of,
acquiring an ultraviolet Raman signal in real time from a spectrometer in a front-end Raman detection system, and transmitting the acquired Raman signal to a signal cache region, wherein the signal cache region is used for keeping access to N +1 frames of spectra, and deleting the N +1 frame of spectral data when acquiring a new spectrum, so as to finish the acquisition of Raman signal data; performing low valley and peak statistics on the N +1 frame image, and listing a low valley netlist and a peak netlist; presetting a statistical classification allowable interval step length, dividing the whole spectrum into M allowable intervals along an x axis, wherein the x axis is a wavelength axis or a Raman shift axis, when a peak netlist of the N frames of spectra has peaks in each allowable interval and the absolute value of the slope at the left end or the right end of the interval is greater than a preset threshold value KmaxNamely N frames of spectra all satisfy the following condition,
the allowable interval has f' (x)m)>Kmax&&f'(xm+1)≤0,m∈Cm,m=1,2,…,M
The preset threshold value KmaxIf the value is equal to the absolute value of the maximum slope caused by random noise, marking the value as an effective peak, wherein the effective peak is a Raman peak with high intensity, and recording the position of the effective peak;
for the valley netlist of the N +1 frame spectrum, the judgment condition of the valley point is given by the following formula,
the allowable interval has f' (x)m)≤0&&f'(xm+1)≥0,m∈Cm,m=1,2,…,M
Then, the true spectrum valley point is predicted by the following method, and the true spectrum valley point is predicted by totally dividing the following three conditions: in the first case, in an allowable interval step length, if a valley point exists in a spectrum of less than or equal to (N +1)/2 frames, the spectrum is not an effective valley; in a step length of an allowable interval, if a valley point exists in the spectrum of more than or equal to N frames, the spectrum is an effective valley, and the effective valley position is calibrated and recorded according to the average value or the weight average value; in a step length of an allowable interval, a valley point exists in a spectrum which is larger than (N +1)/2 and smaller than N frames, and whether the spectrum is a valid valley is judged by a preset prediction condition, wherein the valley point possibly exists in the spectrum which is formed by the influence of noise at a low intensity peak; predicting a true spectrum valley point through the three conditions to obtain a valley netlist; and predicting the effective peak positions of the Raman signal through the statistical low-valley netlist and the statistical peak netlist.
2. The ultraviolet raman spectroscopy system real-time noise reduction enhancement method of claim 1, wherein: the second step is realized by the method that,
dividing each frame of Raman spectrum obtained in the first step into each block area through the valley netlist of each frame of Raman spectrum predicted in the first step, judging the attribute of each area, and respectively determining the attribute of each block area, namely respectively determining whether each block area is a noise area or an effective Raman signal area; for a single region, there are two criteria: the first criterion is: when a Raman peak with high intensity recorded in the peak net list obtained in the first step exists in the region, determining the Raman peak as an effective Raman signal region; the second criterion is: selecting the length of p allowable intervals in the step one as a step length, performing least square method smoothing, judging the ratio of the standard deviation and the average value of the smoothed data in the region, if the ratio of the standard deviation and the average value is greater than a preset threshold value, determining the region as an effective Raman signal region, otherwise, determining the region as a noise region; the preset threshold is one half of the average value of the ratio of the standard deviation to the average value after all the areas take the p allowable interval lengths in the step one as step lengths and are smoothed by the least square method; the first judgment standard is used for detecting a strong peak area; the second judgment standard is used for judging the weak peak;
after determining the attribute of each block region, performing large-amplitude smooth filtering on the noise region, filtering out the noise of the noise region, and recording all the wavelength or Raman displacement position information of the region judged as the noise attribute; then, the effective Raman signal region and the filtered noise region are spliced.
3. The ultraviolet raman spectroscopy system real-time noise reduction enhancement method of claim 2, wherein: selecting the number of p in the p allowable intervals in the step two as 3;
the principle of the second judgment standard in the step two is that the Raman width of the weak peak is larger than the sampling width, the noise width is the sampling width, least square filtering is carried out according to the estimated step length of the average width of the weak peak, the least square filtering smoothes the noise into an approximate straight line region, the weak peak can be effectively reserved, the ratio of the standard to the average value of the approximate straight line region after smoothing is obviously smaller than the ratio of the standard deviation to the average value of the weak peak region, and then the noise region or the effective Raman signal region is judged by calculating the ratio of the standard deviation to the average value of the region.
4. The ultraviolet raman spectroscopy system real-time noise reduction enhancement method of claim 1, wherein: the third step is to realize the method as follows,
processing each frame of Raman spectrum acquired in the first step by using a second step, splicing the N +1 frames of Raman spectrum processed in the second step into a 2D image along a time axis, wherein the x axis is a wavelength or Raman shift axis, the t axis is a time axis, and the z axis is Raman intensity; the 2D image is filtered through an iterative bilateral filtering method, after filtering, the N +1 spectrum is overlapped and normalized along a time axis, and a Raman spectrum subjected to noise reduction processing is obtained, the spectral signal-to-noise ratio is greatly improved, and the Raman effective peak value is enhanced.
5. The ultraviolet raman spectroscopy system real-time noise reduction enhancement method of claim 1, 2 or 4, wherein: the specific judgment method of the preset prediction condition for judging whether the prediction condition is the effective valley is as follows: and observing whether a high-intensity Raman peak recorded in the peak netlist exists in an allowable interval step region with a low valley value close to the left and right, recording the high-intensity Raman peak into a valley netlist if the high-intensity Raman peak exists in the peak netlist, if the high-intensity Raman peak exists in an effective valley, recording the high-intensity Raman peak into the valley netlist, if the high-intensity Raman peak does not exist in the effective valley, overlapping the N +1 frame spectrum, and if the low valley exists in the allowable interval step, recording the effective valley into the valley netlist.
6. The real-time noise reduction enhancement method of the ultraviolet raman spectroscopy system of claim 5, wherein: step one, the step size of the statistical classification tolerance interval is selected to be 3.
7. The ultraviolet raman spectroscopy system real-time noise reduction enhancement method of claim 1, 2 or 4, wherein: the iterative bilateral filtering method comprises the following operation steps: (1) setting a sigma factor sigma _ s of a bilateral filter function spatial domain, wherein the spatial domain refers to a t-x region, namely a 2D region formed by time, wavelength or Raman shift, and the sigma factor of the spatial domain is selected to contain more frames of spectra as much as possible but needs to be smaller than the Raman characteristic peak width; (2) setting a sigma factor sigma _ r of a bilateral filter function pixel range region, wherein the pixel range region refers to a Raman intensity range at each wavelength or Raman intensity position on each frame of spectrum, each time the sigma _ r is set, the sigma _ r is halved or subtracted by a preset step length until the sigma factor sigma _ r is smaller than the set minimum value Smin, keeping the sigma _ r equal to the Smin unchanged, selecting an initial value of the sigma _ r, and obtaining the sigma _ r by reserving two decimal numbers according to a result of dividing the sum of the average values of all noise regions by the half of the standard deviation of all noise regions obtained in the step two; (3) bilateral filtering is carried out on the constructed 2D image; (4) calculating the standard deviation and the average value ratio of each noise area of the filtered image according to the position information of the noise area recorded in the step two, and if the ratio is larger than a preset threshold value, returning to the step (2); (5) and obtaining a final iteration result after filtering.
CN201910327330.4A 2019-04-23 2019-04-23 Real-time noise reduction enhancement method for ultraviolet Raman spectrum system Active CN110032988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910327330.4A CN110032988B (en) 2019-04-23 2019-04-23 Real-time noise reduction enhancement method for ultraviolet Raman spectrum system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910327330.4A CN110032988B (en) 2019-04-23 2019-04-23 Real-time noise reduction enhancement method for ultraviolet Raman spectrum system

Publications (2)

Publication Number Publication Date
CN110032988A CN110032988A (en) 2019-07-19
CN110032988B true CN110032988B (en) 2020-11-13

Family

ID=67239786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910327330.4A Active CN110032988B (en) 2019-04-23 2019-04-23 Real-time noise reduction enhancement method for ultraviolet Raman spectrum system

Country Status (1)

Country Link
CN (1) CN110032988B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112485361A (en) * 2020-11-16 2021-03-12 武汉月成技术有限公司 Chromatographic signal low-delay filtering method for gas chromatographic analyzer
CN112666084A (en) * 2021-01-04 2021-04-16 国网山西省电力公司电力科学研究院 SF based on Raman spectrum6Noise reduction method for decomposition characteristic component detection
CN114113035B (en) * 2021-11-18 2024-02-02 北京理工大学 Identification method of transgenic soybean oil

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101036038A (en) * 2004-06-30 2007-09-12 化学影像公司 Multimodal method for identifying hazardous agents
CN105300954A (en) * 2015-09-02 2016-02-03 中南大学 Method for Raman spectrum characterization of heterogeneous foam layer minerals in antimony ore flotation
CN107818298A (en) * 2017-09-27 2018-03-20 厦门大学 General Raman spectral characteristics extracting method for machine learning material recognition

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8486565B2 (en) * 2007-03-28 2013-07-16 Asahi Kasei Chemicals Corporation Electrode, and lithium ion secondary battery, electric double layer capacitor and fuel cell using the same
US8570507B1 (en) * 2012-09-06 2013-10-29 Bruker Optics, Inc. Method and apparatus for acquiring Raman spectra without background interferences
CN105138826A (en) * 2015-08-10 2015-12-09 厦门大学 Raman signal reconstruction method under strong noise background
CN108064340B (en) * 2017-10-31 2020-06-16 深圳达闼科技控股有限公司 Focus deviation determination method, device, storage medium and electronic apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101036038A (en) * 2004-06-30 2007-09-12 化学影像公司 Multimodal method for identifying hazardous agents
CN105300954A (en) * 2015-09-02 2016-02-03 中南大学 Method for Raman spectrum characterization of heterogeneous foam layer minerals in antimony ore flotation
CN107818298A (en) * 2017-09-27 2018-03-20 厦门大学 General Raman spectral characteristics extracting method for machine learning material recognition

Also Published As

Publication number Publication date
CN110032988A (en) 2019-07-19

Similar Documents

Publication Publication Date Title
CN109993155B (en) Characteristic peak extraction method for low signal-to-noise ratio ultraviolet Raman spectrum
CN110032988B (en) Real-time noise reduction enhancement method for ultraviolet Raman spectrum system
Lu et al. Robust and efficient saliency modeling from image co-occurrence histograms
Yuan et al. Spectral–spatial kernel regularized for hyperspectral image denoising
CN110335204B (en) Thermal imaging image enhancement method
CN107657209B (en) Template image registration mechanism based on finger vein image quality
CN110991493B (en) Hyperspectral anomaly detection method for collaborative representation and anomaly rejection
CN111986098B (en) Passive terahertz image enhancement method containing fixed background
CN108444954B (en) Spectral signal peak detection method, device and system
CN116958036A (en) Method for inspecting pollution state of insulator by unmanned aerial vehicle based on hyperspectral technology
Su A filter-based post-processing technique for improving homogeneity of pixel-wise classification data
Kwan et al. A high-performance approach to detecting small targets in long-range low-quality infrared videos
CN110763913A (en) Derivative spectrum smoothing processing method based on signal segmentation classification
Sarkar et al. Empirical wavelet transform‐based fog removal via dark channel prior
Bhushan et al. An effective pre-processing algorithm for detecting noisy spectral bands in hyperspectral imagery
Alam et al. Hyperspectral target detection using Gaussian filter and post-processing
Nguyen et al. A novel automatic concrete surface crack identification using isotropic undecimated wavelet transform
CN107727634B (en) Laser Raman spectrum resolution processing method
CN111461999A (en) SAR image speckle suppression method based on super-pixel similarity measurement
Yan et al. Non-intrusive fingerprints extraction from hyperspectral imagery
Shi et al. Dissimilar pixel counting based impulse detector for two-phase mixed noise removal
CN111723808B (en) Infrared weak target extraction method based on maximum value background prediction
Peng Automatic Denoising and Unmixing in Hyperspectral image processing
CN113962900A (en) Method, device, equipment and medium for detecting infrared dim target under complex background
Gantenapalli et al. Selective mean filtering for reducing impulse noise in digital color images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant