A short presentation of 4SM
intended for the blog at HySpeedComputing.com
December 23rd 2013


1 - NO NEED for field data, nor for atmospheric correction
2 - this is demonstrated in this website, using a variety of hyper/multi spectral data
Requirements are
1 - homogeneous water body and atmosphere
2 - some coverage of optically deep water
3 - some coverage of dry land
Problems are
1 - the precision on estimated depth is found wanting, because the noise-equivalent change in radiance  of accessible data is too high for shallow water column correction work 
2 - radiance data should be preprocessed by the provider at level 1 in order to improve S/N ratio
3 - exponential decay: the deeper/darker the bottom, the poorer the performances
I keep digging
until suitable data
become available

A practical shallow water modeling process for the lay practioner

Retrieving water depth, and correcting for confounding effects of water column on spectral radiances over shallow bottoms has been a much wanted progress since the advent of earth observation from space.
Two main approaches have been proposed over the last fourty years
  • Both consider atmospheric correction as desirable or necessary;
  • Empirical: most require existing field data for operating a very simplified radiative transfer equation (RTE) through band ratios. Field data are used to specify multi-linear regression coefficients in a very simple formula which uses spectral bands to compute depth in meters; this is a way to make an assumption on the bottom substrate spectral properties at null depth. They are used to map either the water depth or depth-invariant water column corrected pair-wise reflectance indexes for the purpose of shallow bottom typing. They all assume homogeneous atmosphere and water body, and clear waters. They are used for various purposes by a great number of practioners, most of them isolated, and even by NOAA, IHO-IOC GEBCO Cook Book, and US Naval Postgraduate School.
  • Semi-analytical: some require the specification of a long list of atmospheric and water optical parameters, along with full set of image metadata
It is quite clear though that most users will want to retain control on the process, subject to their specific needs, and time/cost contraints.

The proposed 4SM: Self-calibrated Supervised Spectral Shallow-water Modeler
alleviates some of the limitations of the band ratio approaches, so that a lay practioner can process his/her multi/hyper-spectral air/space-borne imagery in record time at low cost, without the need for any field data.
  • Digital numbers: 4SM reads the raw radiances of the original data in units of DNs: in a ratio method, radiances do not need to be calibrated in physical units.
  • Deep water radiance: 4SM uses a deep water area of the image to estimate the spectral TOA deep water radiance Lsw.
  • Glint: 4SM uses a deep water area to estimate glint regressions. Deglinting uses a NIR or SWIR band to estimate and remove the glint component of the raw TOA radiance in all bands. Whatever remaining amount of glint shall be incorporated in the atmospheric path radiance La.
  • Brightest Pixels Line: 4SM extracts the brightest shallow pixels in band i for the whole range of radiances in band j, for all pairs of bands i and j. After linearization, these pixels plot in an approximately straight line in a bi-dimensional plot (a variant of Lyzenga's proposition). The slope of this straight line measures the ratio Kdi/Kdj of operational diffuse attenuations coefficients Kdi and Kdj.
  • Water type: as pointed out by Jerlov, and then Kirk, the ratio Ki/Kj for one pair of bands, at wavelengths WLi and WLj, may be used to interpolate the diffuse attenuation coefficient Kd in m-1 for all visible bands. Therefore, depths retrieved by 4SM shall only need to be multiplied by a (often negligeable) depth correcting factor to be derived at first opportunity from existing field data.
  • Soil Line: 4SM uses some bare land in the image to specify the spectral Soil Line for all pairs of bands: this is an extension of the way NDVI is measured. The Soil Line represents a model of the spectral signature of non-contrasted substrates at null depth, from bright to dark.
  • Water volume reflectance: the slope of the Soil Line allows for the estimation of the spectral water volume reflectance Lw, and therefore of the atmospheric path radiance: La=Lsw-Lw
After a few days/hours of work, the working database is prepared, and the 4SM command line script specifies all parameters that are necessary to operate the inverse simplified RTE : LB=Lw+(Ls-Lw)*exp(2K*Z).
  • for each shallow pixel: Z is increased until the water column corrected bottom substrate signature LB reaches an acceptable fit with the Soil Line (a form of optimization).
  • this yields both the estimated depth of the shallow bottom, and its BOA water column corrected signature LB in units of DNs.
  • this is done through the deglinting process, and also through an edge-preserving smoothing scheme.
  • processing the whole 17 bands CASI dataset of Heron Island only takes 110 minutes on a X86 laptop running Linux.
The water column corrected image is now suitable for bottom type classification. Together with the bathymetric map, these results shall be quite usefull for planning field work.

Recent developments in 2013
4SM now routinely adds the Panchromatic band to the standard multispectral bands of Landsat 8 and WorldView 2 images. Therefore, four bands are available instead of three to compute a four bands water column corrected bottom signature in the ~8-20 m depth range. This means that bottom typing now can be achieved in a homogeneous way for the whole 0-20 m depth range in clear waters: see an example at http://www.watercolumncorrection.com/web-sharkbay-olip.php.
4SM now uses Landsat 8 metadata to convert TOA radiances into BOA calibrated reflectances in the range of 0-1. This shall become handy for time series monitoring of bottom substrates.

4SM status
All this is presented in a website: http://www.watercolumncorrection.com
4SM tutorials use small image subsets to take you up the learning curve, step by step, on your own Linux box, for free. More tutorials should be developped.
4SM should now be ported as a new tool under ENVI.
4SM relies on GMT from University of Hawaii for preparing PostScript displays , and on OpenEV for image display and manipulation, on a 32 bits X86 machine or a 64 bits AMD64 machine running Ubuntu Linux. It is compiled by gcc, and controlled through a bash formated command line. Here is a detailed flowchart of the operational process.
0 - Raw image data=============================
    * may be formated in a variety of formats
    * 4SM uses PCIDSK format for its working database.pix
    * TIF    format is OK, but must first be exported to PCIDSK
    * OpenEV uses GDAL for handling very many image formats
1 - Seatruth data==================================
    * DTM: best is a gridded digital terrain model overlay, co-registered
    * XYZ: depth sounding profiles as ASCII text file are also OK
2 - Georeferencing==================================
    * UTM please
3 - Metadata==================================
    * for OLI data, textfile L8..._MTL.txt must be available
    * for WV2 data, textfile ..........IMD must be available
4 - I use OpenEV to export raw data to PCIDSK image format
    * specify a subwindow   if required
    * resample the PAN band as required
5 - Format the command line as required
    * use an existing command line
    * update/modify as required
    * pay special attention to georeferencing details and byte_swap
6 - Run -MakePIX===================================
    * to write database header
    * to write database.pix structure, FILE interleaving
    * and stop
7 - Run -Import...=================================
    * to import raw 16U data into database
    * and stop
8 - Run -Prepare_Scale==============================
    * to write 8 bits scaled from 16 bits raw data
    * and stop
9 - Display 8 bits scaled image in OpenEV
    * beware of byte_swap
    * investigate using various enhancement schemes
    * get a feeling of the image radiometric quality
    * get a feeling of illumination conditions
    * get a feeling of atmospheric conditions
    * get a feeling of homogeneity of water bodies
    * look for negative bottom areas
    * which areas of this image are worthy of shallow water work?
10 - Prepare shapefiles: Lsw.shp======================
    * Lsw should be as low as possible: deep water radiance
    * cloud shadows or the area with lowest radiance in the NIR/SWIR band
11 - Prepare shapefiles: glint.shp====================
    * must absolutely sample optically deep areas in the blue/green range
    * to the extent possible, glint.shp should avoid clouds and whitecaps
    * polygons and polylines may be mixed
12 - Prepare shapefiles: LsM.shp=====================
    * LsM.shp should sample bright genuine bare dryland
    * LsM is one point to represent maximum brightness of shallow bottoms
    * either with Points or Polygons/Polylines.   Beware of wetlands
13 - Prepare shapefiles: mSOIL.shp====================
    * mSOIL.shp may include less bright dryland.  Beware of wetlands
    * mSOIL shall give a sense of the Soil Line through a scatter of select pixels
    * either with Points or Polygons/Polylines.   Beware of wetlands
14 - Prepare  mask_1.shp shapefile==================
    * these unsafe marine areas shall be skipped while selecting calibration data
    * like polluted areas, wave breakers, marinas, ships, alien floating things, etc
15 - Prepare    land.shp shapefile==================
    * these areas shall be forced to land
16 - Prepare shallow.shp shapefile==================
    * these areas shall be forced to marine
17 - Run AutoCalibrator: does the following:========
    * reads  raw radiances from 16 bits raw data channels in database.pix
    * scales raw radiances from 16 bits range to 8 bits range
    * scans the image for nodata pixels
    * extracts and format the glint_regressions.gli textfile
    * formats glint_regressions.sh script
    * Lsw: computes provisional Lsw deep water radiance
    * Lw : computes provisional Lw water volume reflectance
    * La : computes provisional La path radiance
    * prepares the special effect mask
    * BPL and DPL: extracts the calibration data for BPL and DPL
    * BDH:         extracts the calibration data for bidimensional histograms
    * runs the AutoCalibrator
    * displays the provisional AutoCalibration diagram
    * formats and displays the 4SM image-specific command line
    * and stops
    * this provisional calibration diagram may now be inspected
18 - Are you satisfied with the mask mSE===========
    * if not, see what needs to be modified, and start again
19 - Run glint_regressions.sh=======================
    * this displays the various glint regressions, pair wise
    * investigate the glint regressions
    * if not satisfied, modify the glint.shp shapefile and start again
20 - Display the glint text file==========================
    * investigate the glint_regressions_text_file.gli
21 - Run ABProfiler=================================
    * in order to investigate deglinting performance, and Lsw and Lw
    * -ProfileAB/LVW/profile_red/chAB_6_7
    * see whether dLsw should be specified to adjust Lsw
    * adjust as required, until satisfied
    * ensure Lw is consistent with the physics of underwater  light field
    * ensure La is consistent with the physics of atmospheric light field
22 - Deglint the image==============================
    * -Deglint/vRbad/q/GlintM20.0
    * and adjust as required until satisfied
23 - Run Extractor=================
    * if mot satisfied with provisional calibration dataset
    * specify your conditions for BPL: deglinted or not
    * specify your conditions for BPL: mask mSE condition
    * specify your conditions for BPL: NIRmax threshold
    * specify your conditions for BDH: deglinted or not
    * specify your conditions for BDH: whole image or marine only
    * specify your conditions for extraction: whole image or select window
    * -Extract/v/rawBDH/fullBDH/NIRband7/NIRmax5/mBPL2/mask_3
24 - Run Calibrator=================
    * then only, engage in the calibration process
    * -Calibrate/V/BDSNpzg/plot_BPL/BC_6_5_3_2/BDh_12_13_34
    * establish/adjust LsM
    * establish Ki/Kj for all pairs, as precisely as possible
    * estimate Lw for all bands: very sensitive for dark botoms
    * consolidate your choices for LsM, Lsw and Lw
25 - Run Modeler
    * then only you may start modeling
    * deglinting range may be tuned
    * smoothing parameters may be tuned
    * water column correction may be specified TOA or BOA
    * Bmin is specified in order to alleviate very dark bottommed artefacts
    * mask_deep may be used to mask out deep water areas
    * and various other operational tricks
26 - Run ABProfiler to investigate your results
    * -ProfileAB/ZrvwB/profile_blue/dTM/chAB_1_2_3
    * adjust command line as required
    * until satisfied
27 - Start again
    * until satisfied
Et voila!
    * you are now ready for bottom typing

CASI at Heron Island

Processing of the HYPHOON CASI dataset
was done on december 
 16-19 2013,
from downloading the data to final modeling,
uploading of the result zifiles, and reporting in this website.

In the seatruth plot below, "ground truth" depths are the results obtained
by the Biophysical Remote Sensing Group at the University of Queensland.
This is presented at 

See 4SM for geeks