Multi-band sampling strategy [message #72184] |
Tue, 17 August 2010 20:10  |
JessW
Messages: 5 Registered: August 2010
|
Junior Member |
|
|
Hi all,
I'm using an IDL script in ENVI to retrieve the values of a multiband
image at a user-specified number of pixels. The script works as
intended, but is quite slow; sampling an 8-band image at ~ 38,000
pixel locations takes
52.35 minutes. The issue is the following loop:
FOR i= 0L, nSamplePix - 1 DO BEGIN
pixValues[i,*] = ENVI_GET_SLICE(fid=fid,line=(index[1,i]-1),$
pos=bandsSelected,xs=(index[0,i]-1), xe=(index[0,i]-1))
ENDFOR
If anyone can suggest an alternate, faster sampling strategy--
preferably one that doesn't include the purchase of a new, faster
computer--I would be extremely grateful.
Thanks,
Jess
|
|
|
|