Lee filter for reducing speckle noise in images. Vectorised version of http://www.mathworks.com/matlabcentral/fileexchange/9456-lee-filter
not that much useful
I know you just vectorized someone else's code, but you should at least check that code to see if it's useful before reposting it. If you fill out the definition of 'ENLs' into that of 'sx2s' you'll find that 'sx2s' == 0, and if you look at the pixel values for 'sx2s' you'll see that this is true (up to numerical accuracy). Thus, 'fbar' = 'means', you're outputting the result of a mean filter! I'm sure that this is not what a Lee filter is supposed to to.
In the image processing toolbox there is a mathworks supplied function wiener2.m that implements the Lee filter. Since a requirement for using this function is the image processing toolbox I fail to see any utility of this function, when one would already have the image processing toolbox with the Lee-filter if one can run this function. Further that function for example lets me choose the size of the neighbourhood to use for filtering, something this function has hard-coded.