It despeckles the BF image data matrix (similar to the despeckle function of ImageJ)
Usage
despecklefun(img, pix, thresh)
Arguments
img
Data matrix. The BF image data matrix.
pix
Integer. A cutoff specifing the area to be examined for speckles.
thresh
Integer. A cutoff to perform the despeckle function. If pixel signal > median object signal + thresh,
the object is a speckle and the median object signal is returned.