tarawa tutorial : Prepare your image (3)
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 6: understanding the image segmentation
Activity: image segmentation              
  • LINE_1: experiment with the stopLand option in the -/AutoCal/... argument
  • LINE_1: experiment with the offsetLand and slopeLand
  • please, do experiment: it's worth it!

MakeLand: see Syntax AutoCAL
a certain straight line
  • 4SM has an AutoCAL module to segment
    • all land areas into mSE=248
    • all marine areas to mSE=2
  • Specific marine areas specified by relevant shapefiles are recoded to the mask_NewVal value,
    • like : to map at mSE=3 all marine pixels which are located inside mask_3.shp
  • How does that work: below is an illustration in a bi-dimensional histogram of Lsred vs Lsnir
    • Land........below (or right of)              a certain straight line
    • Marine.....above .(or left  of)              a certain straight line
  • Intercept and slope of this straight line are specified in the -AutoCal/... argument
    • on a plot of Red band vs NIR band
    • intercept=-5 often work well: try other values
    • slope=1.18   often work well: try other values
  • Marine pixels are on the Red side of that line
  • Land    pixels are on the NIR side of that line
  • S stopLand=1: causes the process to stop,
    • so that you can examine the mask mSE in OpenEV, see if you are satisfied
  • s  stopLand=0
  • try other values, like
    • offsetLand=5
    • slopeLand=1.5
    • see what happens
  • try other values, like
    • offsetLand=5
    • slopeLand=1.5
    • see what happens
tarawa-subset_stopLand_bad      tarawa-subset_stopLand_good
-AutoCAL/Land_5_1.5_3S/.....                                  -AutoCAL/Land_-5_1.18_3S/.....

View mSE mask in channel_4 as created by the AutoCAL process
  • Brown..........for land areas
  • Blue.............for marine areas masked at 2
  • Orange.........for marine areas masked at 3
  • Red...............for marine areas masked at 4
  • Yellow............for mSOIL

step 7: things you can do

  • Nothing you should do here, as quite often 4SM shall yield a fairly good estimate.
  • Only, if you wish: YES you can.
#LINE_1: build the database, import data, create mask, perform AutoCalibration
The first command line shall get the infos it needs from the image itself.
    • it implements -MakePIX, -Import/…, and -AutoCal/… ,
    • it uses the shapefiles that have been prepared by the practioner
      • or are provided in a tutorial.
  • But, the practioner may provide any of them in the command line,
    • if he chooses so,
    • or if  the AutoCal process does not deliver.
  • The purpose is to obtain a complete command line,
    • specified for the image under study.
In the absence of LsM.shp shapefile, then
  • a -LsM... argument must be provided in the command line for the AutoCAL process
    • use a -DN... argument to get an estimate of -LsM...
    • -DN430/388/5/beach     or -DNshp
  • run the script, 
  • search your screen display,  
  • make a note of the proposed averaged spectrum which was obtained under a circular window with a maximum of 81 pixels: 8U Ls   430  388 /199.0/181.0/165.0
  • copy it and insert it in your AutoCal script,
    • -LsM/199.0/181.0/165.0
    • so that 4SM shall use it, as the LsM.shp shapefile is not available.
In the absence of Lsw.shp or glint.shp shapefiles, then
  • a -Lsw... argument must be provided in the command line for the AutoCAL process
    • use a -DN... argument to get an estimte of -Lsw...
    • -DN185/550/5Lsw    or -DNshp
  • a -Lw.... argument must also be provided in the command line for the AutoCAL process
    • ?Lwred and Lwnir are set to 0 (zero)
    • Lwgreen may be set to 1.5 for now
Vegetation.shp is most usefull when using blue band(s)
Optically deep waters : deep.shp
  •   The AutoCAL process can map optically deep waters to 240 in channel_mSE,
    • for this, we need to specify a deep.shp shapefile to that effect.
  • Alternatively, we can do that later
  • But the open sea is heavily glinted: ours is a difficult task. Here is what we can do :
    • get the deglint correlation parameters
    • deglint the image
    • display channel_22 in OpenEV: BOA radiances less than 6 are optically deep
    • recode to 240 all pixels that are less than 6 channel 22 :  deglinted green band in channel 22
    • ultimately recode some pixels that resisted this process 
  • More on this at Step 4

In an operational situation, you would
 1 - copy an existing command line into your new script tarawa-subset.sh
nice -20 4SM.4.08 -Process -Origin/Arcachon_France
2 - then update it with the specifics of your new image: you just have to change it into
nice -20  ./4SM.8.07 -Process/nosu  -Origin/Tarawa_Kiribati                           
Once you are acquainted with the use of the commandline, 
  • your are advised to proceed that way.
Until then,
  • you can use the script provided and in case of emergency, copy the relevant commandline from this tutorial into your script.

Take control of the -AutoCAL... process
  • -makePIX.....may be disabled once the data have been imported and you need to improve th mask mSE
  • -import.........may be disabled once the data have been imported and you need to improve th mask mSE
  • -extract.........may be specified if you want to impose your conditions
  • -deglint.........may be specified if you want to impose your conditions
  • -Lsw.............may be specified if Lsw.shp shapefile is not to be used or trusted
  • -LsM............may be specified if LsM.shp shapefile is not to be used or trusted
  • -LS...............may be specified, although a vlue of LS=25 is assigned by default for all bands
  • -AutoCAL... argument has quite a number of parameters Help_AutoCal
    • all parameters are optional, as they have been given a default value in 4sm.def textfile
  • .../P(p)rint_2_3..........0 That's for me to display details of the clumsy KIKRegressor
  • .../M(m)apBPL...............1 That's to map the BPL pixel for pairs of channels
  • .../mBL3 or mBPL_3....2 That's for the extraction of calibration data
  • .../M(m)akeNewMask..1 Usefull if you're satisfiedd of your mask on a big imag
  • .../G(g)etGlint................1 to force a new extraction of glint parameters
  • .../G(g)lintM_25.........25
  • .../C(c)louds..............0 Mapping cloud pixels is not that good at time
  • .../L(l)and_offsetLsw...-
  • .../L(l)and.....slope....1.18
  • Because you are using the FILE interleaving:
    • later during the course of your project, you may want/need to erase any channel
    • as 4SM shall re-create any missing channel at first opportunity as blank channel
      • before proceeding with the script
  • You may want to secure a backup copy of the spacial effect mask mSE though
    • things happen

   back to Tarawa tutorial                 next to Deglint and Investigate your image

Créer un site
Créer un site