run_SpeckleMapping

run_SpeckleMapping


Calculates the average speckle contrast map from Laser Speckle Contrast Imaging (LSCI) raw data.

Description


This function reads the raw speckle data (typically stored in speckle.dat) and calculates the temporal average of the speckle contrast defined by the equation below:

Speckle equation

where the speckle contrast (Ks) is equal to the ratio of standard deviation (σ) to the mean intensity (I) averaged across time. The speckle contrast can be calculated either in the spatial or the temporal dimensions [1]. In brief, the estimation of the speckle contrast in space is obtained by calculating the standard deviation across a 5 by 5 pixel window which may decrease the spatial resolution. In contrast, if the calculation is performed in the temporal domain, the original spatial resolution is preserved.

Input


An image time series with dimensions Y,X,T (LSCI data), given in one of two forms that also select the execution mode:

  • The name (or path) of a .dat file. A bare name is looked up in the save folder. The file is processed in chunks, so the whole recording is never loaded into memory (Low-RAM mode).
  • A numeric Y,X,T array. It is processed in memory (Standard mode): whole when the available RAM allows it, and in chunks otherwise.

Both forms give the same map. Other file types, UMT structs and other dimension layouts are not supported.

Output


A UMT image containing the speckle contrast map of the input data, as a single Y,X entry named SpeckleMap.

Parameters


This parameter sets speckle mapping algorithm. More precisely, it chooses how the standard deviation (see description) is calculated. If set to Spatial, the standard deviation is calculated on the spatial dimension using a 5 by 5 pixel kernel. However, if set to Temporal, the function will calculate the standard deviation over the time dimension using a kernel of 5 frames.

If true, the function will save the speckle map to a TIF file in the same folder of the input data with name std_speckle.tiff.

If true, the speckle contrast values are transformed to negative logarithm values as:

run_SpeckleMapping_eg1

References


  1. Boas, David A., and Andrew K. Dunn. 2010. ‘Laser Speckle Contrast Imaging in Biomedical Optics’. Journal of Biomedical Optics 15 (1): 011109. https://doi.org/10.1117/1.3285504

Back to top

Copyright © LabeoTech 2023. This work is licensed under the GNU General Public License, Version 3.0.