nirs=samples[*,*,7] nird=data[*,*,7] d=size(nirs,/dim) i=where(nirs gt 0) o=where(nird eq 0) m=min(nirs) m=nirs 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,band) band=data[*,*,b] deglint=long(band - r[1] * (nird - m)+0.5) deglint=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
.r <path to>\<script>.pro
.r C:\Temp\deglint.pro
% Syntax error. ENVI> .r C:\Temp\Glint.pro foreach b, bindgen(6) do begin ^ % Syntax error. At: C:\TEMP\Glint.pro, Line 12 % 1 Compilation error(s) in module $MAIN$.
nirs=samples[*,*,7] nird=data[*,*,7] d=size(nirs,/dim) i=where(nirs gt 0) o=where(nird eq 0) m=min(nirs) out=0 help, m foreach b, bindgen(6) do begin band=samples[*,*,b] r=linfit(nirs,band) band=data[*,*,b] deglint=long(band - r[1] * (nird - m)+0.5) deglint=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
the algorithm is valid only for submerged pixels
foreach b, bindgen(6) dobegin ^ % Syntax error. At: C:\TEMP\deglint.pro, Line 10 % 1 Compilation error(s) in module $MAIN$. % No valid main program present.
@Luke can this be used for aerial images that has online RGB bands..
The image has only Red-Green -Blue Band...
mosaic of several images into an orthophoto.
Then this method will not work. It requires a NIR band.
Would you have an idea which method is more appropriate for such image without NIR.
Thanks
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.