MODIS Image harmonization exercise (BRDF correction) with raw (DN) images

From Open Foris Wiki

Jump to: navigation, search

Here is an exercise on the BRDF process employing raw imagery

Goals:

  1. Practise use of the generic image reprojection and warping utility gdalwarp and tool oft-calc
  2. Practise use of tool oft-gapfill to run the BRDF-correction on a Landsat image with a Modis image

In this exercise we assume that:

  • The Landsat to be BRDF corrected is a ready-made composite
  • You have a Modis HFD image (MCD43A4) covering the same area
  • There are no clouds etc. on either of the images

FYI, the Modis bands correspond with the LS ones as follows:

Modis bandwidths Corresponding LS

  • B1: 620 - 670 B3: 630 - 690
  • B2: 841 - 876 B4: 760 - 900
  • B3: 459 - 479 B1: 450 - 520
  • B4: 545 - 565 B2: 50 - 600
  • B5: 1230 - 1250 None
  • B6: 1628 - 1652 B5: 1550 - 1750
  • B7: 2105 - 2155 B7: 2080 - 2350

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

1. Find out the extent and projection (EPSG code) of the Landsat image with gdalinfo [[1]]
 gdalinfo 169066.img 

2. Find out the naming of the Modis HDF bands with gdalinfo. They are of type

HDF4_EOS:EOS_GRID:"MCD43A4.A2009185.h21v09.005.2009212085141.hdf":MOD_Grid_BRDF:Nadir_Reflectance_Band1 
gdalinfo MCD43A4.A2009185.h21v09.005.2009212085141.hdf 

3.Translate Modis hdf into Erdas imagine, re-project into LS projection and clip & resample to same dimensions. Change the EPSG code (XXXX) into your own, as well as the Modis band name and xmin...ymax

gdalwarp -t_srs EPSG:XXXX -te xmin ymin xmax ymax -tr 30 30 -of HFA modis_band1_name modis_b1.img 

Repeat for all bands except band 5 (no matching band in Landsat). Here is an example of the whole command>

gdalwarp -t_srs EPSG:32636 -te 525195.000 -900075.000 546405.000 -886485.000 -tr 30 30 -of HFA HDF4_EOS:EOS_GRID:"MCD43A4.A2009185.h21v09.005.2009212085141.hdf":MOD_Grid_BRDF:Nadir_Reflectance_Band3 modis_b3.img 

4. Create a stack of the modis bands, change the order to correspond with Landsat:

gdal_merge.py -separate -o modis_stack.img modis_b3.img modis_b4.img modis_b1.img modis_b2.img modis_b6.img modis_b7.img

5. Stack these two images together with oft-stack:

oft-stack mo_ls.img modis_stack.img 169066.img

6. Now, make a mask where both Landsat and Modis images have a large NDVI value. We thus assume that areas with high vegetation cover are relatively unchanged. NDVI is computed (NIR-R)/(NIR+R)

  • Compute NDVI's bor both images. Multiply the values by 100 to get rid of decimal values (to save space if you use whole landsat images)
oft-calc -ot Int16 mo_ls.img ndvi_mo_ls.img
2
#4 100 * #3 100 * - #3 #4 + /
#10 100 * #9 100 * - #9 #10 + /

Alternative way

  • Find values where both NDVI images have values over a threshold, e.g. 0.2. NOTE: check the output mask and decide if you need to use a higher NDVI threshold! In the next equation, use e.g. 40 or 50 (0.40 and 0.50 in real life) instead of 20 (0.2)
oft-calc -ot Byte ndvi_mo_ls.img mask.img
1
#1 20 > #2 20 > * 1 +

1. Use program oft-gapfill to perform the brdf correction:

oft-gapfill -la 1 -nolocal -pm -da -sd 4 -smooth -um mask.img mo_ls.img brdf_out.img 

2. Repeat the same process to a neighbouring image 170066.img. You can use same modis stack, because in this exercise the landsats have been clipped from an overlapping area and are of the same size and coordinate system.

3. Evaluate the outputs visually in QGIS



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools