Fast Laser Speckle Contrast Calculation

Post date: Nov 14, 2014 11:19:9 AM

I am often getting various questions about the dynamic Laser Speckle Imaging (dLSI) Matlab code and I have realised that some people are simply looking for an implementation of the Matlab contrast calculation for simple LASCA or LSI processing. Anyway that is the starting point for any type of advance contrast analysis.

I have attached the simple Matlab function which does exactly that (you do not have to have an Image Processing toolbox installed).

It is in fact extremely simple:

If your grayscale image is im and the window size is wsize, you can find contrast image imcontrast as simple as following:

imcontrast = lasca(im, wsize);

The lasca function calls the following command:

imcontrast = blockstd(im, wsize) ./ blockmean(im, wsize);

And Implementation of blockstd and blockmean you would find in the attached function file.

Happy Contrasting and do not forget to refer to the source when publishing the results.