X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 May 2009 10:16 PM by  anon
ENVI batch model problem
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
13 May 2009 10:16 PM
    Hi all, Because the large amount of image data, I have to use the batch model of ENVI. My aim is to registrate the images in the batch model. Coordinate info of each image is in the .pts file using the same file name as the images. The projection is set up using the parameters, and the image dat files contain only the grey values. The IDL programme can be compiled successfully, so does the Running Process, but the out file titled with "test" contains nothing. The batch.txt file shows as following: ENVI Error [Thu May 14 09:04:10 2009] envi_register_doit: An error has occurred during processing Error: "Array dimensions must be greater than 0." The result may be invalid. The IDL code is below, and the version of IDL is 6.4.1: forward_function envi_translate_projection_units, $   envi_proj_create pro example_envi_register_doit   ;   ; First restore all the base save files.   ;   envi, /restore_base_save_files   ;   ; Initialize ENVI and send all errors   ; and warnings to the file batch.txt   ;   envi_batch_init, log_file='batch.txt'   ;   ; Open the input file   ;   envi_open_file, ‘image.dat', r_fid=fid   if (fid eq -1) then begin     envi_batch_exit     return   endif   ;   ; Set the DIMS and POS to keywords   ; to processes all spatial and all   ; spectral data. Output the result   ; to disk.   ;   envi_file_query, fid, ns=ns, nl=nl, nb=nb   dims = [-1, 0, ns-1, 0, nl-1]   pos  = lindgen(nb)   out_name = 'test'   ;   ; Setup the points file with the map   ; coordinates for know pixel locations and   ; create projection for the map coordinates.   ; Set the output pixel size to 30 meters.   ;   openr,lun,’image.pts',/get_lun pts=DblArr(4,nl*2) readf,lun,pts free_lun,lun   ;   ; Create the projection of the map coordinates   ; ; Define the PARAMS values ; Params =[1737400.0, 1737400.0, -90.000000, 0.000000, 0.0, 0.0] ; ; Define the Datum and projection name datum = 'Moon' name = 'Moon South Polar Stereographic' ; ; Create the projection ; units = envi_translate_projection_units('Meters') proj = envi_proj_create(type=31, $   name=name, datum=datum, params=params) pixel_size = [120., 120.]     ;   ; Perform the image-to-map registration.   envi_doit, 'envi_register_doit', $     w_fid=fid, w_pos=pos, w_dims=dims, $     method=6, out_name=out_name, $     pts=pts, pixel_size=pixel_size, $     proj=proj, r_fid=r_fid   ;   ; Exit ENVI   ;   envi_batch_exit end regards,

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Jun 2009 06:46 PM
    no one knows?
    You are not authorized to post a reply.