Relative calibration exercise with raw (DN) images

From Open Foris Wiki

Jump to: navigation, search

Here is an exercise on doing relative calibration using the oft-gapfill tool with raw (DN) imagery. You can download data for teis exercise from File:Data RC.

Goals: *Create a mask using your own shapefile, practising the generic tool gdal_rasterize [1] and tool oft-calc *Practise use of tool oft-gapfill to compute linear models between image bands of the two images, input and reference

In this exercise we assume that:

  • The images are ready-made composites and have exactly the same number of rows and columns
  • The images and the shapefile are in the same projection
  • There are no clouds or cloud shadows or missing lines (L7) in the target area
  • You know how to create a shapefile in Qgis and digitize polygons

To go through this exercise, please follow the following steps:

  1. Take 2 Landsat images from same path/row from different dates (may be different years).
  2. Create a 14-band stack of your images with oft-stack:
     oft-stack 14bandimage.img reference.img input.img 
    Note that oft-stack assumes that the images are exactly of the same size. You can also extract bands and then use gdal_merge.py as in the Gap filling exercise with raw (DN) images!
  3. The calibration is based on visually selected undisturbed areas, i.e. areas that have not changed between the image dates. Manually digitize a set of these areas into a new shapefile. Give value 2 for the polygons.
  4. Create a mask for your image pair:
    • Create an empty image of the filler image with value 3, to burn your shapes on: oft-calc -ot Byte input.img mask.img
      1
      #1 40000 ! 0 3 ?
    • Burn your shapes into the empty image:
      gdal_rasterize -a unchanged_fieldname -l shapefile shapefile.shp mask.img 
  5. Use program oft-gapfill to calibrate the values in the input image to values in the reference image:
     oft-gapfill -la 1 -nolocal -sd 5 -da -um mask.img 14bandimage.img calibrated.img 



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools