Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Real-time and high-throughput Raman signal extraction and processing in CARS hyperspectral imaging

Open Access Open Access

Abstract

We present a new collection of processing techniques, collectively "factorized Kramers–Kronig and error correction" (fKK-EC), for (a) Raman signal extraction, (b) denoising, and (c) phase- and scale-error correction in coherent anti-Stokes Raman scattering (CARS) hyperspectral imaging and spectroscopy. These new methods are orders-of-magnitude faster than conventional methods and are capable of real-time performance, owing to the unique core concept: performing all processing on a small basis vector set and using matrix/vector multiplication afterwards for direct and fast transformation of the entire dataset. Experimentally, we demonstrate that a 703026 spectra image of chicken cartilage can be processed in 70 s (≈ 0.1 ms / spectrum), which is ≈ 70 times faster than with the conventional workflow (≈7.0 ms / spectrum). Additionally, we discuss how this method may be used for machine learning (ML) by re-using the transformed basis vector sets with new data. Using this ML paradigm, the same tissue image was processed (post-training) in ≈ 33 s, which is a speed-up of ≈ 150 times when compared with the conventional workflow.

1. Introduction

Though long promised, coherent anti-Stokes Raman scattering (CARS) spectroscopic microscopy (microspectroscopy) has only recently demonstrated broadband hyperspectral biological imaging at acquisition rates far in excess of what traditional Raman microspectroscopy can provide [16]. With an imaging speed as fast as 50000 spectra per second [7], a new fundamental challenge arises: high throughput extraction of Raman vibrational information from the raw CARS spectra.

CARS spectra are quintessentially a coherent mixture of photons generated through vibrationally resonant (Raman) and nonresonant (electronic) processes. The electronic contribution is typically referred to as the "nonresonant background" (NRB) and is the root cause of CARS spectral distortion. Thus, a significant effort was made in the early years of CARS microscopy development to reduce the NRB via optical means [811]. The NRB, however, behaves as a stable homodyne amplifier for the Raman-generated signal; thus, reducing the NRB also reduces the Raman components of the signal. So important is the NRB's role in signal amplification [12], that without it CARS may show little to no benefit over spontaneous Raman spectroscopy for biological imaging [13].

Unlike additive fluorescent background signals in Raman spectroscopy, the NRB is coherent with the co-generated Raman-resonant CARS components. Beneficially, the NRB may amplify weak signals above the noise floor. Due to this coherent mixing that induces distortions in the spectral shapes, however, the NRB cannot be simply subtracted from the CARS spectra. There is, though, a fixed phase relationship between the Raman- and NRB-components. This inherent property led to the realization that computational methods could be used to extract the Raman portion of the CARS spectra using so-called "phase-retrieval methods": the Kramers–Kronig relation (KK) [14] or the maximum entropy method [15]. These early works assumed that the NRB was either known a priori or the NRB of a surrogate material (e.g. coverslip glass, water, salt [16]) was appropriate. Later, it was demonstrated that using surrogate materials for NRB approximations led to amplitude and phase errors that were linked analytically [17]. These errors could be corrected using "phase-error" correction (PEC) and "scale-error" correction (SEC) methods [17], which also reveals the relationship between the actual NRB and the surrogate. Importantly, this relationship demonstrated that CARS is unique among imaging techniques: it is inherently self-referencing. The spectral ratio of the Raman component to the actual NRB is an inherent property of a molecular system; thus, this ratio is maintained even in the case of sample scatter or absorption – just the signal-to-noise ratio (SNR) is affected. This enables one-to-one comparison of spectra between samples and even different CARS architectures (with different laser systems and wavelengths) [17]. Other coherent Raman methods, most notably stimulated Raman scattering (SRS) microscopy/spectroscopy [18], do not co-generate an NRB and do not have this internal referencing ability. Thus, SRS spectra are undistorted and useful for chemical identification, but the spectral amplitudes are not necessarily directly comparable with other results, potentially challenging quantitative analysis.

To extract robust, quantitative Raman component spectral data from the CARS spectra and to support the rapidly increasing data rates and volumes, we have developed a series of new methods collectively referred to as "factorized Kramers–Kronig and error correction" (fKK-EC). The new, unique principle of fKK-EC is that raw CARS spectral data can be factorized/decomposed into a small set of basis vectors on which the necessary processing steps will actually be performed. In this work, we use singular value decomposition (SVD) for its robust, accurate decomposition of matrices, although it is possible to use others as well. Previously, SVD has been used for denoising [1,17,19], but the remainder of operations were performed on the individual spectra. Additionally, matrix factorization, such as non-negative matrix factorization (NMF) / multivariate curve resolution (MCR) have been applied to post-processed data for analysis [19,20].

The fKK-EC is composed of three parts that will be described theoretically in more detail below: phase retrieval via a factorized KK relation (fKK), factorized PEC (fPEC), and factorized SEC (fSEC). These three parts operate on the basis vectors; thus, the image data is not reconstituted between each step. This limited operation on a small number of basis vectors is economical in terms of speed and memory usage without losing the spectral information, compared with the previous methods. Furthermore, basis vector sets can be re-used on new data; thus, the fKK-EC method can be used like a machine learning method, ML:fKK-EC, for short. In this paradigm, the full fKK-EC is performed (“trained") on a portion of data (e.g., the first image), and subsequent images are able to be processed (in full) via matrix multiplication. This factorized method enables new data to be processed on-the-fly in real-time during acquisition: denoised, phase-retrieved, and phase- and scale-error corrected. Like all ML methods, this process does require that the training data reflect what will be contained in upcoming data – though this is readily testable as will be discussed.

2. Theory

2.1 Background: conventional post-processing for a single CARS spectrum

CARS is a third-order nonlinear scattering phenomenon in which two photons ("pump" and "Stokes") excite a Raman vibrational mode from which a third photon ("probe") inelastically scatters [2]. Furthermore, this process does not happen in isolation and other nonlinear processes, such as degenerate four-wave mixing, may occur, leading to the generation of a so-called nonresonant background (NRB). So ubiquitous is the NRB that theoretical treatments of the CARS mechanism automatically incorporate the NRB, and the term "CARS signal" implies a coincident NRB. Thus, in this manner the CARS signal, $I_{\mathrm {CARS}}$, may be described as [1]:

$$I_{\mathrm{CARS}}(\omega) ~\propto~ \left | \left \{ \left [E_{\mathrm{S}}(\omega)\star E_{\mathrm{p}}(\omega)\right ]\chi^{(3)}(\omega) \right \} \ast E_{\mathrm{pr}}(\omega)\right |^2 \approx \left|\tilde{C}_{\mathrm{st}}(\omega)\right|^2 \left |\tilde{\chi}^{(3)}(\omega)\right |^2,$$
where $E_{\mathrm {p}}$, $E_{\mathrm {S}}$, and $E_{\mathrm {pr}}$ are the frequency-domain ($\omega$) pump, Stokes, and probe fields, respectively; $\chi ^{(3)}$ is the third-order nonlinear susceptibility, which is a summation of resonant ($\chi _{\mathrm {r}}$; Raman vibrational) and nonresonant ($\chi _{\mathrm {nr}}$; electronic) components, and $\tilde {C}_{\mathrm {st}}$ is the system response function that incorporates such properties as laser source profiles, optical filter transmission profiles, and detector response. In the right-hand part of Eq. (1), the tilde above $\chi ^{(3)}$ is used to indicate that the nonlinear susceptibility is convolved with the probe [17,19] (similarly for $\tilde {C}_{\mathrm {st}}$); though, in the remainder of this manuscript, it will not be explicitly used. '$\star$' and '$\ast$' are the cross-correlation and convolution operators, respectively.

The overarching goal of phase retrieval methods is to extract Im$\{\chi ^{(3)}(\omega )\}$ from $I_{\mathrm {CARS}}(\omega )$, which is the equivalent material property probed by traditional Raman spectroscopy [21]. If $\tilde {C}_{\mathrm {st}}(\omega )$ and $I_{\mathrm {NRB}}(\omega )$ are quantitatively measurable/known, this goal would be achievable [14]. However, this has not thus far been demonstrated. A more capable solution that also leads to the aforementioned self-referencing of CARS, is to calculate $K_{\mathrm {CARS}}(\omega ) \triangleq \chi ^{(3)}(\omega )/\chi _{\mathrm {nr}}(\omega )$. Using the KK formalism and assuming, for the moment, that the $I_{\mathrm {NRB}}(\omega )$ of the sample itself is measurable [17]:

$$K_{\mathrm{CARS}}(\omega) = \frac{\chi^{(3)}(\omega)}{\chi_{\mathrm{nr}}(\omega)}= \underbrace{\sqrt{\frac{I_{\mathrm{CARS}}(\omega)}{I_{\mathrm{NRB}}(\omega)}}}_{A_{\mathrm{CARS}}(\omega)} \exp \left[i\underbrace{ \hat{\mathcal{H}}\left\{\frac{1}{2}\ln\frac{I_{\mathrm{CARS}}(\omega)}{I_{\mathrm{NRB}}(\omega)}\right\}}_{\phi_{\mathrm{CARS}}(\omega)}\right],$$
where $\hat {\mathcal {H}}$ is the Hilbert transform. To approximate the NRB, one uses a surrogate/reference material with nonlinear susceptibility $\chi _{\mathrm {ref}}(\omega )$, which leads to a CARS signal, $I_{\mathrm {ref}}(\omega )$. One can model this relationship between the actual NRB and the surrogate as $I_{\mathrm {ref}}(\omega ) = \Xi \xi (\omega ) I_{\mathrm {NRB}}(\omega )$, where $\xi (\omega )$ is a frequency-dependent function and $\Xi$ is a constant. Both are real valued. It should be noted that these terms encompass differences in both the material properties as well as any optical system response changes (e.g., related to $\tilde {C}_{\mathrm {st}}$). Applying this new scenario to Eq. (2):
$$\begin{aligned} K(\omega) ~=&~ \frac{\chi^{(3)}(\omega)}{\chi_{\mathrm{ref}}(\omega)}= \underbrace{\sqrt{\frac{I_{\mathrm{CARS}}(\omega)}{I_{\mathrm{ref}}(\omega)}}}_{A(\omega)} \exp \left[i\underbrace{ \hat{\mathcal{H}}\left\{\frac{1}{2}\ln\frac{I_{\mathrm{CARS}}(\omega)}{I_{\mathrm{ref}}(\omega)}\right\}}_{\phi(\omega)}\right]\\ ~=&~ A_{\mathrm{CARS}}(\omega)\underbrace{\sqrt{\frac{1}{\Xi \xi(\omega)}}}_{A_{\mathrm{err}}(\omega)}\exp \left [ i\phi_{\mathrm{CARS}}(\omega) + i \underbrace{\hat{\mathcal{H}}\left\{\frac{1}{2}\ln\frac{1}{\Xi \xi(\omega)}\right\}}_{\phi_{\mathrm{err}}(\omega)}\right ].\end{aligned}$$
From this equation one will notice that the use of a reference material has led to a multiplicative amplitude error and an additive phase error [17], which are themselves related by a KK relation. Thus, simple subtractive baseline detrending of Im$\{K(\omega )\}$ is not appropriate. There is a solution: PEC. Under the assumption of a slowly-varying $\xi (\omega )$, one may find the phase error using detrending methods, such as asymmetric least squares (ALS) [22,23], and remove it and the associated amplitude error (within a constant $\Xi$): $A_{\mathrm {err}}(\omega ) = 1/\sqrt {\Xi \xi (\omega )} = \exp \left [-\hat {\mathcal {H}}\{\phi _{\mathrm {err}}(\omega )\}\right ] / \Xi$. PEC does not account for and remove $\Xi$ as the Hilbert transform of a constant is 0 (i.e., $\hat {\mathcal {H}}\{\ln \Xi \xi (\omega )\} = \hat {\mathcal {H}}\{\ln \xi (\omega )\}$). Finding the constant $\Xi$ is the role of SEC [17]. This may be calculated from the real part of $K(\omega )$ after PEC:
$$\frac{1}{\sqrt{\Xi}} = \left \langle \textrm{Re}\left\{K(\omega) \exp \left [ \hat{\mathcal{H}}\{\phi_{\mathrm{err}}(\omega)\}\right] \exp\left[-i\phi_{\mathrm{err}}(\omega) \right] \right\}\right \rangle,$$
where '$\langle \dotsb \rangle$' indicates the mean over the frequency. Due to computational distortion of the numerical Hilbert transform, one usually does not simply use the mean but rather a trendline [17].

In summary, using the KK relation, PEC, and SEC, one can calculate $K_{\mathrm {CARS}}(\omega )$ from $K(\omega )$ as:

$$K_{\mathrm{CARS}}(\omega) = \frac{K(\omega) \exp \left [ \hat{\mathcal{H}}\{\phi_{\mathrm{err}}(\omega)\}\right] \exp\left[-i\phi_{\mathrm{err}}(\omega) \right]}{\left \langle \textrm{Re}\left\{K(\omega) \exp \left [ \hat{\mathcal{H}}\{\phi_{\mathrm{err}}(\omega)\}\right] \exp\left[-i\phi_{\mathrm{err}}(\omega) \right] \right\}\right \rangle}.$$
Thus, without directly measuring the NRB, one can find the ratio $\chi _{\mathrm {r}}(\omega )/\chi _{\mathrm {nr}}(\omega )$ at every pixel because every pixel is self-referenced to its own nonresonant component. The full conventional workflow is illustrated in Fig. 1(a). This ratio is maintained even in the presence of absorption and scatter as both the Raman and NRB components are equally affected; though, the SNR deteriorates.

 figure: Fig. 1.

Fig. 1. (a) Workflow for the conventional denoising, KK, PEC, and SEC, where $m$ is the total number of spatial pixels (“flattened") and $n$ is the number of frequency channels. (b) Workflow for the fKK-EC where the processing steps are performed on basis vectors rather than the underlying spectra. (c) Workflow for the ML:fKK-EC in which only the training data is processed via the fKK-EC and regression is used to transform new data.

Download Full Size | PDF

2.2 SVD factorization, denoising, and fKK

The proposed fKK-EC enables high-throughput and real-time Raman signal extraction from spectroscopic CARS data via factorization, which dramatically reduces the number of vectors for which each processing step is applied. For example, rather than independently applying to one million spectra in a one-megapixel image, the processing may be applied to 100 basis vectors. A flow chart that describes the fKK-EC workflow is shown in Fig. 1(b).

The first step in this process is factorization of the input data. In this work, SVD decomposes a matrix $\mathbf {A}$ into three matrices as $\mathbf {A} = \mathbf {U}\mathbf {S}\mathbf {V}^H$. The $H$-superscript indicates the Hermitian transpose; $\mathbf {U}$ and $\mathbf {V}$ are unitary matrices whose columns are the left- and right singular vectors, respectively; and $\mathbf {S}$ is a diagonal matrix whose entries are known as singular values (we will denote the vector containing just the singular values as $\mathbf {s}$). In this work, we explicitly assume that the dataset is oriented so that row-number ($m$) corresponds to spatial components (see Fig. 1(a)) and column-number ($n$) to frequency. Thus $\mathbf {U}$ is composed of spatial basis vectors while $\mathbf {V}$, spectral basis vectors. Further, $\mathbf {A}$ is real; thus, the Hermitian transpose ($H$) is a transpose ($T$) as will be indicated in the remaining derivations. The SVD [1,17,19,24,25] is widely used for denoising by removing noise-dominant singular vectors that [ideally] only contribute to noise. This is accomplished by either setting singular values corresponding to noise-related singular vectors to 0, or equivalently creating new $\mathbf {U}$, $\mathbf {S}$, and $\mathbf {V}$ matrices that exclude the non-desired singular values and vectors, which leads to reduced data volumes. We have implemented the latter in our simulations and experiments. Note that in the remaining derivations we do not explicitly denote whether $\mathbf {U}$, $\mathbf {S}$, or $\mathbf {V}$ were altered for denoising; though, all derivations remain valid. Also note, that in the conventional workflow, SVD is an optional denoising method (see Fig. 1(a)), whereas in the fKK-EC workflow, SVD is the necessary factorization step (See Fig. 1(b)), which can also provide denoising.

For the fKK, one would conceptually apply the KK relation to the spectral basis vectors in $\mathbf {V}$. However, this is not appropriate because of the log-function in the KK (Eq. (2)) and the orthonormal nature of SVD singular vectors (positive- and negative-values). Rather we apply the SVD to $\frac {1}{2}\ln {[I^{[m]}_{\mathrm {CARS}}(\omega )/I_{\mathrm {ref}}(\omega )]} = \mathbf {a}_m(\omega )$, where the $m$-superscript denotes the m$^{th}$ spectrum, which leads to the $\mathbf {a}_m$-vector. For the following derivation, we assume that we have $M$ spectra, and the $\omega$ vector is $N$-frequency increments long. Thus, $\mathbf {A}$ may be written as:

$$\mathbf{A} ~=~ \left[\mathbf{a}_1(\omega), ~\mathbf{a}_2(\omega), ~\dots~, ~\mathbf{a}_M(\omega)\right ]^T \in \mathbb{R}^{M\times N}= \mathbf{U}\mathbf{S}\mathbf{V}^T.$$
Assuming a “reduced" SVD implementation, we have more spectra than the length of the frequency vector $\omega$ (i.e., M $>$ N); thus, $\mathbf {U} \in \mathbb {R}^{M,N}$, $\mathbf {s} \in \mathbb {R}^N; \textrm {diag}(\mathbf {s}) = \mathbf {S} \in \mathbb {R}^{N,N}$, and $\mathbf {V} \in \mathbb {R}^{N,N}$. As the $\mathbf {U}$- and $\mathbf {S}$-elements act as constant weighting terms to the right singular vectors ($\mathbf {V}$'s columns) and the Hilbert transform is a linear operator [26], this is equivalent to only applying the transform to the right singular vectors:
$$\begin{aligned} \hat{\mathcal{H}}\{\mathbf{A}\} ~=&~ \begin{bmatrix} \hat{\mathcal{H}}\{A_{1,:}(\omega)\}\\ \hat{\mathcal{H}}\{A_{2,:}(\omega)\}\\ \vdots \\ \hat{\mathcal{H}}\{A_{M,:}(\omega)\} \end{bmatrix} = \begin{bmatrix} \hat{\mathcal{H}}\{U_{1,1}S_{1,1}\mathbf{v}_1(\omega) + U_{1,2}S_{2,2}\mathbf{v}_2(\omega) + \dots + U_{1,N}S_{N,N}\mathbf{v}_N(\omega)\} \\ \hat{\mathcal{H}}\{U_{2,1}S_{1,1}\mathbf{v}_1(\omega) + U_{2,2}S_{2,2}\mathbf{v}_2(\omega) + \dots + U_{2,N}S_{N,N}\mathbf{v}_N(\omega)\} \\ \vdots \\ \hat{\mathcal{H}}\{U_{M,1}S_{1,1}\mathbf{v}_1(\omega) + U_{M,2}S_{2,2}\mathbf{v}_2(\omega) + \dots + U_{M,N}S_{N,N}\mathbf{v}_N(\omega)\} \end{bmatrix}\\ ~=&~ \begin{bmatrix} U_{1,1}S_{1,1}\hat{\mathcal{H}}\{\mathbf{v}_1(\omega)\} + U_{1,2}S_{2,2}\hat{\mathcal{H}}\{\mathbf{v}_2(\omega)\} + \dots + U_{1,N}S_{N,N}\hat{\mathcal{H}}\{\mathbf{v}_N(\omega)\} \\ U_{2,1}S_{1,1}\hat{\mathcal{H}}\{\mathbf{v}_1(\omega)\} + U_{2,2}S_{2,2}\hat{\mathcal{H}}\{\mathbf{v}_2(\omega)\} + \dots + U_{2,N}S_{N,N}\hat{\mathcal{H}}\{\mathbf{v}_N(\omega)\} \\ \vdots \\ \hat{\mathcal{H}}\{U_{M,1}S_{1,1}\mathbf{v}_1(\omega)\} + U_{M,2}S_{2,2}\hat{\mathcal{H}}\{\mathbf{v}_2(\omega)\} + \dots + U_{M,N}S_{N,N}\hat{\mathcal{H}}\{\mathbf{v}_N(\omega)\} \end{bmatrix}\\ ~=&~ \mathbf{U}\mathbf{S}\hat{\mathcal{H}}\{\mathbf{V}^T\}.\end{aligned}$$
The total fKK process without PEC or SEC may be described as:
$$\mathbf{K}_{\mathrm{fKK}}(\omega) = \exp \left (\mathbf{A}\right) \exp \left (i \mathbf{U}\mathbf{S}\hat{\mathcal{H}}\{\mathbf{V}^T\}\right).$$

As an addendum to this derivation, we will discuss considerations under the case of mixed Poisson-Gaussian noise (heteroscedastic noise generally). In previous work [17], denoising was improved via the use of an Anscombe transformation prior to SVD. As Poisson noise is not additive [27], SVD is often impaired in separating signal and noise. The Anscombe transform aims to convert a signal with mixed noise into a signal with unit variance. Though advantageous, this nonlinear transform is not compatible with the current fKK derivation. Thus, to improve denoising, there are 2 options: (1) denoise before the fKK using the Anscombe transformation and SVD (then reconstruction), or (2) apply a scaling term $f(\omega )$ to $A(\omega )$, which is the same for each spectrum. In simulations and experiments below, we apply the latter. The scaling term we selected was inspired by the purpose of the Anscombe transformation: normalizing variance. Suppose we have a homogeneous sample and have recorded numerous spectra containing both additive white gaussian noise and shot (Poisson) noise, the standard deviation ($\sigma _{\mathbf {A}}(\omega )$) of the previously defined $\mathbf {A}$ may be approximated as [28]:

$$\sigma_\mathbf{A}(\omega) ~\approx~ \frac{\sigma_{\mathrm{CARS}}(\omega)}{2\langle I_{\mathrm{CARS}}\rangle(\omega)} \approx \frac{\sqrt{\alpha \langle I_{\mathrm{CARS}}\rangle(\omega) + \sigma_g^2}}{2 \langle I_{\mathrm{CARS}}\rangle(\omega)} \triangleq \frac{1}{f(\omega)},$$
where $\langle \dotsb \rangle$ indicates the mean spectrum, $\alpha$ is a Poisson noise multiplier, and $\sigma _g$ is the standard deviation of the additive white Gaussian noise. We have assumed that the $I_{\mathrm {ref}}(\omega )$ used is effectively noiseless as the reference spectra is often an averaged and/or denoised version of repeated measurements of a surrogate material. Applying this scaling term, the fKK would be re-written as:
$$A_{m,:} ~=~ f(\omega) \frac{1}{2}\ln\frac{I^{[m]}_{\mathrm{CARS}}(\omega)}{I_{\mathrm{ref}}(\omega)}\quad\textrm{for all } m $$
$$\mathbf{K}_{\mathrm{fKK}}(\omega) ~=~ \exp \left ( \frac{\mathbf{A}}{f(\omega)}\right )\exp \left (i \mathbf{U} \mathbf{S} \hat{\mathcal{H}}\left\{\frac{\mathbf{V}^T}{f(\omega)}\right\}\right ), $$
where $A_{m,:}$ is the m$^{th}$ spectrum (row) in $\mathbf {A}$.

In the remainder of this manuscript, we will include $f(\omega )$ in the derivations; though, this factor can be set to one in the case of pure additive white Gaussian noise. Mathematical notation note: we are explicitly writing $f(\omega )$ to emphasize that it is a single spectrum, and when it divides a matrix, it is applied along the spectral axis (e.g., each row of $\mathbf {A}$ or $\mathbf {V}^T$).

2.3 Factorized PEC (fPEC)

PEC is the process of finding the phase error caused by using a surrogate reference material as an approximation for the sample NRB. In the factorized context:

$$\mathbf{\Phi}_{\mathrm{err}} ~=~ \hat{\mathcal{D}}\left\{\mathbf{U} \mathbf{S} \hat{\mathcal{H}}\left\{\frac{\mathbf{V^T}}{f(\omega)}\right\}\right\}\approx \mathbf{U} \mathbf{S} \mathbf{\Phi}^T_{\mathrm{PEC}},$$
where $\hat {\mathcal {D}}$ is a detrending operator, and $\mathbf {\Phi }_{\mathrm {PEC}}$ is a basis set describing phase error. We do not want to detrend every spectrum as described in the proceeding equation and the orthonormal $\mathbf {V}$ singular vectors are not readily usable for baseline detrending as they often have positive and negative values with no clear baseline. Rather we will take the approach of sub-sampling $\mathbf {U}$ (to form $\mathbf {U}_{\mathrm {ss}}$), calculate $\mathbf {\Phi }_{\mathrm {err}}$, and regress to approximate $\mathbf {\Phi }_{\mathrm {PEC}}$. This dramatically reduces the computational burden compared to using the full $\mathbf {U}$. Our current practice, inspired by vertex component analysis (VCA) [29], is to sub-sample $\mathbf {U}$ by keeping the rows of $\mathbf {U}$ that have the highest and lowest values for each column:, and optionally a sub-sample between. For the maximum and minimum:
$$\mathbf{q}_{\mathrm{max}} ~=~ \textrm{argmax}_i\{\mathbf{U}_{:,i}\}\quad\textrm{for each }i $$
$$\mathbf{q}_{\mathrm{min}} ~=~ \textrm{argmin}_i\{\mathbf{U}_{:,i}\}\quad\textrm{for each }i $$
$$\mathbf{U}_{\mathrm{ss}} ~=~ \mathbf{U}_{\mathbf{q},:}~, $$
where the ‘:’ indicates all row or column entries, and $\textbf {q} = \mathbf {q}_{\mathrm {min}}~\cup ~\mathbf {q}_{\mathrm {max}}$ indicates the union row indices. $\mathbf {q}$ can also contain a sub-sample between the max- and min-values for each column $\mathbf {U}$. From this:
$$ \mathbf{\Phi}_{\mathrm{err}} ~=~ \hat{\mathcal{D}}\left\{\mathbf{U}_{\mathrm{ss}} \mathbf{S} \hat{\mathcal{H}}\left\{\frac{\mathbf{V^T}}{f(\omega)}\right\}\right\}\approx \underbrace{\mathbf{U}_{\mathrm{ss}} \mathbf{S}}_{\mathbf{X}} \mathbf{\Phi}^T_{\mathrm{PEC}}$$
$$ \mathbf{\Phi}^T_{\mathrm{PEC}} ~=~ \mathbf{X}^{-1}\mathbf{\Phi}_{\mathrm{err}}\Longrightarrow \mathbf{\Phi}^T_{\mathrm{PEC}} ~=~ \left (\mathbf{X}^T\mathbf{X} + \lambda \mathbf{I}\right)^{-1}\mathbf{X}^T\mathbf{\Phi}_{\mathrm{err}}~,$$
where $\lambda$ is a non-negative scalar regularization weight and $\mathbf {I}$ is an identity matrix. The left-hand statement in Eq. (17) is an ordinary least-squares regression using a [pseudo]-inverse. In practice, however, this result is unstable owing to significant multicollinearity in the singular vectors. These collinearities cause erroneously large $\mathbf {\Phi }_{\mathrm {PEC}}$ entries, especially those corresponding to the smallest singular values. One solution to this problem is ridge regression (also known as Tikhonov regularization) as shown on the right side of Eq. (17).

The action of the combined fKK and fPEC without fSEC can be described as:

$$\mathbf{K}_{\mathrm{fKK-fPEC}}(\omega) ~=~ \exp \left [ \mathbf{U}\mathbf{S}\left (\frac{\mathbf{V}^T}{f(\omega)} + \hat{\mathcal{H}}\{\mathbf{\Phi}_{\mathrm{PEC}}\}\right)\right ]\exp \left [i \mathbf{U} \mathbf{S}\left( \hat{\mathcal{H}}\left\{\frac{\mathbf{V}^T}{f(\omega)}\right\} - \mathbf{\Phi}_{\mathrm{PEC}}\right)\right ],$$
noting that the amplitude and phase terms are still related by a Hilbert transform.

2.4 Factorized SEC (fSEC)

In the conventional form of the SEC, the PEC-corrected spectra are divided by the mean of the real part as described in Eq. (5). An alternative and equivalent approach is to calculate the mean of the natural log of the magnitude of the PEC-corrected spectra:

$$\left \langle \frac{1}{2}\ln \frac{I_{\mathrm{CARS}}(\omega)}{I_{\mathrm{NRB}}(\omega)\Xi} \right \rangle ~=~ \left \langle \frac{1}{2} \ln \frac{I_{\mathrm{CARS}}(\omega)}{I_{\mathrm{NRB}}(\omega)} \right \rangle - \frac{1}{2}\ln \Xi = \ln \frac{1}{\sqrt{\Xi}}.$$
It should be noted that the mean of the first expression in the previous equation can be solved analytically, for example, using partial fraction decomposition, assuming that $\chi _{\mathrm {r}}(\omega ) = \sum _m A_m / (\Omega _m - \omega -i\Gamma _m)$, $A_m$, $\Omega _m$, and $\Gamma _m$ are real and positive-valued, and $\chi _{\mathrm {nr}}$ is constant and positive, real-valued.

The left-hand expression in Eq. (19) for the dataset is equivalent to the magnitude of the term inside the exponential function in Eq. (18) as:

$$\left \langle \mathbf{U} \mathbf{S} \left (\frac{\mathbf{V}^T}{f(\omega)} + \hat{\mathcal{H}}\{\mathbf{\Phi}_{\mathrm{PEC}}\}\right)\right \rangle ~=~ \ln \frac{1}{\sqrt{\mathbf{\Xi}}},$$
where $\mathbf {\Xi } \in \mathbb {R}^M$ is a vector of constants.

For the fSEC, we want to avoid calculating the mean for each spectrum and to operate on the PEC-corrected right singular vector. Thus, we will incorporate an fSEC correction matrix $\mathbf {V}^T_{\mathrm {SEC}}$ into the previous expression:

$$\left \langle \mathbf{U} \mathbf{S} \left (\frac{\mathbf{V}^T}{f(\omega)} + \hat{\mathcal{H}}\{\mathbf{\Phi}_{\mathrm{PEC}}\} - \mathbf{V}^T_{\mathrm{SEC}}\right)\right \rangle ~=~ \ln \mathbf{1} = \mathbf{0}.$$
A solution for this matrix is the subtraction of the mean of the PEC-corrected right singular vector: $\mathbf {V}^T_{\mathrm {SEC}} = \langle \mathbf {V}^T/f(\omega ) + \hat {\mathcal {H}}\{\mathbf {\Phi }_{\mathrm {PEC}}\} \rangle$. Thus, if the mean of each corrected right singular vector is zero, the mean of the magnitude will also be zero. As we previously mentioned, due to numerical errors in the Hilbert transform, rather than a strict mean, we use a trendline function, which was previously implemented as a large-window, small-order Savitzky–Golay filter [17]. Thus:
$$\mathbf{V}^T_{\mathrm{SEC}} ~=~ \hat{\mathcal{M}}\left\{\frac{\mathbf{V}^T}{f(\omega)} + \hat{\mathcal{H}}\{\mathbf{\Phi}_{\mathrm{PEC}}\}\right\},$$
where $\hat {\mathcal {M}}$ is a trendline (or mean function).

2.5 Reconstruction and the full fKK-EC

Using the previous descriptions of the fKK, fPEC, and fSEC, we can assemble the full fKK-EC workflow and reconstruct an approximate $\mathbf {K}_{\mathrm {CARS}}$ (akin to Eq. (5) for the conventional implementation). Applying Eqs. (8), 18, and 22:

$$\mathbf{K}_{\mathrm{CARS}} ~\cong~ \exp\left[ \mathbf{U}\mathbf{S}\left(\frac{\mathbf{V}^T}{f(\omega)} + \hat{\mathcal{H}}\{\mathbf{\Phi}_{\mathrm{PEC}}\} - \mathbf{V}^T_{\mathrm{SEC}}\right)\right]\exp\left[i\mathbf{U}\mathbf{S}\left(\hat{\mathcal{H}}\left\{\frac{\mathbf{V}^T}{f(\omega)}\right\} - \mathbf{\Phi}_{\mathrm{PEC}}\right)\right],$$
again noting that $\mathbf {U}$, $\mathbf {S}$, and $\mathbf {V}$ may be reduced in size from the original SVD for the purposes of denoising.

2.6 Machine learning (ML) paradigm ML:fKK-EC

As previously described, the fKK-EC methods enable high-throughput analysis at significantly higher rates than the coventional workflow. Another significant benefit of the fKK-EC methods is that they can be trained as a machine learning (ML) model, i.e., the fKK, fPEC, and fSEC are fully applied to a sub-set of data, and new data is simply projected onto the derived basis vectors (as schematically described in Fig. 1(c)). That is to say that new data can be transformed into denoised-Raman-retrieved (fKK, fPEC, fSEC) without explicitly applying these methods, but rather with simple matrix multiplication. We will call this workflow "ML:fKK-EC".

Hypothetically, we are going to collect many images of a sample. We will apply the full fKK-EC method to the first (or first few) images (i.e., "training"). This provides us with: $f(\omega )$, $\mathbf {U}$, $\mathbf {S}$, $\mathbf {V}$, $\mathbf {\Phi }_{\mathrm {PEC}}$, and $\mathbf {V}^T_{\mathrm {SEC}}$. One assumes that upcoming images will comprise the same or similar chemical content but in differing concentrations and mixture profiles. In the ML:fKK-EC method, we will not re-derive the SVD, but rather regress a new left singular vector matrix $\mathbf {U}_{\mathrm {new}}$ (which describes the spatial mixtures of $\mathbf {S}\mathbf {V}^T$). From Eq. (7) for the new data, $\mathbf {A}_{\mathrm {new}}$ that incorporates $f(\omega )$ as well, and solving for $\mathbf {U}_{\mathrm {new}}$ applying ridge regression:

$$ \mathbf{A}_{\mathrm{new}} ~=~ \mathbf{U}_{\mathrm{new}}\mathbf{S}\mathbf{V}^T$$
$$ \mathbf{U}_{\mathrm{new}} ~=~ \mathbf{A}_{\mathrm{new}}\left(\underbrace{\mathbf{S}\mathbf{V}^T}_{\mathbf{X}}\right)^{-1}\Longrightarrow \mathbf{U}_{\mathrm{new}} ~=~ \mathbf{A}_{\mathrm{new}}\left(\mathbf{X}^T\mathbf{X} + \lambda\mathbf{I}\right)^{-1}\mathbf{X}^T.$$
Now, one can simply apply the $\mathbf {U}_{\mathrm {new}}$ to Eq. (23).

Of importance is the selection of the training data. As in all “supervised" machine learning methods, the training set has to include a certain variety and depth of training data [30]. In the ML:fKK-EC, the training set needs to contain enough variety in chemical components so that the spectral basis set ($\mathbf {V}$) can reconstruct new spectra in future images. Various strategies for this could exist: coarsely image a large area and use that for training, apply expert knowledge to select a few small images for training, use the first image for training and retrain later — it is sample and application specific. Fortunately, it is facile to test whether the trained basis set is adequate for new data by comparing $\mathbf {A}_{\mathrm {new}}$ as measured and as reconstructed applying Eq. (25) to Eq. (24). The precise comparison could be performed programmatically such as through calculating the residual sum-of-squares (RSS) or by manual inspection. If the original basis set is inadequate, one could simply append the unsupported spectrum (or spectra) to the original training set and recalculate the SVD, i.e., it does not necessitate retraining on an additional huge swath of data. Other strategies and on-going work in this context will be provided in the Discussion section.

The ML:fKK-EC method, as will be demonstrated in simulation and experiment below, is extremely fast. Firstly, the time-consumption of the individual steps is limited to a training dataset that is much smaller than the full dataset. Secondly, new data does not need to be subjected to the fKK, fPEC, or fSEC, but rather is converted through a series of matrix multiplications: solving for Eq. (25) and applying to Eq. (23), where all the other matrices were calculated during training. For example, on the broadband CARS (BCARS) system used to collect data for this paper, spectra require $\approx$ 5 ms to record, but applying the ML:fKK-EC to a new spectrum requires 10's of microseconds; thus, it can be applied to new data as it is acquired, as opposed to after all data is acquired. This advancement in CARS microscopy affords many new opportunities not previously available, such as on-the-fly evaluation of imaging quality and rapid identification of regions-of-interest and chemical constituents.

3. Materials and methods

3.1 Broadband CARS (BCARS) imaging platform and software

Images were collected on an in-house-developed BCARS microscope that is described in detail elsewhere [1]. In brief, the picosecond probe laser ($\approx$ 3.2 ps, 771 nm, 40 MHz repetition rate; Toptica, FemtoFiber pro NIR) and femtosecond supercontinuum ($\approx$ 16 fs, 850 nm to 1350 nm, 40 MHz repetition rate; Toptica, FemtoFiber pro UCP) were 13 mW and 7.1 mW on-sample, respectively, after the water-immersion microscope objective (Olympus, UPlanSApo 60XW IR). The anti-Stokes photons were collected (Olympus, LUCPlanFL N 40X), filtered via short-pass filters (Semrock) and focused onto a charge-coupled device (CCD)-equipped (Andor, DU970N-FI) spectrograph (Acton, SpectroPro2300i). The CCD integration time was set to 3.5 ms, which corresponds to $\approx$ 5 ms per pixel owing to data transfer time, stage movement, and CCD cleaning time. The sample is mounted onto a two-stage system: one for high-speed, high-resolution XYZ-imaging (Physik Instrumente, P-545) and a long-travel XY-stage (Physik Instrumente, M-545.2PO). The maximum size of a single XY-image is 200 $\mu$m x 200 $\mu$m (limited by the high resolution stage); thus, movement with the long-travel stage and stitching is necessary for larger images.

The BCARS system was controlled by custom LabView software written in-house. Data files were processed in Python using NumPy, SciPy, scikit-learn, and the open-source CRIkit2 software package for Python (https://github.com/CCampJr/CRIkit2). Processing was performed on a Dell Precision 7730 laptop with a 6-core i7-8850H processor at 2.6 GHz and 64 GB of RAM.

3.2 Chicken tissue preparation

Chicken legs were procured from a local grocer. Hyaline cartilage tissue was harvested from the knee joint above the tibia using a scalpel. The resected tissue varied in thickness from approximately 20 $\mu$m to 40 $\mu$m, as measured by BCARS imaging ("XZ" images).

3.3 Simulation software

The simulations were written in Python and performed from within a Jupyter Notebook. The NumPy, SciPy, scikit-learn, Pandas, Seaborn, and CRIKit2 software packages for Python were used for processing and visualization. Simulation software will be furnished upon request and will be available in a forthcoming open-source software package for Python. The simulations were performed on the same laptop as the image processing described above.

4. Results

Below we present simulations and experiments to demonstrate the enhanced performance (throughput) of fKK-EC and the comparability of its results with the conventional workflow. Additionally, within the experimental results, we demonstrate the application and results from the ML:fKK-EC.

4.1 Simulation

We simulated a noiseless 3-chemical mixture with the concentration map shown in Fig. 2(a) and a ternary plot of concentrations shown in Fig. 2(b). Chemical 1, 2, and 3 are displayed in red, green, and blue, respectively. The base dataset is 74 pixels x 246 pixels (18204 total spectra). To analyze the fKK-EC performance versus number of spectra, this dataset is side-scaled by a factor of 0.5, 1, 2, 3, and 4; for a total of 4551, 18204, 72816, 163836, and 291264 spectra, respectively. Synthetic Raman spectra were generated using a summation of complex Lorentzian functions with number of peaks, amplitude, central frequency, and width being selected stochastically. Further, the real-valued $\chi _{\mathrm {nr}}(\omega )$’s were quadratic polynomials with randomly generated non-negative coefficients, and $\chi _{\mathrm {ref}}(\omega )$ from a linear polynomial. This approach was not chosen because of its physical realism, but rather to challenge the method — especially the detrending algorithm. The random number generator seed was fixed across experiments so that the same random spectra were generated. The simulated CARS spectra (and NRB) are shown in Fig. 2(c). The chemical spectra contain 22, 25, and 10 peaks, respectively. The spectral range of simulation was $-$500 cm$^{-1}$ to 2500 cm$^{-1}$ sampled 810 times; though, Raman peaks could only be assigned between 500 cm$^{-1}$ to 1700 cm$^{-1}$. The stimulation profile $\tilde {C}_{\mathrm {st}}(\omega )$ in Eq. (1) was set to a constant for simplicity.

 figure: Fig. 2.

Fig. 2. (a) Concentration map of simulated dataset composed of three chemical constituents, colored as red (Chem 1), green (Chem 2), and blue (Chem 3). (b) Ternary plot showing the concentration of the simulation. (c) CARS (solid lines) and NRB (dashed) spectra of the three pure constituents. The spectra of a reference surrogate is shown in black. (d) Processing speed enhancement of fKK-EC and ML:fKK-EC with respect to conventional processing. Each trace shows the mean enhancement over three runs with the shading showing $\pm$1 standard deviation. (e) Fraction of computing time of each step. Note: only fKK-EC and ML:fKK-EC have a reconstruction (Reconst.) step. Also, only the ML:fKK-EC has a regression (Regress.) step. (f) Mean RSS showing the factorized methods show relatively similar, if not improved, RSS values from the conventional workflow. (g)–(i) Comparison of single-pixel spectra processed using the conventional methods and the fKK-EC. (j)–(l) Comparison of single-pixel spectra processed using the fKK-EC and the ML:fKK-EC.

Download Full Size | PDF

Figure 2(d) shows the speed enhancement of the factorized methods relative to the conventional workflow. For all methods, the number of kept singular values/vectors was determined by the singular values larger than ($\max {\mathbf {A}} \times \max (M,N) \times \epsilon$), where $M$ and $N$ are the row and column dimensions of the SVD-input matrix $\mathbf {A}$, and $\epsilon$ is the "machine epsilon" for the given data type. This is the same cutoff used to estimate rank in NumPy and MATLAB software. For comparison, the time per spectrum for the conventional workflow was approximately: $\leq$100 $\mu$s for SVD and selecting basis vectors, $\leq$140 $\mu$s for the KK, $\leq$3.2 ms for the PEC, and $\leq$140 $\mu$s for the SEC; for a total of $\leq$3.6 ms / spectrum. In each conventional-method simulation run, 6 basis vectors were kept per the previously described cutoff threshold. In all factorized-method simulation runs 35 to 50 singular vectors were kept, depending on the image size. For the fKK-EC, the enhancement was $\geq$40 for all but the smallest dataset. For the 291264 spectra simulation, for example, the total time was $<$25 seconds for all 3 replicate simulations (86 $\mu$s / spectrum). The most significant difference is the time to perform phase retrieval, with the conventional KK requiring $\approx$ 40 s and the new fKK $\approx$ 4.3 ms — an over 9000$\times$ improvement. The fPEC was over 1250$\times$ faster than the PEC, and the fSEC was over 3150$\times$ faster than the SEC. For the factorized workflow, the reconstruction step only added 3.3 s. Figure 2(e) gives a graphical representation of the fraction of total computational time for each method. Of course it should be noted that for the ML:fKK-EC, the training fraction will reduce as more non-training data is processed.

We also compared the spectra obtained by the fKK-EC method with that of the conventional method. To that end, we calculated the residual sum-of-squares (RSS) between the extracted Raman-to-NRB ratio spectra ($K_{\mathrm {CARS}}$ in Eq. (5) or Eq. (23)) and the known Im$\{\chi /\chi _{\mathrm {nr}}\}$ at each pixel. The mean RSS, $\langle$RSS$\rangle$, is shown in Fig. 2(f). For reference, the RSS if $K_{\mathrm {CARS}}(\omega )~=~0$ (“Null RSS") is also shown. One can see that the fKK-EC and conventional workflow return similar results, with the fKK-EC being slightly better (lower). Whether this is intrinsic or due to imperfect hyperparameter tunings for each processing step (e.g., ALS parameters) will be investigated in the future as the current goal was to demonstrate approximately equivalent results. Figures 2(g)–2(i) compare the spectra retrieved by the conventional method and the new fKK-EC (versus the ideal) at the pixels with the maximum concentration of each simulated chemical species. In each instance, the fKK-EC spectrum returns a result closer to the ideal than the conventional method. It was determined that all errors were due to the phase error-correcting steps: the ALS could closely but not perfectly retrieve the phase error. Under a separate simulation using constant-valued NRB’s, the ideal, conventional workflow, and fKK-EC all agreed ($\langle$RSS$\rangle$ $<$10$^{-14}$).

Next, we performed the same comparisons using the ML:fKK-EC implementation. The training portion of the dataset is identified in Fig. 2(a), and it is performed independently for each dataset size. Figure 2(d) shows the speed enhancement of ML:fKK-EC versus the conventional workflow, both including ("+train") and excluding ("$-$train") the time used for the training portion. Thus, for a trained ML:fKK-EC system, we calculate an $\approx$ 150$\times$ speedup, which was $<$30 $\mu$s per spectrum for all dataset sizes. Thus, this could be performed in real-time as the data is acquired. Figure 2(e) shows the computational fraction of each step, and Fig. 2(f) shows that the machine learning implementation provides equivalent RSS to the non-ML fKK-EC method. Finally, Figs. 2(j)–2(l) compare the retrieved spectra from the ML:fKK-EC and non-ML version: the results are indistinguishable.

4.2 Experimental: chicken cartilage tissue imaging

Next, we analyzed a stitched series of BCARS images (9) of hyaline cartilage excised from chicken knee tissue. The individual original images are 300 pixels x 300 pixels, with $\approx$ 3 % overlap (per side) with neighboring images. The stitched image is 846 pixels by 831 pixels (703026 pixels total). Figure 3(a) shows a pseudocolor image from the fKK-EC process, colorizing DNA, collagen, and lipids. The DNA was highlighted utilizing the peak at 720 cm$^{-1}$. To maximize contrast between DNA and other chemical components, we used the side of this peak 713 cm$^{-1}$, subtracting a linear interpolated baseline between (691 to 738) cm$^{-1}$. Tentatively, we assign this peak to the nucleotide adenine [31]. We did not see a strong peak at 785 cm$^{-1}$, which corresponds, in part, to phosphodiester stretch of the DNA backbone; thus, we hypothesize, that DNA-nucleases may have degraded the DNA as this is not fresh chicken tissue, but rather grocery store procured. The collagen was highlighted by 855 cm$^{-1}$ (proline ring C-C-stretch [32]) peak relative to the trough at 900 cm$^{-1}$. Lipids were highlighted using the intensity at 2837 cm$^{-1}$ (CH$_2$-symmetric stretch [33]).

 figure: Fig. 3.

Fig. 3. (a) Pseudocolor image derived from fKK-EC processed CARS image, highlighting DNA (yellow), collagen (cyan), and lipids (red). Inset shows zoomed-in region. Scale bar is 100 $\mu$m. (b) Single pixel spectra for locations identified by arrows in (a). (c) Comparison of spectrum processing time between conventional and fKK-EC workflow.

Download Full Size | PDF

Spectra retrieved using the conventional method and the fKK-EC are shown in Fig. 3(b) with the locations identified in Fig. 3(a). The spectra are qualitatively the same. Differences were identified as a result of the different response of the SVD to raw BCARS spectra versus that of the log-CARS-to-Reference dataset. Retrieving such similarly denoised and processed spectra was $\approx$ 70$\times$ faster using the fKK-EC methods (average of 3 repeats $\pm$ 1 standard deviation: conventional method $\approx$ 4973 s $\pm$ 26 s total [$\approx$ 7.0 ms / spectrum]; fKK-EC $\approx$ 70 s $\pm$ 3.0 s total [$\approx$ 99 $\mu$s / spectrum]). It should be noted that for the conventional processing, computer memory limitations precluded the processing of the entire image at once; thus, the speed was estimated by performing the KK, PEC, and SEC on 10000 spectra of the image and scaling up the time. The SVD/denoising was performed on the whole image. The fKK-EC and ML:fKK-EC were performed on the entire image.

Next we processed the same image using the ML:fKK-EC, using 1 of the 9 images as the training image (see Fig. 4(a)). The training image contained 78114 spectra. This image was selected for training as even under brightfield observation it appeared to contain collagen, lipid droplets, and nuclei: three components expected from our knowledge of hyaline cartilage. Other images would have served as well. Again the retrieved spectra, see Fig. 4(b), show qualitatively similar results to the conventional workflow with slight noise and baseline differences. Excluding the training time ($<$ 10 s), this method was approximately 150$\times$ faster than the conventional workflow, requiring $\approx$ 47 $\mu$s / spectrum to process the entire image. Though these images could have been analyzed in real-time, they were processed after acquisition.

 figure: Fig. 4.

Fig. 4. Pseudocolor image derived from ML:fKK-EC processed CARS image, highlighting DNA (yellow), collagen (cyan), and lipids (red). The dashed-white box indicates the sub-image used for training. Scale bar is 100 $\mu$m. Arrows identify single-pixels used for spectral comparison in (b) between conventional and ML:fKK-EC workflow, which shows close agreement. (b) Single pixel spectra for locations identified by arrows in (a). (c) Comparison of spectrum processing time between conventional and ML:fKK-EC workflow.

Download Full Size | PDF

5. Discussion and conclusion

Traditionally, the acquisition of CARS spectra was slow, requiring at least tens of milliseconds per spectrum, and most CARS hyperspectral imagery was for a small data size (up to 256 pixels x 256 pixels). Therefore, the speed of individual spectrum-based processing methods was sufficient for the old type of CARS hyperspectral imaging. However, now that the advanced CARS imaging can collect much larger images at a much faster speed, new hyperspectral image processing methods are needed. An additional complication, owing to the inherent distortion of raw CARS spectra, is that the quality and results of an imaging experiment cannot be ascertained until after processing. This, of course, has been a big incentive to use alternative modalities, such as SRS. But as previously described, those alternative modalities do not have the self-referencing ability of CARS, which may be a boon for quantitative analysis. Thus, the aim of this work is the development of high throughput, robust self-referenced Raman signal extraction from CARS spectra with real-time capability.

Though this work demonstrates that the factorization approaches are supremely efficient and capable of being used in a machine learning paradigm, there are still many improvements possible and areas of inquiry for these methods. From a physics/chemistry perspective, we are actively modeling and investigating the nature of the NRB and differences between NRBs of different materials. Further, we are examining the degree to which the real-valued $\chi _{\mathrm {nr}}$ assumption is valid in light of multiphoton resonances often found in biomolecules. This information would not only improve quantitative analysis, but as related to this work, it could enable the creation of optimal detrending functions for PEC and SEC (whether factorized version or not).

There are also many computational lines of inquiry. For example, we are exploring random sampling ("randomized") SVD as a factorization method [34], which can approximate the SVD over large datasets orders-of-magnitude faster than traditional SVD. This development could enable real-time processing during all acquisitions (via the ML:fKK-EC) by initially training with few spectra and retraining when it is calculated that the current basis vectors do not adequately support new data. To bolster this, we are examing methods to update the basis vector set without re-running SVD. Additionally, we are exploring alternative factorization approaches that could enable the ML:fKK-EC to more broadly process chemical components that were not contained within the training data. Similarly, we are working to develop a universal basis set that could be re-used without training on the current sample. We are also exploring "active learning" methods to take advantage of real-time processing that could identify and explore regions of interest during an acquisition.

In conclusion, this work presents the development of a series of new methods for extracting the self-referenced Raman signatures from raw CARS spectra. These new methods, in aggregate, are orders-of-magnitude faster than the conventional implementations and are amenable to high-throughput and even real-time processing with appropriate training data. This advancement facilitates on-the-fly visualization and analysis and would further support such opportunities as in vivo imaging and ad hoc selection of regions-of-interest.

Acknowledgments

The authors wish to thank Sheng Lin-Gibson, Nancy Lin, John Henry Scott, Donald Atha, and Swarnavo Sarkar at NIST for their helpful discussions and insights towards the preparation of this manuscript.

Disclosures

Any mention of commercial products or services is for experimental clarity and does not signify an endorsement or recommendation by the National Institute of Standards and Technology.

The authors declare no conflicts of interest.

References

1. C. H. Camp Jr, Y. J. Lee, J. M. Heddleston, C. M. Hartshorn, A. R. Hight Walker, J. N. Rich, J. D. Lathia, and M. T. Cicerone, “High-Speed Coherent Raman Fingerprint Imaging of Biological Tissues,” Nat. Photonics 8(8), 627–634 (2014). [CrossRef]  

2. C. H. Camp Jr and M. T. Cicerone, “Chemically sensitive bioimaging with coherent Raman scattering,” Nat. Photonics 9(5), 295–305 (2015). [CrossRef]  

3. C. Di Napoli, I. Pope, F. Masia, P. Watson, W. Langbein, and P. Borri, “Hyperspectral and differential CARS microscopy for quantitative chemical imaging in human adipocytes,” Biomed. Opt. Express 5(5), 1378–1390 (2014). [CrossRef]  

4. A. F. Pegoraro, A. D. Slepkov, A. Ridsdale, D. J. Moffatt, and A. Stolow, “Hyperspectral multimodal CARS microscopy in the fingerprint region,” J. Biophotonics 7(1-2), 49–58 (2014). [CrossRef]  

5. P. D. Chowdary, Z. Jiang, E. J. Chaney, W. A. Benalcazar, D. L. Marks, M. Gruebele, and S. A. Boppart, “Molecular histopathology by spectrally reconstructed nonlinear interferometric vibrational imaging,” Cancer Res. 70(23), 9562–9569 (2010). [CrossRef]  

6. R. Kinegawa, K. Hiramatsu, K. Hashimoto, V. R. Badarla, T. Ideguchi, and K. Goda, “High-speed broadband Fourier-transform coherent anti-stokes Raman scattering spectral microscopy,” J. Raman Spectrosc. 50(8), 1141–1146 (2019). [CrossRef]  

7. M. Tamamitsu, Y. Sakaki, T. Nakamura, G. K. Podagatlapalli, T. Ideguchi, and K. Goda, “Ultrafast broadband Fourier-transform CARS spectroscopy at 50,000 spectra/s enabled by a scanning Fourier-domain delay line,” Vib. Spectrosc. pp. 1–7 (2016).

8. J. X. Cheng, L. D. Book, and X. S. Xie, “Polarization coherent anti-Stokes Raman scattering microscopy,” Opt. Lett. 26(17), 1341–1343 (2001). [CrossRef]  

9. E. T. Garbacik, J. P. Korterik, C. Otto, S. Mukamel, J. L. Herek, and H. L. Offerhaus, “Background-free nonlinear microspectroscopy with vibrational molecular interferometry,” Phys. Rev. Lett. 107(25), 253902 (2011). [CrossRef]  

10. N. Dudovich, D. Oron, and Y. Silberberg, “Single-pulse coherently controlled nonlinear Raman spectroscopy and microscopy,” Nature 418(6897), 512–514 (2002). [CrossRef]  

11. E. O. Potma, C. L. Evans, and X. S. Xie, “Heterodyne coherent anti-Stokes Raman scattering (CARS) imaging,” Opt. Lett. 31(2), 241–243 (2006). [CrossRef]  

12. M. Müller and A. Zumbusch, “Coherent anti-Stokes Raman scattering microscopy,” ChemPhysChem 8, 2157–2170 (2007). [CrossRef]  

13. M. Cui, B. R. Bachler, and J. P. Ogilvie, “Comparing coherent and spontaneous Raman scattering under biological imaging conditions,” Opt. Lett. 34(6), 773–775 (2009). [CrossRef]  

14. Y. X. Liu, Y. J. Lee, and M. T. Cicerone, “Broadband CARS spectral phase retrieval using a time-domain Kramers-Kronig transform,” Opt. Lett. 34(9), 1363–1365 (2009). [CrossRef]  

15. E. M. Vartiainen, “Phase retrieval approach for coherent anti-Stokes Raman scattering spectrum analysis,” J. Opt. Soc. Am. B 9(8), 1209–1214 (1992). [CrossRef]  

16. A. Karuna, F. Masia, P. Borri, and W. Langbein, “Hyperspectral volumetric coherent anti-Stokes Raman scattering microscopy: quantitative volume determination and NaCl as non-resonant standard,” J. Raman Spectrosc. 47(9), 1167–1173 (2016). [CrossRef]  

17. C. H. Camp Jr, Y. J. Lee, and M. T. Cicerone, “Quantitative, comparable coherent anti-Stokes Raman scattering (CARS) spectroscopy: correcting errors in phase retrieval,” J. Raman Spectrosc. 47(4), 408–415 (2016). [CrossRef]  

18. C. W. Freudiger, W. Min, B. G. Saar, S. Lu, G. R. Holtom, C. He, J. C. Tsai, J. X. Kang, and X. S. Xie, “Label-Free Biomedical Imaging with High Sensitivity by Stimulated Raman Scattering Microscopy,” Science 322(5909), 1857–1861 (2008). [CrossRef]  

19. F. Masia, A. Glen, P. Stephens, P. Borri, and W. Langbein, “Quantitative chemical imaging and unsupervised analysis using hyperspectral coherent anti-Stokes Raman scattering microscopy,” Anal. Chem. 85(22), 10820–10828 (2013). [CrossRef]  

20. D. Zhang, P. Wang, M. N. Slipchenko, D. Ben-Amotz, A. M. Weiner, and J. X. Cheng, “Quantitative vibrational imaging by hyperspectral stimulated raman scattering microscopy and multivariate curve resolution analysis,” Anal. Chem. 85(1), 98–106 (2013). [CrossRef]  

21. W. M. Tolles, J. W. Nibler, J. R. McDonald, and A. B. Harvey, “A Review of the Theory and Application of Coherent Anti-Stokes Raman Spectroscopy (CARS),” Appl. Spectrosc. 31(4), 253–271 (1977). [CrossRef]  

22. P. H. C. Eilers, “A perfect smoother,” Anal. Chem. 75(14), 3631–3636 (2003). [CrossRef]  

23. P. H. C. Eilers and H. F. M. Boelens, “Baseline correction with asymmetric least squares smoothing,” (2005). Unpublished.

24. T. S. Huang and P. M. Narendra, “Image restoration by singular value decomposition,” Appl. Opt. 14(9), 2213–2216 (1975). [CrossRef]  

25. D. Tufts, R. Kumaresan, and I. Kirsteins, “Data adaptive signal estimation by singular value decomposition of a data matrix,” Proc. IEEE 70(6), 684–685 (1982). [CrossRef]  

26. A. D. Poularikas, “Hilbert Transform,” in The Handbook of Forumulas and Tables for Signal Processing, A. D. Poularikas, ed. (CRC, Boca Raton, FL, 1999), chap. 15.

27. R. Giryes and M. Elad, “Sparsity-based poisson denoising with dictionary learning,” IEEE Trans. on Image Process. 23(12), 5057–5069 (2014). [CrossRef]  

28. H. Ku, “Notes on the use of propagation of error formulas,” J. Res. Natl. Bureau Standards, Sect. C: Eng. Instrumentation 70C, 263–273 (1966).

29. J. M. P. Nascimento and J. M. Bioucas-Dias, “Vertex Component Analysis: A Fast Algorithm to Unmix Hyperspectral Data,” IEEE Trans. Geosci. Remote Sensing 43(4), 898–910 (2005). [CrossRef]  

30. T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning (Springer, New York, 2009), 2nd ed.

31. J. De Gelder, K. De Gussem, P. Vandenabeele, and L. Moens, “Reference database of Raman spectra of biological molecules,” J. Raman Spectrosc. 38(9), 1133–1147 (2007). [CrossRef]  

32. B. G. Frushour and J. L. Koenig, “Raman scattering of collagen, gelatin, and elastin,” Biopolymers 14(2), 379–391 (1975). [CrossRef]  

33. K. Czamara, K. Majzner, M. Z. Pacia, K. Kochan, A. Kaczor, and M. Baranska, “Raman spectroscopy of lipids: A review,” J. Raman Spectrosc. 46(1), 4–20 (2015). [CrossRef]  

34. N. Halko, P. G. Martinsson, and J. A. Tropp, “Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions,” SIAM Rev. 53(2), 217–288 (2011). [CrossRef]  

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (4)

Fig. 1.
Fig. 1. (a) Workflow for the conventional denoising, KK, PEC, and SEC, where $m$ is the total number of spatial pixels (“flattened") and $n$ is the number of frequency channels. (b) Workflow for the fKK-EC where the processing steps are performed on basis vectors rather than the underlying spectra. (c) Workflow for the ML:fKK-EC in which only the training data is processed via the fKK-EC and regression is used to transform new data.
Fig. 2.
Fig. 2. (a) Concentration map of simulated dataset composed of three chemical constituents, colored as red (Chem 1), green (Chem 2), and blue (Chem 3). (b) Ternary plot showing the concentration of the simulation. (c) CARS (solid lines) and NRB (dashed) spectra of the three pure constituents. The spectra of a reference surrogate is shown in black. (d) Processing speed enhancement of fKK-EC and ML:fKK-EC with respect to conventional processing. Each trace shows the mean enhancement over three runs with the shading showing $\pm$1 standard deviation. (e) Fraction of computing time of each step. Note: only fKK-EC and ML:fKK-EC have a reconstruction (Reconst.) step. Also, only the ML:fKK-EC has a regression (Regress.) step. (f) Mean RSS showing the factorized methods show relatively similar, if not improved, RSS values from the conventional workflow. (g)–(i) Comparison of single-pixel spectra processed using the conventional methods and the fKK-EC. (j)–(l) Comparison of single-pixel spectra processed using the fKK-EC and the ML:fKK-EC.
Fig. 3.
Fig. 3. (a) Pseudocolor image derived from fKK-EC processed CARS image, highlighting DNA (yellow), collagen (cyan), and lipids (red). Inset shows zoomed-in region. Scale bar is 100 $\mu$m. (b) Single pixel spectra for locations identified by arrows in (a). (c) Comparison of spectrum processing time between conventional and fKK-EC workflow.
Fig. 4.
Fig. 4. Pseudocolor image derived from ML:fKK-EC processed CARS image, highlighting DNA (yellow), collagen (cyan), and lipids (red). The dashed-white box indicates the sub-image used for training. Scale bar is 100 $\mu$m. Arrows identify single-pixels used for spectral comparison in (b) between conventional and ML:fKK-EC workflow, which shows close agreement. (b) Single pixel spectra for locations identified by arrows in (a). (c) Comparison of spectrum processing time between conventional and ML:fKK-EC workflow.

Equations (25)

Equations on this page are rendered with MathJax. Learn more.

I C A R S ( ω )     | { [ E S ( ω ) E p ( ω ) ] χ ( 3 ) ( ω ) } E p r ( ω ) | 2 | C ~ s t ( ω ) | 2 | χ ~ ( 3 ) ( ω ) | 2 ,
K C A R S ( ω ) = χ ( 3 ) ( ω ) χ n r ( ω ) = I C A R S ( ω ) I N R B ( ω ) A C A R S ( ω ) exp [ i H ^ { 1 2 ln I C A R S ( ω ) I N R B ( ω ) } ϕ C A R S ( ω ) ] ,
K ( ω )   =   χ ( 3 ) ( ω ) χ r e f ( ω ) = I C A R S ( ω ) I r e f ( ω ) A ( ω ) exp [ i H ^ { 1 2 ln I C A R S ( ω ) I r e f ( ω ) } ϕ ( ω ) ]   =   A C A R S ( ω ) 1 Ξ ξ ( ω ) A e r r ( ω ) exp [ i ϕ C A R S ( ω ) + i H ^ { 1 2 ln 1 Ξ ξ ( ω ) } ϕ e r r ( ω ) ] .
1 Ξ = Re { K ( ω ) exp [ H ^ { ϕ e r r ( ω ) } ] exp [ i ϕ e r r ( ω ) ] } ,
K C A R S ( ω ) = K ( ω ) exp [ H ^ { ϕ e r r ( ω ) } ] exp [ i ϕ e r r ( ω ) ] Re { K ( ω ) exp [ H ^ { ϕ e r r ( ω ) } ] exp [ i ϕ e r r ( ω ) ] } .
A   =   [ a 1 ( ω ) ,   a 2 ( ω ) ,     ,   a M ( ω ) ] T R M × N = U S V T .
H ^ { A }   =   [ H ^ { A 1 , : ( ω ) } H ^ { A 2 , : ( ω ) } H ^ { A M , : ( ω ) } ] = [ H ^ { U 1 , 1 S 1 , 1 v 1 ( ω ) + U 1 , 2 S 2 , 2 v 2 ( ω ) + + U 1 , N S N , N v N ( ω ) } H ^ { U 2 , 1 S 1 , 1 v 1 ( ω ) + U 2 , 2 S 2 , 2 v 2 ( ω ) + + U 2 , N S N , N v N ( ω ) } H ^ { U M , 1 S 1 , 1 v 1 ( ω ) + U M , 2 S 2 , 2 v 2 ( ω ) + + U M , N S N , N v N ( ω ) } ]   =   [ U 1 , 1 S 1 , 1 H ^ { v 1 ( ω ) } + U 1 , 2 S 2 , 2 H ^ { v 2 ( ω ) } + + U 1 , N S N , N H ^ { v N ( ω ) } U 2 , 1 S 1 , 1 H ^ { v 1 ( ω ) } + U 2 , 2 S 2 , 2 H ^ { v 2 ( ω ) } + + U 2 , N S N , N H ^ { v N ( ω ) } H ^ { U M , 1 S 1 , 1 v 1 ( ω ) } + U M , 2 S 2 , 2 H ^ { v 2 ( ω ) } + + U M , N S N , N H ^ { v N ( ω ) } ]   =   U S H ^ { V T } .
K f K K ( ω ) = exp ( A ) exp ( i U S H ^ { V T } ) .
σ A ( ω )     σ C A R S ( ω ) 2 I C A R S ( ω ) α I C A R S ( ω ) + σ g 2 2 I C A R S ( ω ) 1 f ( ω ) ,
A m , :   =   f ( ω ) 1 2 ln I C A R S [ m ] ( ω ) I r e f ( ω ) for all  m
K f K K ( ω )   =   exp ( A f ( ω ) ) exp ( i U S H ^ { V T f ( ω ) } ) ,
Φ e r r   =   D ^ { U S H ^ { V T f ( ω ) } } U S Φ P E C T ,
q m a x   =   argmax i { U : , i } for each  i
q m i n   =   argmin i { U : , i } for each  i
U s s   =   U q , :   ,
Φ e r r   =   D ^ { U s s S H ^ { V T f ( ω ) } } U s s S X Φ P E C T
Φ P E C T   =   X 1 Φ e r r Φ P E C T   =   ( X T X + λ I ) 1 X T Φ e r r   ,
K f K K f P E C ( ω )   =   exp [ U S ( V T f ( ω ) + H ^ { Φ P E C } ) ] exp [ i U S ( H ^ { V T f ( ω ) } Φ P E C ) ] ,
1 2 ln I C A R S ( ω ) I N R B ( ω ) Ξ   =   1 2 ln I C A R S ( ω ) I N R B ( ω ) 1 2 ln Ξ = ln 1 Ξ .
U S ( V T f ( ω ) + H ^ { Φ P E C } )   =   ln 1 Ξ ,
U S ( V T f ( ω ) + H ^ { Φ P E C } V S E C T )   =   ln 1 = 0 .
V S E C T   =   M ^ { V T f ( ω ) + H ^ { Φ P E C } } ,
K C A R S     exp [ U S ( V T f ( ω ) + H ^ { Φ P E C } V S E C T ) ] exp [ i U S ( H ^ { V T f ( ω ) } Φ P E C ) ] ,
A n e w   =   U n e w S V T
U n e w   =   A n e w ( S V T X ) 1 U n e w   =   A n e w ( X T X + λ I ) 1 X T .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.