Machine learning in multiexposure laser speckle contrast imaging can replace conventional laser Doppler flowmetry

Abstract. Laser speckle contrast imaging (LSCI) enables video rate imaging of blood flow. However, its relation to tissue blood perfusion is nonlinear and depends strongly on exposure time. By contrast, the perfusion estimate from the slower laser Doppler flowmetry (LDF) technique has a relationship to blood perfusion that is better understood. Multiexposure LSCI (MELSCI) enables a perfusion estimate closer to the actual perfusion than that using a single exposure time. We present and evaluate a method that utilizes contrasts from seven exposure times between 1 and 64 ms to calculate a perfusion estimate that resembles the perfusion estimate from LDF. The method is based on artificial neural networks (ANN) for fast and accurate processing of MELSCI contrasts to perfusion. The networks are trained using modeling of Doppler histograms and speckle contrasts from tissue models. The importance of accounting for noise is demonstrated. Results show that by using ANN, MELSCI data can be processed to LDF perfusion with high accuracy, with a correlation coefficient R=1.000 for noise-free data, R=0.993 when a moderate degree of noise is present, and R=0.995 for in vivo data from an occlusion-release experiment.


Introduction
The microcirculatory blood flow can be assessed using laserbased techniques, which indirectly quantify the Doppler shifts that occur when light is scattered by moving red blood cells. These techniques are commonly based on either a temporal 1,2 or spatial 3,4 analysis of the dynamic speckle pattern formed when Doppler shifted and nonshifted light is backscattered from a laser illuminated tissue and mixed on a detector. In laser Doppler flowmetry (LDF), an almost direct mapping of Doppler shifts can be attained by studying the frequency distribution of the temporal speckle fluctuations. This technique can produce perfusion estimations that are proportional to the blood flow speed if the Nyquist criterion for the photodetector current is fulfilled. Sampling rates well above 10 kHz are typically required, which has limited the LDF applicability to mainly include single point instruments capable of studying variations in tissue perfusion over time, or slow scanning systems measuring one point after the other. Laser speckle contrast imaging (LSCI) presents one way of overcoming the single point limitation while keeping a high time-resolution. The LSCI technique is based on a spatial analysis of the speckle dynamics, where Doppler effects are indirectly quantified as local blurring caused by speckle motion. The speckle blurring effect, measured as the local image contrast, depends on the exposure time of the camera. While short exposure times can capture fast variations related to high Doppler shifts, longer exposure times can be related to the degree of Doppler shifted light. 5 Compared to LDF, there is no direct relationship between the distribution of Doppler frequencies and the speckle contrast for single exposure time LSCI.
The relation between LSCI and LDF has been the subject of many papers. Several studies [6][7][8] have investigated the relation between single-point LDF and LSCI during induced postocclusive reactive hyperemia, with the observation that LSCI underestimates high perfusions compared to LDF and that the relation is nonlinear. Based on empirical measurements, both Tew et al. 6 and Humeau-Hurtier et al. 7 concluded that the relation could be described by a power function, although their function coefficients did not agree. Binzoni et al. 8 also found the same nonlinearity and proposed a subject-dependent calibration method to adjust this, again based on empirical measurements. Common for these papers is that they are empirical and lack a solid theoretical base for the models connecting LDF and LSCI. Sun et al. 9 showed that the relation between LSCI and LDF is dependent on exposure time, where increasing exposure time increases nonlinearity. Therefore, it seems plausible to assume that multiexposure LSCI (MELSCI) provides a more complete picture that could explain the relation. Thompson and Andrews 10 showed that MELSCI, with sufficiently many exposure times over the approximate range 50 μs to 400 ms can be used to reconstruct the LDF power spectrum for in vivo measurements, proving that MELSCI and LDF are, in essence, equivalent measurements. Parthasarathy et al. 11 presented a speckle model for use with multiexposure data, which accounted specifically for the effect of static scatterers. This model was later expanded by Kazmi et al. 12 The recent theoretical framework on the relationship between LDF and LSCI 5 shows a pathway for calculating LDF perfusion from MELSCI data. However, previous proposed methods for estimating perfusion from MELSCI data are either too computationally demanding to be suitable for real-time applications where perfusion images are presented at video frame rates, 12 or require frame-rates that are too high for continuous recording. 10 The aim of this study was to present a computationally effective method to calculate a perfusion estimate, based on multiple exposure speckle contrasts, that accurately resembles the perfusion estimate retrieved from conventional LDF.

Materials and Methods
The basic idea of the developed method is to exploit the Monte Carlo-based method we have developed in several studies for light transport in an individualized multilayer skin model. 13 Figure 1 presents a flowchart of the principles of how the proposed method is trained and evaluated.

Conventional perfusion estimates
In conventional LDF, the perfusion estimate is calculated from the first order moment of the photodetector current power spectrum PðfÞ as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 3 2 6 ; 7 5 2 where i dc is the average detected light intensity, k LDF is a calibration constant, and f max is the maximum frequency of the Doppler power spectrum, 25 kHz in this study unless otherwise stated. The Doppler power spectrum is calculated as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 3 2 6 ; 6 7 3 PðfÞ ¼ jF ði ac Þ 2 j; where F ð·Þ denotes the Fourier transform and i ac is the time fluctuating detected light intensity, where the intensity is fluctuating because of the moving speckle pattern. In conventional single exposure LSCI, the perfusion estimate can be calculated from the spatial contrast KðTÞ as in Ref. 4: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 3 2 6 ; 5 8 6 where k LSCI is a calibration constant, n equals 1 or 2, and T is the exposure time. We have previously shown that by choosing n ¼ 1, the perfusion estimate becomes stronger correlated to LDF perfusion, and by choosing n ¼ 2, the true tissue perfusion is closer resembled. 5 The contrast is calculated as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 4 ; 3 2 6 ; 4 8 7 where σðTÞ is the standard deviation of the intensities in a small submatrix of the acquired image, and hIðTÞi is the average intensity in the same submatrix. In this study, we use a submatrix size of 4 × 4 pixels unless otherwise stated. When calculating the single exposure time perfusion, we used an exposure time of 6 ms. It should be noted that i dc is the same as hIðTÞi but, due to conventional notation, we use i dc in the context of LDF and hIðTÞi in the context of LSCI. Furthermore, the calibration constants k LDF in Eq. (1) and k LSCI in Eq. (3) are chosen so that the perfusion estimate equals 250 perfusion units (PU) when measuring on a calibration standard of polystyrene microspheres.  This is referred to as multiexposure LSCI (MELSCI).
In this paper, we use contrasts from seven exposure times T: 1, 2, 4, 8, 16, 32, and 64 ms. The contrasts for these exposure times are calculated from the same 64 consecutive exposures of 1 ms. The contrast for T ¼ 1 ms is calculated as the average of the contrast of all 64 exposures. The contrast for T ¼ 2 ms is calculated by summating the intensity of consecutive pairs of 1 ms exposures, and then calculating the average contrast of the 32 resulting speckle patterns, and so on until for T ¼ 64 ms, the intensity for all 64 exposures is first summated and the contrast is calculated from the resulting summated speckle pattern. This is referred to as synthetic multiexposures and is described in more detail elsewhere. 16 Kazmi et al. 12 have proposed the following model to utilize the MELSCI data: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 5 ; 6 3 ; 5 2 5 K 2 ðTÞ ¼ β The model is an extension of a similar model first presented by Parthasarathy et al. 11 Here, τ is the speckle decorrelation time that is inversely proportional to the average flow speed, ρ is the fraction of Doppler shifted light, and T is the exposure time. The parameter β is a constant instrument dependent correction factor accounting for the number of speckles per pixel and is set to 1 in this paper because the model is only used on modeled data. The constant v n accounts for contrast due to noise and is assumed to be zero in this paper as the model is only used on modeled data without noise. Fitting the model to the multiexposure data requires a nonlinear optimization algorithm, in our case the trust-region-reflective algorithm in MATLAB 2017a (MathWorks Inc.). From the optimal model parameters, a perfusion estimate is calculated as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 6 3 ; 2 8 2 s perf;Kazmi ¼ This estimate is an extension to the 1∕τ expression that is sometimes used as a speckle flow index in LSCI, accounting for variations in blood amount estimated by ρ, in a similar manner to that done in LDF. Note, however, that ρ is also dependent on other tissue properties, such as the epidermis thickness and the scattering properties of the static tissue, similarly to that of the concentration of moving blood cells (CMBC) estimate in LDF.

Artificial neural network
The principle is to translate the contrast values at various exposure times to LDF perfusion. A machine learning approach using ANN was developed for this translation. A batch of 25 nets was trained on a set of 100,000 training examples (see Sec. 2.2) with seven inputs K 2 ðTÞ, T ∈ ½1; 2; 4; 8; 16; 32; 64, and one output s perf;LDF , using the neural network toolbox in MATLAB 2017a. Using the default settings in the neural network toolbox, the data set was randomly split into three parts. 70% of the data was used as a training set and 15% was used for validation. If the performance on the validation set decreased during six successive iterations, the training was aborted early. The final 15% was used for evaluation, obtaining a performance number that is unbiased in regard to the other 85% of the data. The best performing network in the batch of 25 was then evaluated on a different set of 50,000 examples to avoid any bias in the performance numbers and to allow for comparison with the other perfusion estimates. Selecting the best network from a batch of 25 greatly reduced the influence of the random initialization of the network and was sufficient to make the training reproducible.
Several net architectures were investigated, including singleand multilayer networks with different numbers of nodes. We found no significant performance increase when using multiple hidden layers or when using a single hidden layer with more than 10 nodes. Therefore, the results presented in this paper are from a net with one hidden layer with 10 nodes. The activation function used in the hidden layer was the commonly used hyperbolic tangent function. In the output layer, a linear activation function was used.

Performance estimation
The performance of the trained ANN-MELSCI as well as the perfusion estimates from single exposure LSCI and the Kazmi model for MELSCI were determined by calculating the correlation coefficient (R) between the LDF perfusion and the estimated perfusion for the evaluation set (N ¼ 50;000), as well as the root mean square of the absolute and relative differences, respectively (RMSa and RMSr). When calculating RMSr, data points with LDF perfusion <1.5 PU were excluded. This corresponds to less than 1% of the data points. In addition, the 50,000 evaluation models were grouped into 100 bins containing 500 data points each, sorted on LDF perfusion. For each bin, the average perfusion as well as the standard deviation of the estimated perfusion values were calculated, and plots were generated based on that data with the standard deviation indicating the precision.

Tissue model
A three-layer tissue model with varying optical and geometrical properties, covering a wide range of red blood cell tissue fractions and speed distributions (see Fig. 2), was used to generate the Doppler histograms and the speckle simulations. The tissue model, as well as how to calculate Doppler histograms from the model, has previously been described. 14,15,17 Random models were generated similarly, as described in Fredriksson and Larsson. 17 Three sets of random models were generated, one training set consisting of 100,000 models, one evaluation set consisting of 50,000 models, and one set of 2000 models, that were used in speckle simulations (see Sec. 2.2.3).

Contrast calculation from model
Multiexposure laser speckle contrast values were calculated for each of the simulated Doppler histograms HðfÞ, as described in where Ã denotes cross-correlation. This gives the intensity correlation function g ð2Þ as a function of time τ by taking the inverse Fourier transform of the Doppler power spectrum as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 8 ; 6 3 ; 4 8 9 g ð2Þ ðτÞ ¼ F −1 fPðfÞg: An extension of the Siegert relation, valid for partly or fully Doppler shifted light, was used to calculate the intensity correlation function g ð1Þ as follows: : The multiexposure contrast K, as a function of exposure time T, is then given by E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 0 ; 6 3 ; 3 6 where the coherence factor β was set to 1 for contrasts calculated from the models. It should be noted that in the models, no speckle averaging caused by multiple speckles per pixel, multiple polarization directions, or multiple laser longitudinal modes exist. 18

Speckle simulations
Speckle simulations were performed as described by Fredriksson and Larsson. 5 These simulations were mainly performed to statistically characterize the contrast variations that occur due to different speckle realizations over time for a given Doppler histogram. The simulation setup consisted of a 4 × 4 pixel detector with a pixel size of 8 × 8 μm, mimicking the camera sensor used in our measurement setup (see Sec. 2.3). Spatial and temporal oversampling was used to properly capture the full statistics of the speckle pattern dynamics. Therefore, the intensity was simulated in 64 × 64 spatial points, each This gives a total of 42 speckles over an 8 × 8 μm pixel area. The Doppler frequencies for the 2000 E-field sources were generated for 2000 tissue models, as described in Sec. 2.1.4. An example of a simulated 64 × 64 speckle cube at 50 timepoints is given in Fig. 3.
The speckle simulations were also used to calculate unique realizations of the Doppler power spectrum, based on the average detector intensity for each 20 μs, for each of the ten 64 ms intervals for each of the 2000 models. The LDF perfusion was calculated from the Doppler power spectra using Eq. (1). In that way, the effect of stochastic noise on LDF perfusion could be studied.
To investigate the validity of having more than one speckle per pixel, 10 of the models were simulated at 1024 × 1024 points, each placed 0.0625 μm apart (i.e., eight times higher resolution compared to previous simulations). Spatial binning was done at six levels ranging from 8 × 8 points to 256 × 256 points. Corresponding pixel sizes and theoretical number of speckles per pixel are given in Table 1.

Stochastic contrast noise model
The laser speckles formed on the detector can be considered unique realizations of a stochastic process, where each realization is dependent on the exact phase of each E-field, even if the frequency distribution is constant. Therefore, the measured contrast contains stochastic noise that can only be reduced by averaging over several realizations, spatially and/or temporally. Thus, stochastic noise will affect both the Doppler power spectra and the contrast values. The theoretically calculated contrast, Sec. 2.2.2, does not contain stochastic noise. Therefore, to account for stochastic noise in modeled data used in the evaluation and training, a noise model was developed.
The noise model was based on simulated speckle patterns from 2000 tissue models, as described in Sec. 2.2.3. The simulated time series of speckle images was divided into 10 intervals, each 64 ms long. For each interval, multiexposure contrast data were calculated at exposure times of 1, 2, 4,. . . , 64 ms, as described in Sec. 2.1.
2. An example of the 10 realizations of multiexposure contrast decays for one tissue model is given in Fig. 4(a). Note that the maximum contrast is much lower than unity and is due to there being several speckles per pixel. It was noted that the unique realizations of the contrast at each exposure time followed a normal distribution. Therefore, the noise η can be described as the standard deviation divided by the average contrast for each exposure time as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 2 ; 6 3 ; 3 5 5 ηðTÞ ¼ stdðK r ðTÞÞ K r ðTÞ ; ðr ∈ ½1; : : : ; 10Þ; (12) where K r ðTÞ denotes a unique realization of the contrast at exposure time T. It was also noted that ηðTÞ was proportional to the average contrast of all exposure times as follows: The noise model was used to generate contrast offsets K noise ðTÞ that are added to the actual contrast KðTÞ. When inspecting Fig. 4(a), it can be realized that there is a strong dependency between K noise ðTÞ for neighboring exposure times T, which also must be considered in the model. The variable η diff ðTÞ describes the standard deviation of the difference in K noise ðTÞ compared to the one step shorter exposure time [e.g., the difference between Kð16Þ and Kð8Þ]. Based on this information, the noise model is given by E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 4 ; 3 2 6 ; 3 2 7    where ξ T is a unique random number for each T, originating from a zero mean normal distribution with standard deviation of unity. The seven parameters in the noise model (ηð1Þ and η diff ðTÞ for T ∈ ½2;4; 8; : : : ; 64) were quantified using speckle simulations, as described above. The parameter values depend on the optical setup, i.e., how many speckles are formed on each pixel.
Ten realizations of the stochastic noise model [Eq. (7)] were added to the average of the contrast curves, as shown in Fig. 4(a) and plotted in Fig. 4(b). Figure 4(b) shows that realizations of contrast curves with the noise model are comparable to those inherent in the speckle simulations in Fig. 4(a).

Comparison of LDF and ANN-MELSCI perfusion estimates
An occlusion-release provocation of the forearm was performed. The provocation protocol included 2 min of baseline, followed by 5 min of occlusion and 5 min of reperfusion. The subject was a 26-year old Caucasian male without any known afflictions of the microcirculation. The subject was acclimatized in the lab 10 min before the experiment. The measurement protocol was approved by the Regional Ethical Review Board at Linköping University, Linköping, Sweden (D.nr 2015/392-31). During the provocation, high-speed speckle images from a laser illuminated (785 nm) vein-free area (4 × 2 mm) of the skin were captured at a 128 × 60 pixel resolution using a high-speed CMOS camera (EoSens 3CXP, Mikrotron GmbH, Germany) equipped with a 12.5 mm lens (CF12.5HA-1, Fujinon Fujifilm, Japan) set to an f-number N ¼ 1.4 (i.e., f∕1.4). Each set of high-speed data consisted of 1280 speckle images acquired during 64 ms at a speed of 20 kHz using a 45 μs exposure time. Each set was preprocessed in two ways before data were stored. First, 20 consecutive images were accumulated into 1 ms exposure time images, resulting in 64 speckle images for calculation of MELSCI data. The spatially averaged contrast over the entire image was used for further calculations. Second, for calculation of laser Doppler power spectra, an area-averaging over both the left and the right side of each 45-μs exposure time image was performed, resulting in two detector currents captured during 64 ms at 20 kHz. This image acquisition, preprocessing, and data storing was repeated continuously during the measurement at an average rate of 9.9 per second.
For calibration and noise subtraction, additional measurements were performed. These included the acquisition of dark images and measurements on a static target. The static target consisted of a solid homogeneous turbid phantom with optical properties close to those found in tissue. Measurements were also performed on a microsphere solution (PF1001, Perimed AB, Sweden).
The acquired and stored speckle images were first processed by subtracting a dark image. MELSCI data were then calculated, as described in Sec. 2.1.2, before a normalization was done against the maximum contrast taken from the measurement on the static target. No calibration against the minimum contrast level, caused by system noise, was needed as this level was negligible. ANN-MELSCI perfusion was then calculated from the MELSCI data, as described in Sec. 2.1.3 (i.e., ANN trained with modeled data).
The LDF perfusion was calculated, as outlined in Sec. 2.1.1, using the differential detector current calculated as the difference between the left and right detector currents. This differential detector scheme effectively removed any common mode noise while retaining the Doppler-related information. The calculated perfusion values were also noise-compensated using the calibration measurements on the static target.
In order to show the ability of the ANN to accurately mimic LDF perfusion, special care was taken to make the training data reflect the measurement setup. This included accounting for aliasing in the LDF signal processing, and for the low-pass filter effect that occurs in the signal due to the 45-μs exposure time of the camera. A small nonlinearity remained for low perfusions when training ANN-MELSCI with these effects. This was linearized using a fourth degree polynomial fit to the training data and applied to the in vivo ANN-MELSCI perfusion estimate. Note that this polynomial was constructed purely based on the training data and was thus not biased with respect to the in vivo data. Before comparing LDF and ANN-MELSCI perfusion values, calibration against the microsphere solution perfusion was done for each of the two methods.

Spatial map of perfusion from ANN-MELSCI
In addition to the measurements described above, another in vivo measurement was performed during an occlusion-release provocation of a finger. This measurement was recorded with the same camera and laser but with an exposure time of 1 ms and a pixel-resolution of 1024 × 1000. Multiexposure contrasts were calculated using a 4 × 4 pixel submatrix resulting in contrast data in 256 × 250 pixels. Perfusion data were calculated with the ANN detailed in Table 3 and Fig. 6(d).
The purpose of this experiment was to qualitatively evaluate the technique on a spatial map of perfusion. Note that at this pixel-resolution, it is not possible to measure at a framerate high enough to compute LDF perfusion, thus, there is no way to quantitatively compare the MELSCI perfusion and LDF perfusion.

Speckles Per Pixel
The amount of stochastic noise in relation to the contrast, i.e., ηðTÞ in Eq. (5), was evaluated for optical setups with 0.16 to 166 speckles/pixel (see Table 1). The average noise decreased with the number of speckles per pixel, as shown in Fig. 5, which shows the average noise for 10 evaluated models. These simulation results also showed that the number of speckles per pixel did not affect the shape of the contrast curve. It only affected the overall magnitude of the contrast. Furthermore, the stochastic noise as a function of the size of the submatrix was evaluated. It was concluded that the stochastic noise was inversely proportional to the square root of the size of the submatrix. Averaging several small submatrices will thus have the same effect as calculating the contrast of a larger submatrix from the perspective of noise.  The ANN-MELSCI method has a markedly superior R-value and lower RMSa and RMSr in predicting the LDF perfusion than the single exposure time LSCI and the Kazmi model. Therefore, only the ANN-MELSCI method is considered in the rest of the results section.

Performance on Data with Added Stochastic Noise
When adding stochastic noise to the contrast values according to the noise model presented in Sec. 2.2.4, the performance of the ANN-MELSCI decreases compared to the use of contrasts without noise, as shown in Figs. 6(c) and 6(d). The performance of the network when adding noise to the training and/or evaluation data is summarized in Table 3.
The results from the speckle simulations were used to compare the performance values to the effect of stochastic noise on ordinary LDF perfusion. The correlation coefficient and the root mean square differences were calculated by comparing the calculated LDF perfusion from one of the ten realizations to the mean of the other nine for all 2000 simulated models.
The results should thus be comparable with a model trained and evaluated on contrasts with added noise from the described noise model. It is apparent from Table 3 that it is essential to account for noise in the training set if noise is present in the evaluation set. The amount of stochastic noise can be reduced by using averaging or filtering, where the amplitude of the noise reduces with the square root of the number of averages. In Fig. 7, RMSr can be studied for various numbers of averages in the training and evaluation data for ANN-MELSCI. The performance was best when there was the same amount of noise in both training and evaluation data. However, it was much worse for the performance with more noise in the evaluation data than in the training data than the other way around.

In Vivo Examples
The data from the first in vivo measurement were processed, as described in Sec. 2.3.1, and with the LDF and ANN-MELSCI algorithms described in this paper. The resulting perfusion estimates can be seen in Fig. 8, where the correlation coefficient between LDF and ANN-MELSCI perfusion was 0.995 and the absolute and relative RMS deviations were 4.6 PU and 12%, respectively. Note that the perfusion estimates have been separately normalized with respect to the measurement on the microsphere solution, i.e., they have not been normalized with respect to each other.
An illustration of measured contrast values and those in the training data is found in Fig. 9. When considering two of the seven dimensions [K(1) and K(64)], of the contrast space, it can be observed that the training data cover a much larger part of the contrast space than the measurement does. The contrast values in the training data are occasionally >1 due to the added noise.
The second in vivo measurement, described in Sec. 2.3.2, is shown in Fig. 10. Perfusion maps are shown for the occlusion and reperfusion stages of the experiment, calculated as an average over four consecutive images. The increase in perfusion from before to after the release of pressure is clearly visible in the provoked finger.

Discussion
This study shows that by using a machine learning approach with ANNs to analyze multiexposure laser speckle contrast data, conventional laser Doppler perfusion can be resembled with high accuracy. This finding indicates that the contrasts of a set of well-selected exposure times contain essentially all the information that is found in the Doppler power spectrum.
The claim that ANN in MELSCI can replace conventional laser Doppler is foremost based on the evaluation results using modeled data. For this to be valid, the modeled data must reflect all shapes of the Doppler power spectra/contrast curves that can be expected in measurements. Figure 2 shows the range of RBC tissue fractions and average speeds that are used in the models for the training data. The training data models are adapted for skin tissue but also covers geometrical, optical, and blood flow properties that can be expected in most other types of tissues. One exception could be when measuring on large superficial vessels. Such a measurement could result in contrasts lying outside the contrast space of the training data [for example, Kð1 msÞ < 0.4, see Fig. 9] and would thus result in a high uncertainty in the predicted perfusion value. However, this situation can easily be detected by comparing the contrasts of the measurement with the contrast space of the training data. It can then be solved by increasing the range in the training data.  The dynamics in the evaluation measurement ( Fig. 8) is high regarding perfusion, and it can be seen in Fig. 9 that the contrasts found in that measurement are well covered by the contrast space in the training data.
The ability of several LSCI models to resemble conventional laser Doppler perfusion has previously been studied. As expected, it was found that single exposure time LSCI performed relatively poorly compared to models that included multiple exposure times. The Kazmi model 12 that has been used in some studies for calculating perfusion or flow from multiexposure contrasts [20][21][22] performed better. However, it was inferior to the performance of ANN-MELSCI. The realization of the Kazmi model is, moreover, considerably more computationally demanding, due to the nonlinear optimization. We have not explicitly studied how the method presented by Thompson and Andrews 10 performs on our data, because they have already shown how accurately the laser Doppler power spectrum can be calculated from MELSCI contrasts. Compared to the ANN-MELSCI method proposed in this paper, their method requires much higher frame-rates and is more computationally demanding.
The speed of the calculations is relevant if the algorithms were to be implemented in a real-time system. The proposed ANN is able to calculate a perfusion image of 256 × 250 points, i.e., 64,000 perfusion values, in about 25 ms using the MATLAB implementation on a single core on a 3.5 GHz Intel Xeon CPU. Thus, a real-time implementation is realistic, especially when considering the possibility to optimize and parallelize the calculations. In comparison, our implementation of the Kazmi model with nonlinear optimization in each point is 4 orders of magnitude slower.  Map over contrast at 1 and 64 ms for the 100,000 models used in the training data (red-yellow color scale). Corresponding contrasts in the in vivo measurement (Fig. 8), where the cluster of purple dots in the middle originates from baseline and postpeak, the cluster with green points to the right from the occlusion phase, and the cluster of blue dots to the left originates from the perfusion peak (421 to 444 s). Traditionally, an optical setup resulting in about, or less than, one speckle per pixel has been suggested as optimal for LSCI. [23][24][25][26] The rational for that assumption is that the contrast decreases when several speckles are formed per pixel, and that a proper sampling should exceed the Nyquist criterion, i.e., at least 2 pixels per speckle. However, in line with the findings by Qiu et al., 27 we report a reduced stochastic noise and increased signal-to-noise ratio (SNR) when the optical setup results in many speckles per pixel, despite the fact that the overall contrast decreases. The results shown in Fig. 5 suggest that SNR increases with the number of speckles per pixel up to over 100 speckles per pixel. We also concluded that the shape of the contrast decay was not affected by the number of speckles per pixel. Therefore, we have chosen an optical setup with many speckles per pixel to increase the SNR, i.e., contrast divided by stochastic noise, in both the measurement system and in the simulated setup. Smaller speckles can be achieved by an increased lens aperture, i.e., allowing more light to be detected by the camera sensor, which in turn decreases also the influence of detector noise. However, in a system realization, too many speckles per pixel will cause quantization noise in the contrast calculations. In addition, we report that the size of the submatrix does not matter from an SNR perspective, considering that several small submatrices can be spatially averaged to form contrast values with the same contrast as one larger submatrix. We have chosen the unusual submatrix size of 4 × 4 pixels since it is computationally efficient to have a submatrix size that is a power of 2 in the computational scheme using hyperparallel computational hardware, as proposed in Ref. 16.
The results in Sec. 3.3 clearly show the importance of considering noise when training the model. If noise is not included in the training data, but in the evaluation/measurement data, the ANN fails completely in estimating the perfusion. In this study, stochastic noise was considered, but detector noise could also be included if that is significant in relation to the stochastic noise.
When choosing a design for the neural network, the focus was mainly on simplicity since the problem in question is a seemingly simple one-a transfer function from seven variables to one. We chose to present performance from the smallest possible net for which we saw no penalty due to size, in our case, 10 nodes in the hidden layer. While it is possible that a larger network might have achieved a small increase in performance, this would also have come at the cost of computational power, and eventually the risk of overfitting to the training data. Furthermore, at least in this relatively simple application of ANN, optimizing the design of the network itself is not nearly as important as optimizing the training data to accurately depict reality.
The purpose of this paper was to show the ability to accurately resemble LDF perfusion using MELSCI. For the in vivo comparison between LDF and MELSCI perfusion, it was therefore important to include several effects of LDF acquisition and processing in the training data for the ANN. Without considering aliasing and low-pass filtering when training the network, the MELSCI perfusion and LDF perfusion would not match in the in vivo recordings. This means that in order to use the proposed method, a model of the measurement set-up is needed, and the ability to create large datasets that accurately reflect this set-up. A deviation between the LDF and MELSCI perfusion estimates can be noted in the reperfusion peak in Fig. 8. That deviation implies that we have not completely succeeded in resembling all the effects of LDF acquisition and processing, especially not those affecting high frequencies. Nevertheless, the overall results in Fig. 8 provide evidence that MELSCI can be used to resemble LDF perfusion.
We have previously shown that MELSCI data with exposure times between 1 and 64 ms can be continuously acquired and processed at 15.6 frames/s using a high-speed camera solution. 16 This solution is several orders of magnitudes faster than scanning LDF imagers. Using the ANN machine learning approach presented in this study, real-time perfusion imaging can be achieved from MELSCI data. The perfusion estimations from 100,000 simulated models are strongly correlated to conventional LDF perfusion (R ¼ 0.993), as well as in the in vivo occlusion-release experiment (R ¼ 0.995). Thus, it is concluded that LDF scanners can be replaced by MELSCI and ANN, allowing for perfusion imaging at high frame-rates.

Disclosures
Dr. Fredriksson is part-time employed by Perimed AB, which is developing products related to research described in this publication. None of the other authors have disclosable conflicts of interests.
Ingemar Fredriksson is an adjunct lecturer in the Department of Biomedical Engineering at Linköping University, Sweden, and an R&D optics designer at Perimed AB, Järfälla-Stockholm, Sweden. His research focuses on modelling and model-based analysis of laser speckle based and spectroscopic techniques with applications within monitoring and imaging of microcircular blood flow and metabolic processes.
Martin Hultman is a PhD student in the Department of Biomedical Engineering at Linköping University, Sweden. He has a master of science degree in applied physics and electronic engineering, with a focus on system-on-chip development. His research is focused on imaging microcirculation by using high-performance hardware like FPGAs to accelerate image processing algorithms.
Tomas Strömberg is the head of the Department of Biomedical Engineering at Linköping University and leads the research group "Theoretical and Applied Biomedical Optics." He has extensive experience in advanced light transport modeling in pointwise laser Doppler flowmetry and diffuse reflectance spectroscopy, and in collaboration with clinical researchers. Recent interests are in laser speckle contrast imaging and in imaging spectroscopy using various illumination strategies.
Marcus Larsson is a senior lecturer in the Department of Biomedical Engineering at Linköping University, Sweden. His research is focused on theoretical and applied biomedical optics for tissue characterization using speckle-based techniques and steady-state spectroscopic techniques.