Processing Spectrum
By denoising and fitting local extrema to the two-dimensional spectrum, combined with Hough transform and total variational denoising, the accuracy problem of the echelle grating spectrum is solved, and fast and efficient spectral analysis is achieved.
Patent Information
- Application Number
- CN202080085094.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-11
- Filing Date
- 2020-12-10
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2040-12-10
AI Technical Summary
Existing technologies struggle to accurately process two-dimensional spectra, especially echelle grating spectra, resulting in insufficient accuracy in determining the position and intensity of spectral peaks. Furthermore, conventional methods such as smoothing and averaging lead to resolution loss.
By denoising the spectrum, searching for adjacent local extrema, fitting line segments, identifying peaks and their positions, and using template matching and feature extraction techniques such as Hough transform, combined with total variation denoising algorithms and edge detection, the spectral processing method is optimized.
It improves the signal-to-noise ratio and accuracy of the spectrum, can process two-dimensional spectra quickly and efficiently, is suitable for a wide range of experimental conditions, and can achieve semi-real-time or even real-time spectral analysis.
Smart Images

Figure CN114787596B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to spectral processing. More specifically, it relates to a method for processing two-dimensional spectra, such as echelle spectra, in the fields of atomic spectroscopy and similar fields. Furthermore, this invention relates to a method for generating a template for spectral processing, to the use of this template, and to a spectral processing apparatus and an optical spectroscopic apparatus utilizing this method. Background Technology
[0002] It is well known that spectroscopy is used to analyze substances in various applications. For example, in the field of absorption spectroscopy, a portion of the energy from a light source is absorbed by the analyte at a specific wavelength, leaving a characteristic spectrum of the unabsorbed energy. This characteristic spectrum allows the identification of the analyte's chemical composition. Similarly, in emission spectroscopy, a characteristic spectrum of the energy released by the analyte is obtained. This spectrum is typically one-dimensional: the wavelengths of the spectrum can be plotted on a line.
[0003] In modern analytical atomic spectroscopy using echelle grating spectrometers and detectors, information about the chemical composition of the analyte is contained in a two-dimensional spectrum known as an echelle diagram or echelle spectrum. The positions of the spectral peaks in an echelle diagram are related to the wavelengths of atomic emission or absorption (depending on the type of experiment) characteristic of a particular element. Therefore, the positions of the spectral peaks contain information about the identity of the elements present in the sample. The intensity of the peaks indicates the amount of the element present. In principle, the echelle diagram contains the complete atomic composition spectrum of the sample. The accuracy of the atomic composition spectrum of an analyte depends directly on the precision to which the positions and intensities of the spectral components can be determined.
[0004] A typical echelle grating spectrum consists of bands or segments that may contain spectral peaks. In literature related to echelle grating spectra, segments are often referred to as “steps” and peaks as “lines.” To avoid confusion, in this document, the term “line” is intended to have its dictionary meaning, while the term “peak” is used to refer to the intensity peak of an echelle grating spectrum.
[0005] Two-dimensional spectral images captured by a detector can degrade for a variety of reasons. The original spectrum can have a wide dynamic range, which may be difficult to capture in a single exposure. The detector may have a limited number of pixels to capture the spectrum of interest. The original spectrum may contain multiple noise components, background structures, and / or may be subject to interference (i.e., overlap) within its segments. If a one-dimensional array detector is used, scanning the two-dimensional spectrum may introduce further degradation.
[0006] To achieve the desired accuracy in determining the position and intensity of spectral peaks, two-dimensional spectra are typically processed, for example, to compensate for any shifts and / or to calibrate the wavelengths. Examples of such processing techniques are provided in the paper “Automatic wavelength calibration procedure for use with an optical spectrometer and array detector” by D.Sadler, D. Littlejohn, and CV Perkins, *Journal of Analytical Atomic Spectroscopy*, 1995, Vol. 10, pp. 253–257.
[0007] US Patent 7,876,435 discloses a method for determining and correcting broadband background in complex spectra, such as echelle grating spectra. This known method includes recording a spectrogram, smoothing the recorded spectrogram, and reducing values exceeding the smoothed spectrogram. The resulting background spectrogram is subtracted from the initial spectrogram. Smoothing of the spectrogram is performed using a moving average. Repeated smoothing using a moving average is also described.
[0008] It has been found that simple background subtraction is insufficient to accurately determine the position and intensity of two-dimensional spectra, such as those of echelle gratings. Furthermore, it has been discovered that smoothing the spectrum using moving averages results in a loss of resolution, making it unsuitable for applications requiring high accuracy.
[0009] The paper "The Reduction of Fiber-Fed Echelle Spectrograph Data: Methods and an IDL-Based Solution Procedure" by J. Hall et al., *Publications of the Astronomical Society of the Pacific*, Vol. 106, March 1994, pp. 315-326, discloses the extraction of spectra of astronomical objects from fiber-fed echelle spectral data frames generated by a CCD (charge-coupled device). Averaging is used to reduce noise. However, averaging reduces accuracy, which is generally undesirable in spectroscopy. For example, the algorithm described by Hall et al. is particularly suitable for astronomical applications but less so for analyzing atomic spectroscopy. Summary of the Invention
[0010] The object of the present invention is to overcome the problems of the prior art and to provide a method and apparatus for processing spectra, specifically two-dimensional spectra, which provides greater accuracy in determining the position and intensity of peaks in the spectrum, specifically but not exclusively.
[0011] According to a first aspect, the present invention provides a method for processing a spectrum. According to a second aspect, the present invention provides a method for detecting a segment in a spectrum, the method comprising generating a template by means of the method according to the first aspect and matching the template to a spectrum. According to a third aspect, the present invention provides a software program product that allows a processor to execute the method according to any one of the first and second aspects. According to a fourth aspect, the present invention provides a spectral processing apparatus configured to perform the method according to the first and / or second aspects.
[0012] Therefore, the present invention provides a method for processing two-dimensional spectra, such as echelle grating spectra, wherein the spectra comprise segments having relatively high intensity separated by boundaries having relatively low intensity, and the spectra have been digitized by a detector, the method comprising:
[0013] -Denoise the spectrum;
[0014] - Search for at least one series of adjacent local extrema of the spectrum;
[0015] - Fit the lines by the adjacent local extrema of each series, with each line representing a segment;
[0016] - Identify any peak and its corresponding location; and
[0017] - Store the positions of the lines and any peaks.
[0018] Denoising the sample spectrum can significantly improve its signal-to-noise ratio, thereby increasing accuracy without significant loss of detail. In particular, denoising prepares the sample spectrum for subsequent processing steps. It should be noted that denoising preferably does not involve smoothing, as smoothing typically leads to data loss and thus accuracy degradation.
[0019] Segments of a spectrum can be identified by searching for one or more series of adjacent local extrema. That is, if adjacent local extrema are local minima, they may represent boundaries between segments. If adjacent local extrema are local maxima, they may represent ridges of segments, which will typically lie approximately halfway between their boundaries. In some embodiments, either a local minimum or a local maximum will be detected. However, in other embodiments, both local minimums and local maximums may be detected.
[0020] In embodiments using a two-dimensional array detector to digitize the spectrum, local extrema of each column of pixels in the array detector can be determined. Therefore, local extrema are the local extrema of each column of the array detector, and for each column of pixels in the array, local extrema can be determined. Based on the orientation of the spectrum relative to the array detector, local extrema of each row of pixels in the two-dimensional array detector can be determined. It should be understood that in embodiments using a scanning one-dimensional array detector, local extrema can be determined similarly, for example, by determining local extrema per individual (1D) array.
[0021] By fitting lines through each series or each string of adjacent local extrema, the boundaries between segments (in the case of local minima) or the ridges of segments (in the case of local maxima), and thus individual segments of the spectrum, can be identified. When lines define the boundaries between segments, each pair of lines represents the segment it encloses. Each line can be included in more than one pair, as adjacent segments can share lines defining their common boundaries. When lines define the ridges of segments, each individual line can be considered to represent a segment.
[0022] It should be noted that adjacent local extrema can include the nearest local extremum. That is, if, for at least one of two extrema, the distance to the other extremum is the shortest among all extrema, then the two extrema can be called adjacent extrema. The distance can be represented using any suitable distance metric, such as Euclidean distance (L2 distance) or city block distance (L1 distance). In practice, adjacent columns of an array of image pixels may each have a local extremum in the same row or only a few rows away, thus simplifying the search for a range of adjacent extrema. In some embodiments, subsampling can be used, which potentially makes the distance smaller than the width of a single pixel.
[0023] By identifying any peak and its corresponding position, the characteristic features of a segment are determined. The position of the peak is preferably determined relative to its segment, which, in the case of a mid-order grating spectrum, is an order. That is, the position of the peak can indicate the segment identifier (e.g., the number of orders) and a positional reference relative to a specific order. Additionally, the height and / or intensity of the peak can be determined. However, embodiments in which only segments are detected without detecting peaks are conceivable.
[0024] By storing lines or pairs of lines, along with the positions of any peaks, as templates, additional spectra can be processed more quickly and efficiently, as will be explained in more detail later. Templates can be adapted to, for example, a set of spectra of the same or similar analytes.
[0025] The method may further include using feature extraction to fit the line through adjacent local extrema of each series. That is, the line fitting can be assisted by feature extraction techniques to better fit the line and reduce the influence of noise that may cause outliers.
[0026] In the method according to the invention, feature extraction may include applying the Hough transform. By applying the Hough transform, outliers in a series of extrema can be easily identified, excluded, or corrected. The original Hough transform is disclosed in P. Hough's U.S. Patent 3,069,654 and is based on a polar coordinate transformation. It has been found that smoothing line fitting through the extrema of a two-dimensional spectrum is more effective when the coordinates of local extrema have been transformed to polar coordinates, for example, by using the Hough transform.
[0027] The lines fitted by adjacent local extrema of each series can be substantially smooth. That is, at least some of the lines can be completely smooth or at least primarily smooth. The smoothness of the fitted lines can be determined, for example, by measuring the minimum angle between two straight line segments connecting three consecutive pixels. If the angle is at least 160 degrees... 0 Preferably at least 170 0 More preferably at least 175 0 Then the line can be considered smooth.
[0028] The method described above can be further expanded to include the use of edge detection to search for a series of adjacent local extrema. That is, edge detection techniques, which may be known per se, can be used to find a series of local extrema and then a line can be fitted through each series. Examples of edge detection techniques are described in P. Perona and J. Malik, “Scale-space and edge detection using anisotropic diffusion”. Journal of Pattern Analysis and Machine Intelligence ( Transactions on Pattern Analysis and Machine Intelligence, Vol. 12, No. 7, July 1990, pp. 629-639.
[0029] In the method according to the invention, the angle of the fitted line relative to the axis of the sample spectrum can be limited to a predetermined range. In a typical echelle grating spectrum, the echelle extends approximately horizontally relative to the array detector, but this will, of course, depend on the orientation of the array detector relative to the imaging optics. Therefore, for example, any fitted line whose angle deviates significantly from the horizontal may be erroneous and may be based on outliers.
[0030] By limiting the angle of the fitted line to, for example, less than 30 degrees from the horizontal, while maintaining a substantially horizontal orientation. 0 or deviating from the horizontal by less than 20 0 This can reduce or completely eliminate errors. Besides angles, the curvature of the line can also be determined. In such embodiments, constraints can be imposed on the curvature of the line, for example, by requiring a minimum length for the radius of curvature. That is, using prior knowledge that the angle and curvature of a segment are within a certain range, the range (or a similar range) can be imposed on the segment, thereby limiting the impact of any detection errors.
[0031] Local extrema of a sample spectrum can include local maxima, in which case the fitted line can represent the ridge of the corresponding segment. The ridge of a segment can substantially coincide with the trajectory of the segment. That is, if the segment is an order, the ridge can represent the trajectory or overall orientation of the order.
[0032] Alternatively or additionally, local extrema of the spectrum may include local minima. In this case, each line may represent a boundary between segments. For example, each line may represent a boundary between two orders. In some embodiments, both boundaries and ridges may be defined. In some embodiments, the lines representing boundaries may be stored in pairs, thereby storing the data defining the boundaries of segments (e.g., orders) together.
[0033] Denoising can include the application of total variation denoising (TVD) algorithms. As mentioned above, denoising is superior to smoothing, which typically results in data loss. Various total variation denoising algorithms are known to those skilled in the art. The basic algorithm is described in the paper “Nonlinear total variation based noise removal algorithms” by LI Rudin, S. Osher, and E. Fatemi, Physica D 60(1–4); 259–268 (1992), the entire contents of which are incorporated herein by reference. In particular, denoising has been found to be particularly suitable for spectroscopy. Denoising, for example, by using TVD algorithms, has also been found to be particularly suitable for CID (charge-injection device) detector arrays, which typically have one A / D (analog-to-digital) converter per pixel, which in turn can produce, for example, higher dark currents than CCD (charge-coupled device) detector arrays.
[0034] The method according to the invention may further include determining the intensity of at least one identified peak. In addition to location, determining the intensity or height of the peak can provide a better identification of the analyte.
[0035] The determined location of the at least one identified peak may include an identifier of the segment in which the peak is located. That is, in addition to the relative position within a step and / or the absolute position within a pixel array generated by the array detector, the location may include a segment identifier (e.g., the number of steps).
[0036] Peak identification can include determining (local) maxima within a segment, such as the (local or global) maxima of a ridge. While peaks can be identified based on other metrics, such as volume or intensity (e.g., considering the degree of peaking in both directions and its height), determining (local or global) maxima is an efficient and computationally simple way to identify peaks. It should be noted that when detecting peaks, local maxima may not be determined by pixel columns or pixel rows, by order or by ridge. Therefore, a peak can be represented by the local maxima of detected ridges. Thus, when searching for peaks, local maxima should be detected in both directions (dimensions).
[0037] The method according to the invention may further include:
[0038] - Define at least one partial spectrum prior to the detection boundary, each partial spectrum being smaller than the stated spectrum; and
[0039] - Detect the boundaries of each individual part of the spectrum.
[0040] That is, one or more partial spectra can be defined, and the definition is subject to some or all of the method steps mentioned above. By using partial spectra instead of the entire spectrum, i.e., using subarrays instead of the entire pixel array, individual method steps can be performed faster and more efficiently. At least two partial spectra can be defined, and more partial spectra can be defined, such as four, eight, twelve, sixteen, thirty-two, or more partial spectra. The number of partial spectra can depend on, for example, the original spectrum and / or the processing power of the available hardware. Partial spectra can also be referred to as windows or sub-images.
[0041] At least some partial spectra may not overlap and therefore do not share common pixels. This may be the case when partial spectra are located in certain predetermined portions of the spectrum, such as where peaks are expected to occur. In this case, not all partial spectra may be adjacent to another partial spectrum. However, at least some partial spectra may have some overlap. In some embodiments, all partial spectra may have at least some overlap. The area covered by the partial spectra together may be smaller than the area covered by the spectrum, preferably less than 50%, more preferably less than 25%, in some cases less than 10%, or even less than 5%. However, in some embodiments, the partial spectra may together cover the entire spectrum.
[0042] The spectrum may include a first region with relatively high information density and a second region with relatively low information density. In this case, a first portion of the spectrum may at least partially cover the first region, and a second portion of the spectrum may at least partially cover the second region, with the lines of the first portion extrapolated to the second portion. For example, in a mid-echelon grating spectrum, light intensity and therefore information density are typically higher towards the top and middle of the spectrum (assuming the typical orientation of the spectrum), while information density is typically lower towards the lower left and lower right corners. By extrapolating the fitted lines from the first higher information density portion to the second lower information density portion, it is still possible to retrieve sufficient information from the second portion of the spectrum. That is, peaks may still be located in the second portion, and the position of the peaks relative to their segments can be determined.
[0043] At least one portion of the spectrum can lie entirely within regions with relatively low information density, such as the lower left and lower right regions in a typical echelle grating spectrum. Such a portion of the spectrum can be used for dark frame compensation, such as dark frame subtraction.
[0044] A single exposure using a detector can completely digitize the spectrum. In this case, a portion of the spectrum can be extracted from a single raw spectrum. However, in some embodiments, a portion of the spectrum can be obtained individually through separate partial exposures. These partial exposures may or may not have the same exposure time. Thus, in some embodiments, at least some partial spectra have been digitized using different exposure times. That is, two or more partial spectra have been obtained using different exposure times. The different exposure times can be based on prior knowledge of the spectrum, such as the local intensity of the partial spectra. The exposure time for a partial spectrum located in a region with relatively low information density may be longer than the exposure time for a partial spectrum in a region expected to have the highest peak.
[0045] The method according to the invention may further include fitting lines fitted together in partial spectra to provide smooth lines. The lines fitted in partial spectra may be boundaries and / or ridges of segments. Adjacent partial spectra may contain boundaries and / or ridges of the same segments. By fitting these lines together, the boundaries and / or ridges of segments can be assembled from two or more partial spectra. Typically, partial spectra may be fitted or “stitched” together, with features fitted to facilitate a smooth transition between partial spectra.
[0046] The lines detected and / or fitted in a portion of the spectrum (i.e., boundaries or ridges) can be substantially linear. Alternatively, the lines fitted in a portion of the spectrum can be substantially curved. Such substantially curved lines are preferably described by polynomials. When polynomials or other mathematical functions are used, the lines constituting boundaries and / or ridges can be described mathematically, thereby allowing for mathematical manipulation of the spectrum.
[0047] As mentioned above, the spectrum may include a medium-length echelle grating spectrum, and the segment may include the order of the medium-length echelle grating spectrum. The method according to the invention can be used, for example, for analyzing atomic spectroscopy.
[0048] The present invention also provides a method for detecting segments in a two-dimensional spectrum, the method comprising generating a template using the method described above. The method for detecting segments or bands in a spectrum may further comprise fitting the spectrum onto the template. This may involve image adjustment using known morphological operations, such as shifting, rotating, projecting, stretching, and shrinking the spectrum or template in at least one dimension, but preferably two dimensions. Morphological operations can be controlled by minimizing the mean square error (MSE), i.e., by minimizing the difference between the spectrum and the template. Fitting the spectrum onto the template can be computationally simpler than detecting segments of a single spectrum, especially when processing a series of similar spectra. This method may further comprise matching segments of the spectrum with segments of the template.
[0049] In some embodiments, fitting the two-dimensional spectrum onto the template is performed on a partial spectrum basis. That is, each partial spectrum can be fitted onto the template individually. In some embodiments, the template is a template for the entire spectrum, while in other embodiments, separate partial templates for at least some of the partial spectra can be generated. In some embodiments, the template for the entire spectrum can be used only for one or more partial spectra.
[0050] The present invention further provides a software program product for performing the above-described method. The software program product may include a tangible carrier storing instructions that allow a processor to execute the method steps according to the present invention. The tangible carrier may comprise a portable storage device (such as a DVD or USB stick) or a non-portable storage device, for example, a storage device that is part of a processing unit.
[0051] The present invention further provides a spectral processing apparatus including a processor having associated memory, wherein the processor is configured to perform the methods described above. In one embodiment, the spectral processing apparatus according to the invention further includes a detector, such as a two-dimensional array detector, for digitizing the spectrum.
[0052] The present invention further provides an optical spectroscopy apparatus, more specifically, a spectrometer, which includes a light source for generating a two-dimensional spectrum and a spectral processing device as described above. Attached Figure Description
[0053] Figure 1 An apparatus for spectroscopy that can be utilized using the present invention is illustrated schematically.
[0054] Figure 2 An echelle grating pattern that can be used in the method of the present invention is schematically shown.
[0055] Figure 3 schematically shown Figure 2 A series of steps in the echelle raster pattern.
[0056] Figure 4 A series of steps in an echelle raster map is schematically shown in the presence of noise.
[0057] Figure 5 This schematically illustrates the use of a window to analyze a two-dimensional spectrum.
[0058] Figure 6 A first embodiment of the method according to the present invention is illustrated schematically.
[0059] Figure 7 A second embodiment of the method according to the invention is illustrated schematically.
[0060] Figure 8 schematically shown Figure 7 Sub-steps of the method.
[0061] Figure 9 schematically shown Figure 7 Another sub-step of the method. Detailed Implementation
[0062] This invention can be applied to the field of analytical atomic spectroscopy, for example, to the processing of two-dimensional spectra (e.g., 2D echelle grating maps) acquired by spectrometers used for chemical analysis. Such spectra can be generated using an echelle grating spectrometer, which can be an optical emission spectrometer or an absorption spectrometer. Several sources can be used, such as ICP (inductively coupled plasma), MIP (microwave-induced plasma), or other plasmas, or other spectral sources such as sparks, arcs, lasers, or flames. The spectra can be detected and digitized using suitable detectors, specifically array detectors such as CCD (charge-coupled device), CMOS (complementary metal-oxide-semiconductor), CID (charge-injection device), or other types of array detectors, but CID detector arrays are particularly suitable. CID imaging arrangements are described, for example, in U.S. Patent 8,018,514 (Thermo Fisher Scientific), the disclosure of which is incorporated herein by reference. Optical emission spectrometers are described, for example, in U.S. Patent Application US 2019 / 0107437 (Thermo Fisher Scientific), the disclosure of which is incorporated herein by reference.
[0063] This invention seeks to provide a method and apparatus that allows for rapid and efficient processing of two-dimensional spectra, such as echelle grating spectra, thereby enabling semi-real-time or even real-time processing. This invention also seeks to provide a method and apparatus for processing two-dimensional spectra, which can be fully automated, accurate, robust to noise, and applicable under a wide range of experimental conditions. This invention facilitates rapid and automated level and peak detection.
[0064] Exemplary embodiments of the present invention may include some or all of the following steps:
[0065] - Use detectors such as two-dimensional array detectors to acquire spectral images, such as full-frame images;
[0066] - The acquired image is denoised by using a suitable algorithm, such as Total Variation Denoising (TVD), where the appropriate algorithm minimizes the loss of accuracy;
[0067] - Select a window (i.e., a sub-image) from the acquired image;
[0068] - Determine the local extrema (i.e., minimum and / or maximum values) of the spectrum in the selected window, where the local extrema indicate the segment of the spectrum (i.e., the order in the case of a mid-echelon grating spectrum);
[0069] - Identify a series of adjacent local extrema;
[0070] - Apply transformations such as linear Hough transform to each window to correct any outliers;
[0071] - Fit the polynomial to a series of adjacent local extrema in the corresponding window to match a series of adjacent local extrema in adjacent windows, preferably while imposing constraints on the angle between the polynomials and the orientation of the detector;
[0072] -Based on a series of adjacent local extrema and / or fitted polynomial identifier segments;
[0073] - Identify peaks within the spectral range;
[0074] - Store data characterizing peaks, such as the (absolute and / or relative) position of the peaks and / or the intensity of the peaks.
[0075] Not all steps need to be performed in the order presented above, and not all steps need to be performed. For example, the step of dividing the image into sub-images can be performed before the denoising step. This provides the advantage of denoising based on the properties of specific sub-images. To provide another example, in some embodiments, polynomials may not be used; instead, the properties of segments or bands (such as boundaries and / or routes) are described in another way, for example, by a set of boundary pixels. In some embodiments, subsampling can be performed to determine the location of local extrema and thus the route of the spectral segment with greater accuracy. Subsampling also allows for the determination of peak locations with greater accuracy.
[0076] In some embodiments, the steps outlined above can be applied to each image of the spectrum. In other embodiments, some of the steps above can be applied to one or more sample spectra to form a template, which can be used to process subsequent spectra more efficiently. Some steps, such as denoising, may be conditional upon determining whether denoising is necessary. Some steps may be performed in different orders, such as denoising a window and selecting a window.
[0077] The methods and apparatus of this invention can be used for wavelength calibration, diagnostics, troubleshooting, and analytical measurements. This invention can be used for both absorption and emission spectroscopy.
[0078] Exemplary embodiments of the device of the present invention can be used in Figure 1 It is displayed in the middle. Figure 1 The spectroscopic apparatus 100 schematically shown includes a light source unit 101, an optical device unit 102, a detector unit 103, a processing unit 104, and an input / output (I / O) unit 105. The light source unit 101 may, for example, include a discharge lamp and a sample that absorbs certain wavelengths; the light generated by the discharge lamp will be analyzed. For this purpose, the light 90 generated by the light source unit 101 is fed to the optical device unit 102, which may contain an echelle grating and a prism for generating the echelle grating spectrum. The light source unit 101 may alternatively or additionally include an ICP (inductively coupled plasma) torch.
[0079] Optical device unit 102 may contain additional optical elements, such as one or more mirrors and / or one or more lenses. Light 91 emitted from optical device unit 102 is projected onto array detector 103, where it is detected and converted into an electrical signal 92 representing a spectrum. Array detector 103 may include, for example, a CID (charge injection device) array. Electrical signal 92 is fed to processing unit 104, which may contain a microprocessor and associated memory. The memory may store instructions that allow the processor to perform method steps according to the invention. Processing unit 104 uses electrical signal 92 to generate information related to the echelle grating spectrum, such as information related to the position and / or intensity of peaks in the echelle grating spectrum. This information may be displayed and / or printed via I / O units, which may also forward this information to other devices.
[0080] Figure 2 An exemplary echelle grating spectrum is schematically illustrated. The echelle grating spectrum 1 is shown as including order 2. Order 2 in... Figure 2 The order is generally parallel and extends roughly horizontally. Order 2 can be curved, such that the angle between the order and the x-axis varies depending on the x-position. Order 2 is also shown to contain peak 5. Figure 2 Only a small portion of the peak is shown as an example. (Order 2 in...) Figure 2 The echelle is represented by its centerline or ridge, but in reality, it has a certain width and can be considered a segment of a two-dimensional spectrum. Regions 8 and 9 have lower information density because the intensities of the echelle and its corresponding peaks are very low in these regions. The highest intensities mainly occur in the middle echelle grating. Figure 1 Near the top.
[0081] Peak 5, which can be characterized as a (local) maximum of order, represents the light source. That is, chemical elements present in the light source cause specific peaks in the echelle grating spectrum, thereby allowing the identification of chemical elements based on the spectrum.
[0082] Figure 3 The example of an order is shown in more detail, where the order can be... Figure 2 The trapezoidal spectrum 1 is a portion of the cross-section along line QQ, and therefore is the cross-section of the array detector column using its detection spectrum. It should be understood that in Figure 3 In the middle, the order is perpendicular to the diagram (compared to...). Figure 2 The planar extension of ).
[0083] Order 2A is shown as having the highest intensity or amplitude A, which is Figure 2 The highest order in the examples. It can be seen that the magnitude A of the order gradually decreases, with the magnitude of order 2A being greater than that of order 2B, and the magnitude of order 2B being greater than that of order 2C, and so on. While this is typical, the situation where subsequent orders have even smaller magnitudes is not always the case.
[0084] The first order 2A is in Figure 3 The first order is shown as having a maximum value 3A and being bounded by local minima 4A and 4B. Similarly, the second order 2B is shown as having a (local) maximum value 3B and being bounded by local minima 4B and 4C. Therefore, each order can be viewed as constituting a spectrum with a width defined by local minima (such as 4B and 4C). Figure 2 A band or segment in (1) of the spectrum. The amplitude A at local minima such as 4A, 4B, etc., can be greater than zero or equal to zero.
[0085] exist Figure 3 As can be seen, the order can be identified by detecting two subsequent local minima, such as 4B and 4C, or by detecting a local maxima, such as 3B, or both. The local minima and maxima here are local extrema observed in the Y direction, i.e., in the vertical direction. If Figure 2 The spectrum is captured, for example, by a two-dimensional detector array. Figure 2 The lines QQ in the graph can be viewed as columns representing pixels. Therefore, in this example, Figure 3 The local extrema are the local extrema of each array column. It should be understood that, alternatively or additionally, the local extrema of each array row can be determined. However, due to the fact that in Figure 2 In the example, the order 2 is basically horizontally oriented, so determining the local extrema of each array column may be more efficient.
[0086] In practice, echelles are often difficult to distinguish because typical mid-order echelle grating spectra will contain noise. This noise can be introduced by the light source, by the optics, and / or by the array detector. Figure 4 An example of a practical cross-section illustrating a large number of echelle grating spectra is provided. As can be seen, noise makes it difficult to distinguish the orders, especially those with lower amplitudes and therefore lower signal-to-noise ratios. Noise makes detecting the peaks of the orders and determining their positions particularly difficult.
[0087] To reduce the impact of noise, this invention employs denoising, preferably total variation denoising (TVD). In contrast to smoothing, which can lead to a loss of image detail, denoising attempts to preserve image detail while reducing noise. TVD techniques are described in papers such as those by Rudin, Osher, and Fatemi, mentioned above.
[0088] Denoising can be applied to the entire image or only to selected sub-images or windows. That is, within the spectral image, sub-images can be defined, each having significantly fewer pixels than the complete image. The complete image can, for example, be divided into 4 (or fewer) to 16 (or more, such as 32) sub-images, which together constitute the complete image. Alternatively, between 4 (or fewer) and 16 (or more) sub-images can be selected from the complete image, which together contain fewer pixels than the complete image. Therefore, less relevant image regions can be excluded from processing. In some embodiments, the area covered by the sub-images together may be smaller than the area covered by the entire spectral image, for example, less than 90%, less than 50%, or less than 25%.
[0089] Figure 5 An example of using sub-images or windows is illustrated schematically. Image 1 is shown as comprising four sub-images or windows 10A, 10B, 10C, and 10D, which together cover only a portion of the entire spectrum 1. Each sub-image or window contains a portion of the spectrum.
[0090] In the illustrated example, windows 10A and 10B overlap, while window 10C does not overlap with the other windows. Windows 10A, 10B, and 10C can be selected based on prior knowledge and, for example, in a way that they contain certain expected peaks. Window 10D is selected to cover a portion of the spectrum with lower information density, which in this case is region 9. Such a window may not be used to identify peaks, since there may be no identifiable peaks in region 9, but rather to determine background noise. Window 10D can therefore be used for dark frame compensation.
[0091] like Figure 5 As can be seen, window 10A partially covers region 8, which has a lower information density. In this lower information density region 8, similar to region 9, it is difficult to accurately determine the characteristics of segments of the spectrum. According to another aspect of the invention, a portion 11 of the covered region 8 of sub-image 10A may not be used to determine the spectral characteristics. Instead, the remaining portion of window 10A can be used, and the results can be extrapolated to portion 11. That is, the spectral characteristics in the portion 11 of the window covering the low information density region (8 in this example) can be obtained by extrapolation from the remaining portion of the window. In this way, regions 8 and 9 of the spectrum can still be used at least partially. Extrapolation of a series of local extrema or lines connecting local extrema can be performed using known methods.
[0092] As mentioned above, denoising can be performed on a window (sub-image) basis. This allows denoising to be tailored to the properties of a specific window. Furthermore, if the area covered by the window together is smaller than the entire spectral coverage area, the total amount of denoising processing required can be reduced.
[0093] Once the spectrum is denoised, its characteristics can be determined. To this end, the method of this invention determines the local maxima and / or minima of the spectrum. See again... Figure 3 The method can determine the positions of minimum values 4A, 4B, 4C, etc., in this instance on the column of pixels. Therefore, the method can determine the boundaries between segments of an image (in the case of a mid-order grating spectrum, a segment is an order). Each pair of boundaries defines the segments between them. Alternatively or additionally, local maxima 3A, 3B, etc., can be determined, thereby generating ridges or approximate midlines of segments. A pair of boundaries or a ridge can be used to define a spectral segment ( Figure 2 (2) In some embodiments, a pair of boundaries and a ridge may be used.
[0094] When determining local minima and / or maxima to find segment boundaries and / or ridges, the resulting set of extrema will not form a smooth line. The location of the detected extrema may be affected by residual noise and pixel spacing. Note that the term "line" is used here to refer to a string of detected local extrema that represent segment boundaries and / or detected segment ridges.
[0095] To reduce the influence of any noise and smooth the boundaries and / or ridges, this invention proposes to use a transformation and smooth a series of extrema (which effectively constitute a line) found by detecting the locations of extrema in the transformation space. This invention preferably uses a polar coordinate-based transformation. The preferred transformation is the Hough transform, but other transformations may also be used.
[0096] The Hough Transform is described in the original Hough patent US 3,069,654 mentioned above, and in, for example, RODuda and PEHart, “Use of the Hough Transformation to Detect Lines and Curves in Pictures”, ACM Communications, Vol. 15, pp. 11-15 (January 1972).
[0097] Applying a transformation can include removing outliers in the transform domain. Outliers may be caused by noise and / or measurement errors. Removing outliers can improve the definition of lines in defined segments. It has been found that removing outliers in the transform domain is more effective than in the original domain. Specifically, the Hough transform describes a point in a plane as a combination of distance and angle, where the distance is the distance from the origin and the angle is the inclination of the order at that particular point. It has been found that outliers often have incorrect angles. The method of the present invention can remove such outliers or correct angles, for example, by replacing the detected incorrect angles with an average angle. In addition to correcting or removing outliers, angles can also be smoothed. After correcting outliers and / or smoothing angles, an inverse transformation can be performed to bring the data points back to the original domain.
[0098] Before applying the transform, edge detection can be performed to better identify the edges of image segments. Edge detection can be performed using conventional techniques, such as the Canny edge detection algorithm described in J. Canny, "A Computational Approach to Edge Detection", IEEE Transactions on Pattern Analysis and Machine Intelligence 8(6):679–698, 1986. Other edge detection algorithms can be used as alternatives.
[0099] As mentioned above, images can be processed on a sub-image or window basis. That is, transformations and / or edge detection can also be performed on a sub-image basis. After inverse transformation and any edge detection, windows can be stitched together to form a composite image. It should be ensured that the detected segments are continuous and have smooth boundaries when stitched together, which can be done using known techniques. An example of image stitching techniques is disclosed in Steve Mann, “Compositing Multiple Pictures of the Same Scene,” Proceedings of the 46th Annual Imaging Science & Technology Conference, May 9-14, Cambridge, Massachusetts, 1993. Again, stitching should ensure that the lines representing the boundaries or ridges of the segments are uninterrupted and smooth, without corners.
[0100] Spectral images generated by stitching or from inverse transform and / or edge detection have associated lines representing the boundaries and / or ridges of spectral segments. These lines can be fitted onto the (original or denoised) spectrum. Peaks can then be detected and associated with their order. Peaks in the spectrum can be detected using any suitable algorithm, such as detecting local maxima along segments. Thresholding can be applied to limit the number of detected peaks and eliminate smaller peaks.
[0101] For each peak detected that exceeds a threshold (if any), the following data can be recorded:
[0102] - The peak order was detected;
[0103] The relative positions of peaks within the first order; and
[0104] - Peak intensity (height and / or width).
[0105] Therefore, the present invention can be used to detect segments (or steps in the case of echelle grating spectra) and thus determine the position of a peak relative to its corresponding segment.
[0106] The boundaries and / or ridges of the segments representing the spectrum in each spectral image can be determined individually. However, in some embodiments, the resulting set of lines can be used for several spectra, for example, for many subsequent similar spectra. This saves the computational effort of individually determining the boundaries and ridges of each spectrum. Thus, the lines of one spectrum can be used as a template for a series of spectra.
[0107] Figure 6 The first embodiment of the method according to the present invention is illustrated schematically. Figure 6 Method 6 shown in the diagram begins at 60. In step 61, a two-dimensional spectrum is obtained, for example, by capturing the spectrum using a two-dimensional array detector, or by retrieving a previously captured spectrum from memory.
[0108] In step 62, the spectrum is denoised, preferably using total variational denoising. The result of step 62 is a denoised two-dimensional spectrum. In this embodiment, a partial spectrum or window is used to process only the portion of the spectrum of interest. For this purpose, one or more windows are selected in step 63. Within each window, a series of adjacent local extrema are detected in step 64. In step 65, a line is fitted through each series of adjacent local extrema, for example, by using a polynomial. The line fitting step may further include using feature detection, for example, by using a Hough transform.
[0109] Step 65 may contain the following sub-steps:
[0110] - Transform the string of extreme values;
[0111] - Correct any outliers to produce a corrected string; and
[0112] - Perform inverse transformation on the string of extreme values.
[0113] In step 66, windows are merged when necessary, i.e., when they share a boundary or overlap. Merging windows may involve fitting the lines of the windows together and optionally adjusting these lines if their angles and / or curvatures do not correspond. Adjustment may involve fitting a new line, constrained by the maximum angle and / or maximum curvature at their junction, that is, the new line being closest to the two corresponding lines from the two windows. A smoothing algorithm may be applied in this case.
[0114] Lines can be used to depict segments of the spectrum, and peaks within each segment can be detected in step 67. In step 68, peak data for each peak, such as each relative position and / or intensity, can be stored together with data describing the fitted (and, where appropriate, adjusted) line. The method ends in step 69. It should be understood that this embodiment is merely exemplary and many modifications and additions can be made within the scope of this invention.
[0115] Figure 7 A second embodiment of the method according to the invention is illustrated schematically. Figure 7 Method 7 and Figure 6 Method 6 is basically similar, but some steps are performed in a different order. Method 7 begins at 70, then proceeds as follows... Figure 6 In step 61, the spectrum is obtained in step 71. Compared to method 6, method 7 first selects a window in step 72, and then denoises the spectrum in step 73 by denoising a portion of the spectrum of the selected window. By denoising only a portion of the spectrum, less spectral image data is typically processed, thus saving resources. It should be noted that in at least some portions of the spectrum, denoising may not be necessary if the noise level is low enough, thus also saving resources.
[0116] The method continues with steps 74 and 75, in which step 74 a series of local extrema are detected in a portion of the spectrum (window), and in step 75 one or more lines are fitted through the series of local extrema. If the window is small enough, a single straight line can be fitted through at least some of the series. That is, in some windows, one of multiple extrema in a series of local extrema can be approximated by a single straight line, the series of which is typically curved.
[0117] and Figure 6Compared to method 6, in method 7, peaks are detected before window merging. Peaks are detected in step 76, for example by finding the local intensity maximum on each of the lines determined in step 75. In method 7, this can be done window-by-window. Then, in step 77, the windows can be merged. In some embodiments, this may include generating a composite image from the windows by “stitching” them together, but in other embodiments, no actual composite image is generated, but the position of the peaks relative to the windows can be transformed into their position relative to the entire image. The fitted lines and / or peaks can be stored in step 78, after which the method is carried out by means of step 79.
[0118] Methods 6 and 7 can be applied to process spectral images individually or sequentially. In the case of sequential processing, the method may not end after step 68 or 78, but may return to step 61 or 71. The method can also be used to determine templates for subsequent matching with spectral images.
[0119] Examples of steps 73 and 74 of method 7 are described in Figure 8 and 9 More detailed illustrations are shown below (it should be noted that these embodiments can also be applied to...). Figure 6 (Corresponding steps 62 and 64). Figure 8 Step 73 begins by determining in substep 731 whether denoising is needed. This can be done based on prior knowledge, on testing, or both. It may be known beforehand that a particular spectral image or window contains little noise, or that a particular window does not contain relevant peaks. This may be especially true when a template is first created and the processing of other spectral images consists primarily of fitting the template to the image. In that case, the positions of the segments (e.g., the order in a mid-echelon grating spectrum) are known, and it may be feasible to determine only the positions of the peaks, even in the presence of noise. When determining whether denoising is needed based on testing, any suitable method can be used to determine the noise level. Examples of suitable methods include performing a Fourier transform on the image signal and evaluating the variance of the resulting spectrum at high frequencies, such as around half the sampling frequency.
[0120] The determined noise level can be compared to one or two thresholds. If the noise level is too high, for example above a threshold where SNR (signal-to-noise ratio) = 1, denoising is almost useless (in some embodiments, the method can then end or return to step 61 or 71). If the noise level is too low, for example below a threshold where SNR = 1000 or SNR = 500, denoising is not required.
[0121] If the result of substep 731 is that denoising is required, the method continues to substep 732; otherwise, the method continues to step 74. In substep 732, it is determined whether the standard deviation σ of the noise is known. The noise properties can be known a priori or can be determined using a suitable method in substep 735, such as the Fourier transform method mentioned above. Then, in substep 734, a suitable denoising method, such as TVD (Total Variation Denoising), is used, for example, to denoise the spectral image or a portion (window) of the spectral image using the Rudin-Osher-Fatemi model. According to the invention, smoothing by averaging is preferably avoided. In substep 734, the noise parameter σ and any other noise parameters determined in substep 735 or known a priori can be used. After substep 734, the method proceeds to step 74.
[0122] Figure 9 An embodiment of step 74 is shown in more detail below. In this embodiment, step 74 begins with substep 741, in which a minimum value (typically: an extreme value) is identified in the spectral image or a specific window being processed. As is well known, a minimum value can be identified by comparing a pixel value (i.e., an image intensity value) with a set of neighboring pixels. In substep 742, it is determined whether a step (or more typically, an image segment) needs to be identified. Since a previously prepared template is used in some applications, the step and its intended location have already been identified. In that case, the method continues to substep 743, in which the window or the entire image is fitted onto the template by rotation, scaling, projection, and / or other image processing operations. When substep 743 is complete, the method continues to step 75.
[0123] If the result of substep 742 requires determining the order (or segment), a transformation, such as the Hough transform, is used in substep 744 to better identify the order boundaries (segment boundaries). Since the Hough representation may be noisy in step 745, the transformed representation is smoothed or denoised in substep 745. For example, outliers may be removed and / or a denoising algorithm may be applied. In this particular case, a form of averaging may also be applied. Then, in substep 746, a smoothing function is fitted to the smoothed representation of the minimum. The smoothing function may include a straight line or a line segment, and / or a parabola and / or other smoothed lines. Thus, the transformed minimum can be effectively replaced by the value of the fitted smoothing function. Then, in substep 747, the inverse transform is applied, after which the method continues to step 75.
[0124] The invention has been described above without using mathematics. Some aspects of the invention can be effectively described in mathematical terms, as explained below.
[0125] Noise Removal: Overview
[0126] A two-dimensional spectrum can be generated from a certain analyte, and the properties of the spectrum are yet to be determined. The following model can be used:
[0127] s = u + w, (1)
[0128] Where s represents the observed experimental measurement, and u is the signal generated by the analyte, which is corrupted by noise w. Here, the signal u is assumed to be sparse (or at least represented by it on some basis), while the noise w is always assumed to be dense. The denoising problem becomes recovering the sparse signal u (or its representation on some basis) from the observed dense signal s, which can be expressed as:
[0129]
[0130] Where H and A are matrices reflecting some properties of s and u (e.g., anisotropy, texture, etc.), and ||H(s-Au)||2 is the L2 norm (Euclidean norm). Regularization parameter F i (u) is a linear transformation of u, while Σ i This represents the sum of all i. It should be noted that in the problem described in Equation 2, u does not necessarily have to be sparse, provided that F... i (u) is sparse (see below). The first term in Equation 2 minimizes the difference between the observed s and the sought signal Au in the sense of the L2 norm, while the second term minimizes the difference in the L2 norm. p Ensuring F in the sense of norm i A set of constraints on the sparsity of (u)' and u. Although the problem described in Equation 2 does not have an analytical solution in most cases, there are numerous fast and efficient iterative methods to solve the problem, which are well known in the art:
[0131] ●L. Condat, “A direct algorithm for 1-D total variation denoising”, IEEE Signal Processing Letters, 20(11):1054–1057, November 2013.
[0132] ●M. Figueiredo, J. Bioucas-Dias and R. Nowak, “Majorization-minimization algorithms for wavelet-based image restoration”, IEEE Trans. Image Process., 16(12):2980–2991, December 2007.
[0133] ●MVAfonso, JMBioucas-Dias and MATFigueiredo, “Fast image recovery using variable splitting and constrained optimization”, IEEE Transactions on Image Processing 19(9):2345-2356, September 2010.
[0134] ●T. Goldstein and S. Osher, “The splitBregman method for L1-regularized problems”, SIAM Journal of Imaging Science, 2(2):323–343, 2009.
[0135] ●C.Wu and X.Tai, “Augmented Lagrangian method, dual methods, and split Bregmaniteration for ROF, vectorial TV, and high order models”, Journal of SIAM Imaging Science, 3(3):300-339, 2010.
[0136] Since it is infeasible to recover the signal u from the observation s which exceeds the uncertainty imposed by the noise w (Equation 1), the regularization parameter λ i The value of (Equation 2) should reflect the nature of the noise w specific to the experimental technique.
[0137] The 3D representation of an order in a mid-level grating spectrum has the form of horizontal quasi-parallel ridges with groove-like boundaries separating them. The problem of identifying each individual order can then be reshaped into the problem of detecting either ridges or grooves (or a combination of both). The latter can be solved in two steps: first by detecting successive extensions of local minima (or maxima), and then by fitting a smooth line using the found segments.
[0138] Using edge detection methods in extremum detection can be beneficial. Many such methods are well known in the art and will not be discussed further here.
[0139] Since the order in the echelle grating spectrum can be well characterized, it is advantageous to use feature extraction methods such as the Hough transform in steps involving smoothing a line through the detected extrema. A particular advantage of this method is that it decomposes any signal into a set of features with analytical representations, such as lines, polynomials, etc.
[0140] Once a two-dimensional spectrum is divided into multiple segments or bands, peak characterization can be accomplished using any peak detection method.
[0141] Noise Removal: Considerations for Practical Implementation Plans
[0142] a. Selection of operators "H" and "A"
[0143] The choice of matrix A depends primarily on the specific properties of the data being analyzed and the desired processing outcome. Therefore, it may be advantageous to use A = I, where I is the identity operator, for the purpose of extracting the signal from speckle noise. The linear transformation in the first term of Equation 2 can also be used in a way that filters out some undesirable but characteristic features of s specific to the experimental technique. Specifically, echelle maps are known to have speckled baselines whose frequency domain characteristics differ significantly from those produced by individual orders and lines. Therefore, it may be advantageous to choose matrix H that acts as a high-pass filter, such that all low-frequency components of s (representing the baseline) are uncorrelated in the context of the minimization procedure, effectively removing the baseline from u. Detailed descriptions of how to construct such filters can be found elsewhere (e.g., IWSelesnick, H.L. Graber, DSPfeil, and R.R. Barbour, “Simultaneous low-pass filtering and total variation denoising”, IEEE Transactions on Image Processing, Vol. 62, pp. 1109-1124, 2014). Alternatively, H = I can be set, which delegates baseline subtraction from u to the following steps of the echelle raster processing.
[0144] Alternatively, linear transformations can be used to enhance the informative features of the original signal s in u. For example, considering the quasi-parallel nature of the order in a mid-order grating spectrum, it may be beneficial to emphasize its directional features using A, which acts as an anisotropic convolution operator during the denoising process. The methods for constructing and applying such operators are well known in the art (P. Perona and J. Malik, "Scale-Space and Edge Detection Using Anisotropic Diffusion"). (Paper on Pattern Analysis and Machine Intelligence, Vol. 12, No. 7, July 1990, pp. 629–639).
[0145] b. Sparse representation F i (u)' choice
[0146] For the solution to equation 2, the u that exists and is actually realizable does not necessarily have to be a coefficient; its linear transformation F is found. i A non-empty set of (u) is sufficient, where each individual F i (u) is sparse. Any intermediate echelle grating spectrum inherently contains a finite number of orders and lines (i.e., a finite number of extrema), and can be assumed to be piecewise flat even without prior baseline removal (see above). Depending on the design, intermediate echelle gratings are most commonly used between orders 20 and 200. It is guaranteed that the first K (partial) derivatives of u are sparse. Therefore, it is beneficial to use...
[0147] F i (u)=D i u, (3)
[0148] Where D i This is the i-th order reciprocal operator. Incorporating equation 3 into equation 2 produces...
[0149]
[0150] The rank in the echelle grating spectrum has a specific orientation in the XY plane; therefore, it may be beneficial to weight and estimate the sparsity in the two directions separately. This can be achieved by restating the minimization problem (Equation 4) as follows:
[0151]
[0152] in and Let be a partial i-th order reciprocal operator, where its corresponding regularization parameter is . and It splits in the x and y directions. It should be noted that the tilt of the order in the echelle grating spectrum can be known a priori. The tilt of the echelle grating order can be calculated by using a cross-dispersive element, i.e., the dispersion of the grating or prism. It may be beneficial to scale accordingly. and For example
[0153] And (6.a)
[0154]
[0155] in Let f be the slope of order f. x and f y It is a scaling function.
[0156] c. Therefore, the regularization parameter λ i The value of '
[0157] The signal u can be reconstructed from an observation s with uncertainties imposed by noise, therefore λ is always a function of the noise w. Thus, it may be advantageous to use λ = ασ. w , where σ w Let w be the standard deviation of w, and α be the scaling parameter that determines the trade-off between false positives and false negatives. Since the informative content and noise characteristics of the echelle grating spectrum are spatially and directionally inhomogeneous, it may be beneficial for the value of α to depend on location (and gradient).
[0158] d. Characterizes noise "w".
[0159] A key characteristic of the echelle grating spectrum is its skewed power distribution in frequency representation. Most of the signal is concentrated in the low-frequency range (i.e., << 1 / 2 Nyquist frequency (v)). Conversely, noise is always dense, both in the frequency and time domains. Therefore, it may be advantageous to perform a Fourier transform on the observable signal and then evaluate the variance of said signal in the high-frequency range to obtain σ. w The estimated value. If the frequency response of the detector is known, this information can be used to enhance the fidelity of the estimate. Considering the inherent directionality of the echelle grating spectrum, it may be advantageous to perform the procedure independently in the x and y directions.
[0160] Given the spatial non-uniformity of the echelle grating spectrum, it may be advantageous to perform the above procedure (or any combination thereof) using a windowing method, either covering the entire spectrum (e.g., the echelle grating map) or only covering a selected region of interest.
[0161] Dividing the echelle raster pattern into individual levels: Considerations for practical implementation.
[0162] The orders in a mid-order echelle grating spectrum have inherent tilt and curvature, and can be well approximated by polynomials of order ≥1. Since the approximation range can be known a priori, significant gains in speed and fidelity can be achieved by reducing the search space for polynomial coefficients that reflect these values.
[0163] Since all echelle raster parameters (e.g., noise characteristics, directivity, etc.) are spatially non-uniform, a significant gain in fidelity can be achieved if processing is performed on a selected window of interest (i.e., a subarray), where these parameters can be evaluated locally with higher accuracy. Furthermore, a significant gain in processing speed can also be achieved because the echelle raster order can be approximated by a lower-order polynomial without loss of accuracy.
[0164] If the window of interest is large enough, it may be beneficial to further subdivide it into multiple (potentially overlapping) sub-windows (also referred to as sub-subarrays). Thus, the order in the original window can be reconstructed from those windows found among the multiple sub-windows using any curve-fitting method known in the art. Note that this approach can be extended globally to the processing of mid-echelon raster maps.
[0165] The size, position, and multiplicity of the window are primarily driven by the uniformity / spatial characteristics of the noise and available computational resources; however, several practical considerations exist. The window should preferably cover at least one order in the y-direction; the absolute minimum in the x-direction is imposed by the order of the polynomial used in the approximation of the echelle spectral order; in the case of using any anisotropic filtering (see above), the minimum usable window size is determined by the properties of the anisotropic operator used; other criteria for the minimum window size may also be applied.
[0166] Since the most informative portion of the echelle grating spectrum in the texture context is located in its central region, where the signal-to-noise ratio (SNR) is significantly reduced on either side, it may be beneficial to choose a location and window size that ensures at least partial overlap with the high SNR segment.
[0167] Implementation plan
[0168] The initial steps in constructing a 2D spectrum may involve a denoising step, as described in the “Denoising” text section. The selection of the parameter λ (Equation 2) is important in this step. The selection of this parameter is influenced by the noise level, which can then be obtained from the observed noise value σ. There are several ways that those skilled in the art can determine the value of σ (see subsections “c” and “d” of the “Noise Removal” text section for more details); one way is to segment the image into a set of vertical (i.e., perpendicular to the order) segments and find the variance of the signal in segments known to have no spectral lines. Once the noise value σ is obtained, the denoising procedure can be performed (Equation 2 or equivalently, Equation 4). The selection of appropriate operators is described in subsections “a” and “b” of the “Noise Removal” text section. The effect of using denoising with the selection of H = I and A = I, and i = 1 (Equation 4) on 1D and 2D segments is shown.
[0169] Those skilled in the art will understand that the present invention is not limited to the embodiments described above, and many modifications and additions can be made without departing from the scope of the invention as defined in the appended claims.
Claims
1. A method for processing a two-dimensional spectrum, the spectrum comprising segments having relatively high intensity separated by boundaries having relatively low intensity, the spectrum having been digitized by a detector, the method comprising: -Denoise the spectrum; - Search for at least one series of adjacent local extrema of the spectrum; - Fit the lines by the adjacent local extrema of each series, with each line representing a segment; - Identify any peak and its corresponding location; and -Store the positions of the lines and any peaks. The denoising described herein does not involve smoothing.
2. The method according to claim 1, further comprising: - Use feature extraction to fit the line through the adjacent local extrema of each series.
3. The method according to claim 2, wherein the features Extraction involves applying the Hough transform.
4. The method according to any one of claims 1-3, wherein the line fitted by adjacent local extrema of each series comprises a substantially smooth line.
5. The method according to any one of claims 1-3, further comprising: - Use edge detection to search for a series of adjacent local extrema.
6. The method according to any one of claims 1-3, wherein the angle of the fitted line relative to the axis of the sample spectrum is limited to a predetermined range.
7. The method of claim 6, wherein the local extrema of the sample spectrum include local maxima.
8. The method of claim 7, wherein each line represents a ridge of a corresponding segment.
9. The method according to any one of claims 1-3, wherein the local extrema of the spectrum include local minima.
10. The method of claim 9, wherein each line represents a boundary between segments.
11. The method of claim 10, wherein the lines are stored in pairs.
12. The method according to any one of claims 1-3, wherein denoising comprises applying a total variation denoising algorithm.
13. The method according to any one of claims 1-3, further comprising: - Determine the intensity of at least one of the identified peaks.
14. The method according to any one of claims 1-3, wherein the determined position of the at least one identified peak includes the identifier of the segment in which the peak is located.
15. The method according to any one of claims 1-3, wherein the identifying peak includes the maximum value within the defined segment.
16. The method according to any one of claims 1-3, further comprising: - Define at least one partial spectrum before the detection boundary, each partial spectrum being smaller than the spectrum; as well as - Detect the boundaries of each individual part of the spectrum.
17. The method of claim 16, wherein at least two partial spectra are defined, and wherein at least some of the partial spectra do not overlap.
18. The method of claim 16, wherein at least two partial spectra are defined, and wherein at least some of the partial spectra have some overlap.
19. The method of claim 16, wherein the area covered by the partial spectrum together is smaller than the area covered by the spectrum.
20. The method of claim 16, wherein the spectrum comprises a first region having a relatively high information density and a second region having a relatively low information density, wherein a first portion of a partial spectrum at least partially covers the first region, and a second portion of the partial spectrum at least partially covers the second region, and wherein the lines of the first portion are extrapolated to the second portion.
21. The method of claim 16, wherein at least a portion of the spectrum lies entirely in a region with relatively low information density.
22. The method of claim 16, wherein at least some portions of the spectrum have been digitized using different exposure times.
23. The method of claim 16, wherein at least four partial spectra are defined.
24. The method of claim 16, further comprising fitting the lines detected in the partial spectrum together to provide a smooth line.
25. The method of claim 16, wherein the line detected in a portion of the spectrum is a substantially linear line.
26. The method of claim 16, wherein the line detected in a portion of the spectrum is a substantially curved line.
27. The method of claim 26, wherein the curved line is described by a polynomial.
28. The method according to any one of claims 1-3, wherein the spectrum comprises a mid-echo grating spectrum, and wherein the segment comprises an order of the mid-echo grating spectrum.
29. The method according to any one of claims 1-3, used for atomic spectroscopy analysis.
30. A method for detecting segments in a two-dimensional spectrum, the method comprising: - A template is generated by using the method according to any one of the preceding claims; - Fit the two-dimensional spectrum onto the template; as well as - Match the segments of the spectrum with the segments of the template.
31. The method of claim 30, wherein fitting the spectrum onto the template includes image adjustment.
32. The method of claim 31, wherein the image adjustment includes at least one of rotation, scaling, and projection.
33. The method according to any one of claims 30-32, wherein fitting the two-dimensional spectrum onto the template is performed on a partial spectrum basis.
34. A software program product comprising instructions that allow a processor to perform the method according to any one of the preceding claims.
35. A spectral processing apparatus comprising a processor having associated memory, wherein the processor is configured to perform the method according to any one of claims 1 to 33.
36. The spectral processing apparatus of claim 35, further comprising an array detector for digitizing the spectrum.
37. A spectrometer comprising a light source for generating a spectrum and a spectral processing apparatus according to claim 35 or 36.
Citation Information
Patent Citations
Detector protection in an Optical Emission Spectrometer
US20190107437A1
Method and means for recognizing complex patterns
US3069654A
Method for determining background and correction of broadband background
US7876435B2
Charge injection device camera system for radiation-hardened applications
US8018514B1
Method for determining background and correction of broadband background
US20080106735A1