function eit_despeckle, img ;NAME ; eit_despeckle ;PURPOSE ; a simple despecklimg routine ;INPUTS ; img - image to despeckle ;OUTPUTS ; returns the despeckled image ;KEYWORDS ; none ;PROCEDURE ; median filter with threshold ;CREATION ; 18-May-2001. F. Auchere ;MODIFICATIONS ; ;- med = median(img, 9) bad = where((img - med)/img gt 0.1, count) if count eq 0 then return, img else begin filtered = img filtered[bad] = med[bad] return, filtered endelse end
Last revised: - Wed May 9 21:45:10 2007- F. Auchère