I have a raw speckle image with 100 frames which I want to calculate the special LSI contrast for each frame then average all the contrast frames and draw the final sLASCA. Would you please guide me to do it in matlab?
You can use the simple code of Pavel Zakharov on his website. Alternatively you can develop your own function:
1- Read your image (imread function).
2- Convert to grayscale.
3- Do 2-D convolution (conv2): since conv2 takes at least two arguments, you need to define a custom image windows (e.g. containing ones (black color)).
4- Subtract the convoluted image from the original one in step 1.
5- Contrast = standard deviation (image in step 4) / mean (image in step 4).
However, using the Pavel's code would be more convenient.