Hi all,
I am an IDL beginner and trying to write a code to make a multispectral composite image from cloud free pixels of 4-5 multispectral images. I have already masked the cloudy pixels from the multispectral images that i wish to use for making the final composite. My psudo code for making this composite is something like this:
open the 5 cloud free multispectral image in IDL
loop over all the images
loop over all the bands/ cols/rows
select one of the cloud free images as base images and replace the zero values (cloud masked pixels) of the bands in this image from the non zero values of similar band for other cloud free multispectral image.
write the composited cloud free image as an ENVI output image.
To start with I want to open all the 5 cloud masked multispectral image, but I have been able to open one of them using the following code :
envi_select, title='Choose multispectral image1', fid=fid, dims=dims,pos=pos
num_cols = dims[2]-dims[1]+1
num_rows = dims[4]-dims[3]+1
num_bands = n_elements(pos)
; BIP array
image = fltarr(num_bands,num_cols,num_rows)
for i=0,num_bands-1 do image[i,*,*] = envi_get_data(fid=fid,dims=dims,pos=pos[i])
Can any body suggest how can I open all the images i wish to use and further loop over all the images, their each bands, cloms and rows for my purpose.
thanks,
niti
envi_select, title='Choose multispectral image1', fid=fid, dims=dims,pos=pos
num_cols = dims[2]-dims[1]+1
num_rows = dims[4]-dims[3]+1
num_bands = n_elements(pos)
; BIP array
image = fltarr(num_bands,num_cols,num_rows)
for i=0,num_bands-1 do image[i,*,*] = envi_get_data(fid=fid,dims=dims,pos=pos[i])
|