Correção atmosférica

From GRASS-Wiki
Revision as of 22:09, 20 October 2012 by ⚠️Samuel-rosa (talk | contribs)
Jump to navigation Jump to search

This page is in progress of translating to Português do Brasil from English.


Veja também a página wiki do LANDSAT.

Objetivo desse tutorial:

  • Transformção de um imagem Landsat ETM+ dos valores de nível de cinza (DN) para valores de radiância
  • Realizar a correção atmosférica de uma imagem Landsat utilizando o módulo i.atcorr no GRASS GIS

Introdução

Os principais passos para o processamento de imagens de satélite são:

  1. Converter o valor de nível de cinza (DN - digital number = valor do pixel) para Radiância no topo da atmosfera (TOA) (veja a fórmula abaixo ou use i.landsat.toar). i.landsat.toar suporta todas as versões do Landsat, desde MSS, até TM e ETM+.
  2. Execute a correção atmosférica (a qual converte a Radiância no TOA -> Reflectância na superfície): realizado através de i.atcorr.

Note: Remember, to check if water areas are > 0, since reflectance is always positive. If negative, you have a "cornichon" (pickle in English ;-0). Means the transform equation inputs are not belong to image processed.

Requerimentos

Depois de baixar a amostra de dados da Carolina do Norte, descompacte a mesma e leve-a para dentro do seu banco de dados ('GIS database'). Quando abrir o GRASS GIS, selecione o banco de dados ('GIS database'), abra o conjunto de dados ‘nc_spm_08’ como LOCATION, e ‘PERMANENT’ como MAPSET.

Cálculo dos valores de radiância

A amostra de dados da Carolina do Norte - EUA possui, entre outras coisas, uma imagem Landsat ETM+ do dia 24 de maio de 2002. Cada pixel dessa imagem contém um valor de nível de cinza ('DN - digital number'). Para que seja possível utilizar a imagem de satélite para a realização de cálculos, ou comparar valores entre diferentes sensores, esses valores de nível de cinza precisam ser convertidos para valores de radiância ou reflectância. As fórmulas usadas para fazer essa conversão estão descritas aqui para imagens Landsat (ou utilize i.landsat.toar). A conversão de valor de nível de cinza para radiância no topo da atmosfera é realizada da seguinte maneira:

Lλ = ((LMAXλ - LMINλ)/(QCALMAX-QCALMIN)) * (QCAL-QCALMIN) + LMINλ

Where:

  • Lλ - spectral Radiance at the sensor's aperture in watts/(meter squared * ster * μm), the apparent radiance as seen by the satellite sensor;
  • QCAL - the quantized calibrated pixel value in DN;
  • LMINλ - the spectral radiance that is scaled to QCALMIN in watts/(meter squared * ster * μm);
  • LMAXλ - the spectral radiance that is scaled to QCALMAX in watts/(meter squared * ster * μm);
  • QCALMIN - the minimum quantized calibrated pixel value (corresponding to LMINλ) in DN;
  • QCALMAX - the maximum quantized calibrated pixel value (corresponding to LMAXλ) in DN=255.

LMINλ and LMAXλ are the radiances related to the minimal and maximal DN value, and are reported in the metadata file for each image, or in the table 1. High gain or low gain is also reported in the metadata file of each Landsat image. The minimal DN value (QCALMIN) is 1 for Landsat ETM+ images (1), and the maximal DN value (QCALMAX) is 255. QCAL is the DN value for every separate pixel in the Landsat image.

Accessing the metadata:

r.info lsat7_2002_xx

Under ‘comments’, the maximal and minimal radiance (LMAX and LMIN) for each band are given.

Power users may use this for nicely readable output (example for channel 1):

CHAN=1
r.info lsat7_2002_${CHAN}0 -h | tr '\n' ' '  | sed 's+ ++g' | tr ':' '\n' | grep "LMIN_BAND${CHAN}\|LMAX_BAND${CHAN}"

Conversion to radiance (this calculation is done for band 1, for the other bands, the numbers in italics need to be replaced with their correct values):

g.region rast=lsat7_2002_10 -p
r.mapcalc "lsat7_2002_10_rad=((191.6 - (-6.2)) / (255.0 - 1.0)) * (lsat7_2002_10 - 1.0) + (-6.2)"

For faster computations, use an integer DEM:

 r.mapcalc "elev_int = round(elevation)"

Find mean elevation to initialize computations (needed in 'icnd' file below)

r.univar elev_int

Estimating the overpass time from the sun position

The satellite overpass time can be estimated rather precisely from the sun position reported in metadata using r.sunmask: The metadata of this example report: SUN_AZIMUTH = 120.8810347, SUN_ELEVATION = 64.7730999

# iteratively change hour and minutes to obtain a good result, timezone needs to be correct of course:
r.sunmask -s elev=elevation out=dummy year=2002 month=5 day=24 hour=10 min=42 sec=7 timezone=-5

Reports: sun azimuth: 121.342461, sun angle above horz.(refraction corrected): 65.396652

The resulting overpass local time 10:42:07 corresponds to 15:42 in GMT which corresponds to 15.67 in decimal GMT hours (decimal minutes: 42 * 100 / 60). This value is needed for the control file.

Atmospheric correction

This radiance image can be used for the atmospheric correction with the 6S algorithm. The algorithm will transform the top-of-the-atmosphere radiance values to top-of-canopy reflectance values using predefined information on the aerosol content and atmospheric composition of the time the image was taken. What follows describes the method to use this algorithm in GRASS GIS. Again, only the calculations for band 1 are shown, and the numbers to be changed for the other bands are indicated in red. The 'icnd_lsat1.txt' control file consists of the following parameters, and is written with a text editor:

8                          # indicates that it is an ETM+ image
05 24 15.67 -78.691 35.749 # image taken on the 24th of May, at 15:42 GMT in decimals; the center of the image lies at 78.691°W and 35.749°N 
2                          # the midlatitude summer atmospheric model
1                          # the continental aerosol model
50                         # the visibility for the aerosol model [km]
-0.110                     # the terrain lies 110 meters above sea level [km] * -1
-1000                      # image taken of a satellite sensor (1000)
61                         # spectral band, here 1: blue

TODO: understand if the MODIS Aerosol Product (MOD04) could be useful to estimate the visibility for the aerosol model.


This file is then used in the i.atcorr module:

i.atcorr -a -o iimg=lsat7_2002_10_rad ialt=elev_int icnd=icdn_lsat1.txt oimg=lsat7_2002_10_atcorr

Where:

  • -a refers to a Landsat image taken after July 2000
  • -o activates the cache acceleration
  • iimg is the image to be corrected
  • ialt is the altitude map which overrides the initialization value of 110 meters
  • icnd is the path to the icnd.txt file
  • oimg is the name of the output image

More information on the use of i.atcorr for other images can be found in the i.atcorr manual.

References

How to add new sensors to i.atcorr: