tarawa tutorial : Prepare your image (1)

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

 

  back   next

 
 
 
Prepare your image
step 1: prepare image and 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 1 - Prepare Image and Shapefiles
Activity in directory ./data.
Your script is ready.
Now you need to prepare your image.
You shall:
  • export from file.tif to PCIDSK file.pix
  • display PCIDSK file in Openev
  • draw various shapefiles
    • you don't need to do anything here
    • as all shapefiles are provided
    • (unless you want to try your own shapefiles)
       

LINE 1 prepapre your image
 
Your work directory content should look like this

 

Export from tarawa-full.tif to PCIDSK tarawa-full.pix

Raw data is stored in data/tarawa-full.tif
 
 Use OpenEV to
  1. export tarawa-full.tif into tarawa-full.pix in PCIDSK format
  2. use the tarawa-full.opf project to display a FCC of tarawa-full.pix 
  3. draw a rectangular polygon shapefile to specify your area of interest
  4. save it in your work directory as ../import.shp
    1. import.shp IS PROVIDED,
    2. BUT YOU CAN CHANGE IT!!
 


 
Now you draw several shapefiles inside your import area
and save them in the work directory, ready for use in the AutoCAL process.

you don't need to do anything here,
as all shapefiles are provided for you in this tutorial,
-unless/until you want to try your own shapefiles-

  

 
Red : mask_4
Orange : mask_3
LightBlue : glint
Red : Lsw and dLsw

Black : LsM
Black : mSOIL
Green : vegetation
White : import

Purple : profile_1

 

Relative path for shapefiles
Absolute paths in OpenEV projects are a pain!
  • RELATIVE: everytime you save an OpenEV project, OpenEV saves it with relative paths.
  • PURGE: everytime it runs, 4SM removes all absolute paths in all OpenEV project files in the current directory.
  • MANUALLY: you can force the relative path of a shapefile by editing it manually as shown in the image below:
    • edit from /FullPath/toto.shp    to    ../toto.shp
tarawa-subset_shapefiles_RelativePath
 
 






step 2 - Learn about PCIDSK database structure
Activity
  • get acquainted with working PCIDSK database.pix file structure
  • so that you'll know what 4SM does when creating the database
  • nothing to do for now: just keep learning
The PCIDSK file structure is specified in the -DB... commandline argument
  • -DB/tarawa-subset/27_1_0_0/3_1/650_600/718.079_169.221/1_1
    • U8=27 channels
    • S16=1 channel
    • U16=0 channel
    • R32=0 channel
    • bands=3
    • FirstChRaw = channel_1
    • nbRow=650
    • nbLin=600
    • X0UTM=718.079
    • Y0UTM=169.221
    • Georeferencing pixel: UL corner of UL pixel
      • this is the origin of the image
  • Below you get acquainted with the PCIDSK file structure for working database ./tarawa-subset.pix
Interleaving
  • any PCIDSK database.pix file can have one of three interleaving structures
    • file : you get one header file named database.pix and N channels named database.001 to database.00N
      • fast to access for read/write,
      • handy for replacing any channel by a blank one (except for raw data channels)
      • handy for archiving: just erase all channels, except the raw data channels, then compress
    • band: you get one BIG database.pix file, starting with the header, then with channel 1, then channel 2, etc, all the way to channel N
    • pixel: you get one database.pix file, starting with the header, then spectral pixel 1, then spectral pixel 2, all the way to last pixel : slowest to access for read/write
  • By default, 4SM uses the FILE interleaving
    • file   ./tarawa-subset.pix is the header: an ASCII text file
      • you can print it on your session screen:
        • "more tarawa-subset.pix"
        • "tail tarawa-subset.pix"
    • files tarawa-subset.001 to file tarawa-subset.028 are binary files
      • you can't print them on your session screen
      • "more tarawa-subset.001"
      • these are 650*600, U8, S16, U16 or R32
      • you can open any of them separately in OpenEV using File Open Raw
 Database structure:    
  • dbnc stands for "database number of channels" in PCI parlance
  • Header, contains metadata, list of channels with channel descriptors, georeferencing, pseudo-color tables
  • U8 channels:
    • Landsat TM raw data are stocked as channels 1 to 4
    • Ikonos U8-scaled raw data are stocked as channels 1 to 4
    • SPOT1 raw data U8 are stocked as channels 1 to 3
  • S16 channels: imageG in centimeters is stocked there
  • U16 channels:
    • Landsat 8, WorldView2, Ikonos 4 raw data channels are stocked there
  • R32 channels: 4SM usually does not use/need real 32bits channels
./data/tarawa-full.pix and  ./shapefiles.shp are now available.
  • In step 3, we shall create the working database ./data/tarawa-full.pix
  • Database structure is dbnc=27,1 ,0 ,0
FILE interleaving is most handy
  • FILE interleaving : this is the default; keep to it
Upon execution of 4SM
./tarawa_subset.mcd text  file
  • mcd stands for "modify channel description" in PCI parlance 
  • Upon creation of the database ./tarawa-subset.pix at step 3,
  • This file lists all channels and pseudocolor pallet descriptions (pct)
Learn about the special effect mask mSE
  • Upon creation of the database ./tarawa-subset.pix at step 3,

back to Tarawa tutorial               next to tarawa-subset-prepare-your-image-2
 
   



Créer un site
Créer un site