Image classification tutorial with QGis: 2- Data pre-treatment and exploring

Pre-processing functions are operations that are typically required before performing the main analysis and retrieval of the information. Pre-processing operations are divided into radiometric corrections and geometric corrections. Radiometric corrections include, but are not limited to, data correction due to sensor irregularities, sensor or atmospheric noises, and data conversion so that they can accurately represent the reflected or emitted radiation measured by the sensor. Geometric corrections include correction for geometric distortions due to variations in the Earth-sensor geometry, and the transformation of data into true coordinates (for example, in latitude and longitude) on the Earth’s surface.

 The enhancement functions are intended to enhance the appearance of imagery to aid visual interpretation and analysis.The enhancement functions allow the stretching of contrasts to increase the distinction of tones among the different elements of a scene, and the spatial filtering to enhance (or eliminate) the specific spatial patterns on an image.

The image transformations are operations similar to those of image enhancement.However,while the enhancement of the image that is typically applied to, only,one data band at a time; the transformation of the image combines the processing of data from several spectral bands. Arithmetic operations (that is,addition, subtraction, multiplication, division) are performed to combine and transform the original bands into “new” images that show, more clearly,certain elements of the scene. We will examine some of these operations including various band ratio methods, also known as spectral ratios,and a process called main component analysis that is used to better represent information in multi spectral imaging.

Radiometric corrections

Radiometric corrections may be necessary due to variations in the illumination and in the geometry of a scene view, atmospheric conditions,noise, and sensor response.Each of these factors will vary depending on the sensor and platform used, as well as the data acquisition conditions. Also, it may be desirable to convert and calibrate the data with a known (absolute) radiation unit or reflection to facilitate comparison among the data.

Various atmospheric correction methods can be applied,ranging from very detailed models of atmospheric conditions during data acquisition, to a simple calculation based solely on the image data.

Which is the difference between radiance and reflectance?

Radiance is the variable directly measured by remote sensing instruments. Basically, you can think of radiance as the amount of light that the instrument observes from the observed object. As you look through the atmosphere, some of the light scattered by it will be seen by the instrument and included in the observed radiance of the target.The atmosphere will also absorb light, which will decrease the brightness.

Reflectance is the ratio of the amount of light leaving a target to the amount of light reaching the target. There are no units. If all the light leaving the target is intercepted by the reflectance measurement, the result is called ” hemispheric reflectance   “.

Reflectance(or more specifically, hemispheric reflectance)is a property of the observed material. Radiance,on the other hand, depends on the illumination (intensity and direction), the orientation and position of the target and the path of light through the atmosphere. With efforts, many atmospheric effects and solar lighting can be compensated for by the remote sensing data.The result is called an “apparent reflectance”and it differs from true reflectance because shadows and directional effects on reflectance have not been processed. Many people just talk about ”   reflectance  “.

For many applications, energy luminance, reflectance, and apparent reflectance can be used interchangeably. However,since reflectance is a property of the target material itself, you will obtain the most reliable (and consistent) vegetation index values by ​​using reflectance. Apparent reflectance can be adequate in many cases.

For a detailed description of atmospheric correction methods for Landsat 8 images,you can follow this link:

The question we regularly ask is: is it necessary to make an atmospheric correction for my project?

For example, one of the common applications of satellite imagery is the calculation of NDVI (normalized difference vegetation index).

NDVI =
(NIR – Red)/(NIR+Red)

Where,

NIR is the value of the near infrared band and Red is the value of the visible red band.

The NDVI values ​​are theoretically between -1 and +1, the negative values​​corresponding to surfaces other than plant covers, such as snow, water or clouds, for which the reflectance in the red is greater than that of the near infrared. For bare soils where the reflectance is of about the same order of magnitude in the red and the near infrared, the NDVI has values ​​close to 0.As for the flora formations, they show values ​​of NDVI positive, generally between0.1 and 0.7 – the highest values ​​for the densest canopies.

When you download a Landsat 8 image, the values ​​of these bands are given in radiance units.

Radiance is the physical quantity measured by the sensor.It is measured in Watts (W),and depends on the wavelength(nm), the surface of the target (pixel) (m2) and the angle of the measuring cone(sr: steradian). Therefore the unit is W /(nm,m2, sr).
Reflectance is the ratio of the target’s radiance to the radiance of an ideal target that reflects 100% of the incident light. Therefore it has no unit, or is given in percentage.
These two quantities can be measured / calculated both with (at the sensor) and without (at the surface level) the atmosphere.

Atmospheric correction provides reflectance data that (in theory) does not depend on atmospheric conditions. Thus,the atmospheric correction makes it possible to compare the spectral characteristics of a target over time or at different locations. For our classification example, in theory, we can, as well, perform the previous on the radiances data delivered by the supplier or on the reflectance data after atmospheric correction.In practice, most users prefer to work with reflectance data,but this is mostly a matter of habit. However,a good reason for using the reflectance data is the fact that spectral signature measurements be available in the field we wish to use them as references for the classification.

Inpractice Let’s give a look at a concrete example. In the article UsingLandsat Images in Your GIS  you will find how to download a Landsat 8 image from the Earth Explorer site.Download an image of an area at your convenience, taking care to choose the download of the complete image (Level-1 GeoTIFF Data Product option). Once unzipped you will have a directory containing a series of files:

Images whose name ends in B1 to B11 correspond to the eleven bands of the satellite.They contain radiance values. NDVI uses bands 4 (red) and 5(near infrared).

The data needed for the various corrections are included in the file whose name ends with MLT.

Mandatory pre-treatment for QGis

You can load and work on raw images uploaded with QGis.However, for some treatments, the format provided presents problems that will cause some tools to crash.

To avoid all these problems, it is advisable to change the format of downloaded images (bands).

1- Load the bands you will use in the QGis window

2- Open the Treatments
-> GDAL -> Raster Conversion -> Convert
tool

Change the value of the NODATA to 0. This is mandatory so that the black corners of the images are not taken into account in the treatments, as for example for the histograms.

Also change the output data type to Int16. Give the new raster a name and click Run .  

You will obtain the new image displayed.Delete the original raster. You will use the converted raster for all future operations with QGis.

NDVI calculation example

For the calculation of the NDVI, a TOA (Top-of-Atmosphere)
correction in reflectance is generally used .

To convert the data of a band (radiances) into TOA reflectances one uses the following method:

pA ‘= Mp * Qcal + Ap

Where,

pA ‘ = TOA reflectance, uncorrected for solar angle of incidence;

Mp = Band-specific multiplicative scaling factor from metadata: REFLECTANCE_MULT_BAND_x,   where X is the band number.

Ap = The tape-specific additive resizing factor from metadata: REFLECTANCE_ADD_BAND_x, where X is the tape number.

Qcal = value supplied in the X band of the pixel.

 To obtain a correction of the reflectance as a function of the solar angle of incidence, the following formula is used:

pA = pA ‘/ sin (theta_se)

Where pA is the corrected TOA reflectance of solar incidence

theta_se = elevation angle of the sun at the center of the image, provided in the metadata: SUN_ELEVATION.

Example of calculation with QGis Firstly, if we want, for example, to calculate the atmospheric correction of the red band (B4), we will need the two values ​​corresponding to this band: REFLECTANCE_MULT_BAND_4 andREFLECTANCE_ADD_BAND_4

and the value of SUN_ELEVATION for the final correction   

We load the band n ° 4 in QGis

Open the Raster Calculator (from the Treatment
Toolbox -> GDAL -> Miscellaneous Raster -> Raster Calculator
)

We enter the following calculation formula, which corresponds to the formulas described above with the values ​​obtained from the metadata file:

((0.00002 * A) -0.1) /0.42631886 Since the calculator uses radians for trigonometric functions, we calculated the sine of 25.23417171(0.426318) to simplify the formula.   

Once executed the order, we find a new image with reflectance values ​​instead of radiances.  

We repeat the operation for the band 5. Once the two bands corrected in TOA, one computes the NDVI with the raster calculator:assign A to band 5 (near IR),B to band 4 (red) and enter formula (AB) / (A + B)

Once applied a gradient of colors (from green to red while passing by the yellow), the result is the following:

Negative values, in the green, correspond to surfaces other than plant canopies, such as water or clouds, for which the reflectance in the red is higher than that in the near infrared. For bare floors, the reflectances being about the same order of magnitude in the red and the near infrared, the NDVI has values ​​close to 0, in yellow.The plant formations have positive NDVI values, in red tones,generally between 0.1 and 0.7 – the highest values ​​corresponding to the densest canopy.

Si cet article vous a intéressé et que vous pensez qu'il pourrait bénéficier à d'autres personnes, n'hésitez pas à le partager sur vos réseaux sociaux en utilisant les boutons ci-dessous. Votre partage est apprécié !

Leave a Reply

Your email address will not be published. Required fields are marked *