X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 08 Feb 2012 09:14 AM by  anon
IDL Batch Processing
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
08 Feb 2012 09:14 AM
    Hello, I'm new to IDL and I'm trying to run a script to run band math on 300+ images. I can write the script to do this for one image, but was trying to find a way to do this on all the images. Here is my script: envi, /restore_base_save_files envi_batch_init, log_file='batch.txt' envi_open_file, 'H:\2009_Imagery\December\GeoTIFF\image.tif', r_fid=fid if (fid eq -1) then begin envi_batch_exit return endif envi_file_query, fid, dims=dims t_fid = [fid,fid] pos = [2,3] exp = 'b1*0.0126735' out_name = 'H:\IDL\orthoqb02_09dec022041106' envi_doit, 'math_doit', $ fid=t_fid, pos=pos, dims=dims, $ exp=exp, out_name=out_name, $ r_fid=r_fid END Thanks!

    Deleted User



    New Member


    Posts:
    New Member


    --
    08 Feb 2012 02:19 PM
    I think you can use a FOR loop to read through and process all of the files. Here is a short example: file_names = ['Night.jpg','rose.jpg','people.jpg'] w = window() for i = 0L, 2 do begin ; open image from file name array read_jpeg, file_which(file_names[i]),img ; switch blue and green channel to zero img[1,*,*]=0 img[2,*,*]=0 ;display the image img_display=image(img, /current) ;wait 5 seconds wait,5 ;delete the image img_display.delete endfor
    You are not authorized to post a reply.