Here is what i got from lpinner at the ESRI forums when i posted this same question... sadly i didn't know how do any of the ones that he mentioned... can anyone help translate this into a more dumped down version? oh, when i tried using the code he provided in IDL, it gave me an error in line 12, or so the log says...
"Have a read of this paper: Hedley et al. (2005) Simple and robust removal of sun glint for mapping shallow-water
benthos. International Journal of Remote Sensing Vol. 26, No. 10, 2107–2112.
Step by step instructions to implement this method are available for ENVI (not ArcGIS sorry).
I use some IDL code from ENVI to do this instead of the above manual method, though I do generate the samples with the ROI tool by hand):
nirs=samples[*,*,7]
nird=data[*,*,7]
d=size(nirs,/dim)
i=where(nirs gt 0)
o=where(nird eq 0)
m=min(nirs[i])
m=nirs[i]
m = m[(sort(m))[5 * N_ELEMENTS(m) / 100] ]
out=0
help, m
foreach b, bindgen(6) do begin
band=samples[*,*,b]
r=linfit(nirs[i],band[i])
band=data[*,*,b]
deglint=long(band - r[1] * (nird - m)+0.5)
deglint[o]=0
if size(out, /n_dimensions) eq 0 then $ ;Image stack doesn't exist yet
out=temporary(deglint) $
else $ ;Concatenate image to stack
out=[[[temporary(out)]],[[temporary(deglint)]]]
endforeach
out=[[[temporary(out)]],[[data[*,*,6]]]]
out=[[[temporary(out)]],[[data[*,*,7]]]]
end
Again note that these methods are for ENVI, not ArcGIS. You could probably reimplement the code in numpy though."
|