tarawa tutorial : Prepare your image (2)
the AutoCAL process in 4SM now takes care of almost everything for you

to Tarawa tutorial       
to Prepare your image
to Deglint/investigate your image 
to Extract calibration data
to Calibrate under Mask=4
to Model      under Mask=4
to Calibrate  under Mask=3
to Model the whole lagoon

 
 
 
 
Prepare your image
step 1: prepare shapefiles
step 2: learn about PCIDSK database structure: create tarawa-subser.pix
step 3: the 4SM command line
step 4: the AutoCAL script
Compute glint regressions
Write the special effects mask in channel 4
Extract the calibration data text file
Perform an automatic calibration
Display a preliminary calibration diagram
Write the 4sm.def defaults file
Write and display the 4SM command line for the next step
step 6: about the segmentation of the image
step 7: things you can do
next to Deglint-and-Investigate-your-image




 step 3- learn about the 4SM command line
Activity
  • Get acquainted with 4SM Help services
  • Nothing to do for now; just keep learning
Access to HELP services
  • Please refer to access to HELP by 4SM
  • For now, you must be online. FireFox is your browser,
    • as Google Chrome 32 bits does not work any more
Tip
To access the  HELP service for any of the commandline arguments of your script
  • type a "*" after the root of the argument, like
    • "-Lsw*/0056.5/016.9/011.3/005.5"
      • this will cause 4SM to display the Syntax_Lw on your browser
    • "-RegressZZ*/v/negril85XYZmodified_GPS/........."
      • this will cause 4SM to display the Syntax_RegressZZ on your browser
 The Command Line script
HowTo Command Line
4SM Command Line Options
The 4SM command line for the tarawa-subset.pix image is a bash script in a text file in your directory named   tarawa-subset.sh  
  • Same name: the commandline script must have the same name as the image
    • tarawa-subset.pix   and   tarawa-subset.sh
  • Text editor:
    •  I use gedit in LINUX/GNOME as my text editor: "gedit     tarawa-subset.sh      &"
  • Enable one commandline: please ensure
    • that one command line at least is enabled as appropriate, like "nice -20 ./4SM -PROCES......"
    • and that  one module argument is enabled in that commandline, like -MakePIX or -Model...
    • and that all the arguments that are necessary for that particular module are available:
  • Please ensure that 4SM executable code is invoked as   ./4SM...   
    • in order to force the use of the local copy of the executable
  • Over time, script tarawa-subset.sh shall contain several command lines
    • DISABLE COMMAND LINES that are not wanted:
      • please ensure that they are disabled with a "#" character
      • like "#nice -20 ./4SM -PROCESS/15_DEC_20......"
 




 
step 4 - The AutoCAL script
Activity
  • Learn how to prepare your tarawa-subset.sh commandline text file
  • Nothing to do for now; just keep learning
Your script, your image, and your shapefiles are available:
  • Executable: ensure that your script is executable :    "chmod a+x tarawa-subset.sh"
Below we detail the tasks performed by this command line.
You expect 4SM to do the following automatically:
  • Create the database tarawa-subset.pix
  • Compute glint regressions and display glint regression plots
  • Write the special effects mask in channel 4
  • Extract the calibration data
  • Perform an automatic preliminary calibration
  • Display an AutoCalibration diagram
Flowchart of the MakePIX/Import/AutoCalibration process
4SM shall automatically
  • use the -DB...   -Mis...    -MakePIX    -Import...    arguments 
    • to create the georeferenced database structure
  • use shapefile import.shp to read  the raw data from channels 1 to 3 of data/tarawa-full.pix
    • inside the sub-window specified by the import.shp shapefile
  • import raw data (Green, Red and NIR bands) into channels 1 to 3 of tarawa-subset.pix
  • scan the raw data for NoData pixels
  • use the shapefile glint.shp  
  • use various shapefiles in the current directory, and the glint regressions, 
    • to specify LsM, Lsw, and Lw
  • sort out land from marine
  • extract the calibration data into 
    • textfile tarawa-subset_m0.bdh..........for bi-dimensional histograms
    • textfile tarawa-subset_m0.cal........for calibration data
  • attempt an automatic calibration
  • display the automatic calibration diagram
  • write and then display the textfile AutoCAL.txt
  • then stop
The -AutoCal/... argument
-AutoCAL/Land_-5_1.18_3s/mBPL4/GlintM10

exit      # exit is there to cause termination of the command line
Segmentation: Land vs Water
  • .../Land_-5.0_1.18_3s/............a straight line is defined 
    • with an intercept at NIR=La-5
    • with a slope=1.18*Soil_Line_Slope
  • stopLand: specify Land_-5.0_1.18_3S
    • enable stopLand to terminate the process after this segmentation
      • this makes it easy to modify intercept and slope until satisfied by the segmentation
    • disable stopLand when satisfied,  to let the AutoCal process to proceed.
  • Note the .../mBPL4/... item
  • the reason is that we want the extraction of marine calibration data
    • to be restricted to areas mapped at mSE=4 to mSE=20
    • i.e. we want pixels with mSE<=3 to be excluded
Selective deglinting
  • Note the specification of .../GlintM10 
    • this enables deglinting
    • and limits deglinting to pixels which exhibit NIR radiance in the range Lsw to Lsw+10




   

step 5 - Run the AutoCAL script
 
Activity
  • run your script
    • "tarawa-subset.sh"
  • watch your terminal
  • manage the various displays
  • when finished, launh Openev
    • "openev"
  • open Openev project textfile tarawa-subset.opf
    • observe the various displays
  • get acquainted with textfiles
    • tarawa-subset.opf
    • autoCal.txt
    • tarawa-subset.mcd
    • process.txt
    • calibration_AutoCAL.sh
    • tarawa-subset_m0_255.gli, glint_regression.sh (and the display of glint regressions)
    • tarawa-subset_m0.cal (and display of AutoCal calibration)
    • 4sm.def defaults textfile
Run LINE_1
 
Run the script and watch the show:
  • build the database,
  • import data,
  • create mask_SE in channel_4,
  • get glint regressions
  • extract calibration data
  • run the AutoCalibration
  • display (see below)
    • the glint regression diagrams,
    • the AutoCalibration diagram,
    • and various text files

 

the output of the AutoCAL process
  

  Mask shapefiles
over a backdrop
of false color composite
 
  • import.shp
  • Lsw.shp
  • dLsw.shp
  • LsM.shp
  • vegetation.shp
  • glint.shp
  • mask_3.shp
  • mask_4.shp
Special effect
mask mSE
in channel  4
brown ..is 248 for land
blue ......is 2, the default value for marine areas
orange ....is 3 from mask_3.shp
red ........is 4 from mask_4.shp
Glint regressions
++++++++++++++++++  
Calibration diagram
  • under the red mask : mPL=4
  • not perfect though: needs to be refined
  • not so bad though : saves a lot of time
 
Raw image
Map of BPL pixels
textfiles created so far
  • 4sm.def
  • gmtdefaults
  • process.txt
  • tarawa-subset.mcd
  • SHP.txt
  • tarawa-subset_m0_255.gli
  • AutoCAL.txt
  • tarawa-subset_m0.cal
  • tarawa-subset_m0.bdh
  • tarawa-subset.his
  • 4SM_procedure.txt
A simplified commandline is formatted by the AutoCAL process
AutoCAL.txt
  
  • this text file pops up automatically in gedit
  • MINIMIZED: at line 55, it provides a simplified/minimized script for the forthcoming calibration and modeling steps: this is very handy.
  • MAXIMIZED: at line 81, it provides a complete script that offers all existing specifications.
  • EXTENDED: at line 114, it provides the syntax of all other features for a reference
  • a textfile 4sm.def is also written in the current directory upon the first excution of the script
    • now that it is available in the current directory, it is read ahead of the commandline itself
    • then, any specification appearing in the commandline shall overwrite its equivalent in 4sm.def
    • this is intended to allow for a lighter commandline
  • this text file pops up automatically in gedit 

back               next to third calibration page
 

 



Créer un site
Créer un site