Take me to pcigeomatics.com

PCI Geomatics Help Center

How can we help you today?

SPOT_AUTOIMG

PCI Geomatics -

!----------------------------------------------------------------------------------! 
!----------------------------------------------------------------------------------!
!                                                                                  !
!        Automated SPOT Ortho-Mosaic WorkFlow [SPOT_AUTOIMG.eas]                   !
!                                                                                  !
!  This script is an automatic workflow used to process several Satellite          !
!  images into one mosaicked image and was demonstrated during a recent PCI        !
!  Webinar. It will generate orthorectified images using an existing geocoded      !
!  image with the AUTOIMG program and then mosaic them together into one           !
!  color balanced output image.                                                    !
!                                                                                  !
!  Inputs for this model are SPOT satellite images with orbital data, a            !
!  digital elevation model and an existing geocoded image for the area             !
!  [Note: the Geocoded image does not need to be from the same sensor, and         !
!  in this demo the blue band of a multispectral image was used]. All data         !
!  came from the Geomatica demo data and the script should also work with          !
!  other similair data sets.                                                       !
!                                                                                  !
!  This script is the EASI equivalent of SPOT_AUTOIMG.mod                          !
!                                                                                  !
!----------------------------------------------------------------------------------! 
!----------------------------------------------------------------------------------! 

!--------------------------------------------------------------------------------- 
! Variables
!--------------------------------------------------------------------------------- 
  local string imagefile, mosaicfile , in_files, out_files
  local string geocoded, dem, refimage, temp_dir, proj
  local mstring dirlist
  local integer i, px, py  
  local $Z
  
!--------------------------------------------------------------------------------- 
! Define location of files and directories necessary for this script
! This is set up this way so that the details can be easily changed to 
! use other images with
!--------------------------------------------------------------------------------- 

in_files = "C:\Program Files\Geomatica_V100\user\input_images"
out_files = "C:\Program Files\Geomatica_V100\user\output_images"
geocoded = "C:\Program Files\Geomatica_V100\Demo\l7_ms.pix"
dem = "C:\Program Files\Geomatica_V100\user\SPOTDEM.PIX"
mosaicfile = "C:\Program Files\Geomatica_V100\user\output_images\SPOTmosaic.pix"
refimage = "C:\Program Files\Geomatica_V100\user\input_images\SPOTLEFT.PIX"
temp_dir = "C:\Program Files\Geomatica_V100\user"
proj = "UTM 11 E000"
px = 10
py = 10

!--------------------------------------------------------------------------------- 
! Clear the EASI window & get the contents of the directory
!--------------------------------------------------------------------------------- 
   
  PRINT @(1 ,1,CLREOS)

  dirlist = getdirectory(in_files)
  let $Z = "\

!--------------------------------------------------------------------------------- 
! Set up the parameters and execute the commands, then continue again until
! all of the input files in the directory have been processed
!--------------------------------------------------------------------------------- 

for i = 1 to f$len(dirlist)
   imagefile = in_files + $Z + dirlist[i]
	
   FILE = imagefile
   MMSEG =
   ORBIT = 2
   DBIC =
   DBIB =
   DBGC =
   GEOFILE = geocoded
   DBCC =
   BACKVAL =
   FILEDEM =
   DBEC =
   NUMGCPS = 40
   MATSCORE =
   SRCHRAD =
   CLOUDTHR =
   REPORT =
   VERVAL =

   run AUTOIMG

   FILE = imagefile
   DBGC = 3
   MMSEG =
   ORBIT = 2
   MODELTYP = "SRIT"
   ORDER =
   REJECT = 4, 1, 1
   REPORT =

   run GCPREFN

   MFILE  = imagefile
   DBGC =
   ORBIT = 2
   MMSEG =
   MAPUNITS = 
   REPORT = 

   run SATMODEL

   MFILE  = imagefile
   DBICLIST = 
   MMSEG  =
   DBIW  =
   FILO  = 
   OUTDIR = out_files
   DBOCLIST =
   FTYPE  =
   FOPTIONS =
   UPLEFT  =
   LORIGHT =
   MAPUNITS = proj
   PXSZOUT = px, py
   FILEDEM = dem
   DBEC = 1
   BACKELEV = -150
   ELEVREF =
   ELEVUNIT =
   ELFACTOR =
   SAMPLING = 4
   RESAMPLE ="NEAR"
   FLSZ =
   SIGMSQ =
   FLTFIL =
   NLOOK =
   IMAGEFMT =
   EDGECLIP =
   MEMSIZE = 512
   REPORT =
 	
   run ORTHO
 
endfor

!--------------------------------------------------------------------------------- 
! Set up the parameters and execute the Auto Mosaic command using the 
! processed ortho images that were produced with the commands above
!--------------------------------------------------------------------------------- 

   MFILE = out_files
   DBICLIST =
   FILO    = mosaicfile
   TILES   =
   TFILE   =
   FTYPE   =
   FOPTIONS =
   DBLUTI  =
   DBLUTO  =
   FILVIN  =
   DBIV    =
   FILVOUT =
   DBOV    =
   CLRMOS  =
   GENERATE = "YES"
   PREVIEW =
   REFIMG1 = refimage
   HSPOT   =
   BALANCE = "ENTIRE"
   CUTMTHD = "MINDIFF"	
   BLEND   =
   BACKVAL =
   TEMPDIR = temp_dir

run AUTOMOS

  PRINT @(1 ,1,CLREOS)
  print "-------------------------------------------------------------------"

  print ""
  print " Your output files are stored in the following directory:"
  print "	", out_files	
  print ""
  print ""
  print @reverse,"                  SPOT_AUTOIMG.eas Script Finished              ",@alloff
  print ""
  print "-------------------------------------------------------------------"

return

! end of script

!---------------------------------------------------------------------------------! 
!---------------------------------------------------------------------------------!
Have more questions? Submit a request

Comments

Powered by Zendesk