Image processing: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
 
(101 intermediate revisions by 9 users not shown)
Line 1: Line 1:
'''''This page needs review and enhancement from an expert! Thanks!'''''
== Introduction ==
 
For a general overview, see "Introduction: image processing in GRASS GIS" at {{cmd|imageryintro}}.
 
=== General introduction ===
 
'''Digital numbers and physical values (reflection/radiance-at-sensor):'''
 
Satellite imagery is commonly stored in Digital Numbers (DN) for minimizing the storage volume, i.e. the originally sampled analog physical value (color, temperature, etc) is stored a discrete representation in 8-16 bits. For example, Landsat data are stored in 8bit values (i.e., ranging from 0 to 255); other satellite data may be stored in 10 or 16 bits. Having data stored in DN, it implies that these data are not yet the observed ground reality. Such data are called "at-satellite", for example the amount of energy sensed by the sensor of the satellite platform is encoded in 8 or more bits. This energy is called radiance-at-sensor. To obtain physical values from DNs, satellite image providers use a linear transform equation <tt>(y = a * x + b)</tt> to encode the radiance-at-sensor in 8 to 16 bits. DNs can be turned back into physical values by applying the reverse formula <tt>(x = (y - b) / a)</tt>.
 
The GRASS GIS module {{cmd|i.landsat.toar}} easily transforms Landsat DN to radiance-at-sensor. The equivalent module for ASTER data is {{cmd|i.aster.toar}}. For other satellites, {{cmd|r.mapcalc}} can be employed.
 
'''Reflection/radiance-at-sensor and surface reflectance'''


== Introduction ==
When radiance-at-sensor has been obtained, still the atmosphere influences the signal as recorded at the sensor. This atmospheric interaction with the sun energy reflected back into space by ground/vegetation/soil needs to be corrected. There are two ways to apply atmospheric correction for satellite imagery. The simple way for Landsat is with {{cmd|i.landsat.toar}}, using the DOS correction method. The more accurate way is using {{cmd|i.atcorr}} (which works for many satellite sensors). The atmospherically corrected sensor data represent surface {{wikipedia|reflectance}}, which ranges theoretically from 0 % to 100 %. Note that this level of data correction is the proper level of correction to calculate vegetation indices.


=== Image processing in GRASS GIS ===
Satellite imagery and orthophotos (aerial photographs) are handled in GRASS as raster maps and specialized tasks are performed using the '''imagery''' (i.*) modules. All general operations are handled by the raster modules.
Satellite imagery and orthophotos (aerial photographs) are handled in GRASS as raster maps and specialized tasks are performed using the '''imagery''' (i.*) modules. All general operations are handled by the raster modules.


* [http://grass.ibiblio.org/grass63/manuals/html63_user/imageryintro.html A short introduction to image processing] in GRASS 6
* {{cmd|imageryintro}}: A short introduction to image processing in GRASS 6
* Full [http://grass.ibiblio.org/gdp/imagery/grass4_image_processing.pdf GRASS 4.0 Image Processing manual] (PDF, 47 pages)
* Full [http://grass.osgeo.org/gdp/imagery/grass4_image_processing.pdf GRASS 4.0 Image Processing manual] (PDF, 47 pages)
* [http://grass.ibiblio.org/grass63/manuals/html63_user/imagery.html Imagery module help pages]
* {{cmd|imagery}}: Imagery module help pages
 
* Data import is generally handled by the [http://grass.ibiblio.org/grass63/manuals/html63_user/r.in.gdal.html r.in.gdal] module


* Data import is generally handled by the {{cmd|r.in.gdal}} module


== Screenshots ==
== Screenshots ==


* The [http://grass.ibiblio.org/screenshots/imagery.php imagery screenshots] page
* The [http://grass.osgeo.org/screenshots/remote-sensing/ imagery screenshots] page


== Importing ==
== Importing ==
The wxGUI offers a convenient tool for single map and bulk import:
* see [[Importing data]]


=== Satellite Data ===
=== Satellite Data ===
Line 27: Line 43:


* [[MODIS]]
* [[MODIS]]
* [[MODIS#Pathfinder_SST|Pathfinder AVHRR]]
* [[AVHRR]]
 
==== High Resolution Data ====
 
Commercial satellite imagery
 
* [[IKONOS]]
* [[QuickBird]]
* [[WorldView]]
 
See also,
 
* [http://www.digitalglobe.com/sites/default/files/DigitalGlobe_Spectral_Response_1.pdf Spectral Response specifications for IKONOS, GeoEye, QuickBird, WorldView]
* various [http://apollomapping.com/about-us/whitepapers Whitepapers] on High Resolution Satellite Imagery
 
==== Hyperspectral Data ====
 
* [[AVIRIS]]
* [[Hyperion]]


=== Orthophotos ===
=== Orthophotos ===


* See the i.ortho.photo modules
The wxGUI offers a convenient tool for single map and bulk import:
 
* see [[Importing data]]
 
=== Imagery groups ===


A multi-band image may be grouped with {{cmd|i.group}} (some commands actually require the input being defined as a imagery group rather than a list of map names).


== Preprocessing ==
== Preprocessing ==
See also [http://cloudsgate2.larc.nasa.gov/cgi-bin/predict/predict.cgi NASA LaRC Satellite Overpass Predictor]


=== Geometric preprocessing/Georectification ===
=== Geometric preprocessing/Georectification ===


* Tcl/Tk georectification tool is available from the File menu in the GUI.
* Georectification tool is available from the File menu in the GUI.
* i.points, i.vpoints (scanned maps, satellite images)
* {{cmd|i.points}}, {{cmd|i.vpoints}} (scanned maps, satellite images)
* i.ortho.photo (aerial images)
* {{cmd|i.ortho.photo}} (aerial images)


A multi-band image may be grouped and georectified with a single set of ground control points. (i.group, i.target, i.rectify)
A multi-band image may be grouped and georectified with a single set of ground control points ({{cmd|i.group}}, {{cmd|i.target}}, {{cmd|i.rectify}}).


See also the [[Georeferencing]] wiki page
See also the [[Georeferencing]] wiki page
=== Orthorectification ===
* see [[Orthorectification]]
* see [[Orthorectification digital camera|Ortho-rectification of oblique photographs]]


=== Radiometric  preprocessing ===
=== Radiometric  preprocessing ===


* use r.mapcalc to apply gain/bias formula
* use {{cmd|r.mapcalc}} to apply gain/bias formula
* [[LANDSAT]]: you can also use i.landsat.toar from [[GRASS AddOns]]
* [[LANDSAT]]: you can also use {{cmd|i.landsat.toar}} <strike>from [[GRASS AddOns]]</strike> (included since 6.4)


=== Correction for atmospheric effects ===
=== Correction for atmospheric effects ===


* i.landsat.dehaze: simple dark-object/Tasseled Cap based haze minimization (from [[GRASS AddOns]])
Visit the dedicated page on [[Atmospheric correction]]
* i.atcorr: more complex correction but based on atmospheric models
 
==== Related Modules ====
 
* {{addonCmd|i.landsat.dehaze}}: simple dark-object/Tasseled Cap based haze minimization (from [[GRASS AddOns]])
* {{cmd|i.atcorr}}: more complex correction but based on atmospheric models


=== Correction for topographic/terrain effects ===
=== Correction for topographic/terrain effects ===
Line 60: Line 110:
In rugged terrain, such correction might be useful to minimize negative effects.
In rugged terrain, such correction might be useful to minimize negative effects.


* simple "cosine correction" using r.sunmask, r.mapcalc (tends to overshoot when slopes are high)
* simple "cosine correction" using {{cmd|r.sunmask}}, {{cmd|r.mapcalc}} (tends to overshoot when slopes are high)
* Minnaert or other corrections with i.topo.corr (from [[GRASS AddOns]])
* In {{cmd|i.topo.corr}} the following correction methods are implemented: cosine, minnaert, percent, c-factor.
** '''Note,''' that for the sun's zenith (in degrees) parameter, the equation "'''Sun's Zenith''' = '''90''' - '''Sun's Elevation'''" is generally valid
 
Examples:
* [http://sylla-consult.de/en/topographic-correction-of-landsat-imagery-using-grass-gis/ Topographic correction of Landsat imagery using GRASS GIS] (Blog article)


=== Cloud removal ===
=== Cloud removal ===


* with i.landsat.acca (from [[GRASS AddOns]])
* with {{cmd|i.landsat.acca}}


== Image classification ==
== Image classification ==


'''Classification methods in GRASS'''
See the dedicated [[Image classification]] page.
 
== Image segmentation ==
 
* {{cmd|i.smap}}: Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation
* {{cmd|i.segment}}: Image Segmentation
* {{AddonCmd|r.smooth.seg}}: Performs image segmentation and discontinuity detection (based on the Mumford-Shah variational model) (addon)
* {{AddonCmd|i.superpixels.slic}}: : Perform image segmentation using the SLIC segmentation method (addon)
 
== Edge detection ==
* {{cmd|i.zc}}: Zero-crossing edge detector
* {{AddonCmd|i.edge}}: Canny edge detector (addon)
 
== Filtering ==
 
* {{cmd|r.mfilter}}, {{cmd|r.neighbors}}
 
== Fourier Transform ==
 
* {{cmd|i.fft}}, {{cmd|i.ifft}}
* see also [[Image destriping]]
* see also [[Fourier transforms for multitemporal analysis]]
 
== Canonical Component Analysis ==
 
* {{cmd|i.cca}}
 
== Principal Component Analysis ==
 
* {{cmd|i.pca}}
* see also [[Principal Components Analysis]]
 
== Texture ==
 
A series of commonly used texture measures (derived from the Grey Level Co-occurrence Matrix, GLCM), also called Haralick's texture features are available:
 
* {{cmd|r.texture}}: In case of panchromatic maps or limited amount of channels, it is often recommended to generate synthetic channels through texture analysis
 
See [http://www.fp.ucalgary.ca/mhallbey/texture_calculations.htm here] and [http://murphylab.web.cmu.edu/publications/boland/boland_node26.html here] for the formulas to calculate texture. See also [http://wiki.landscapetoolbox.org/doku.php/remote_sensing_methods:canopy_texture_mapping canopy texture mapping].
 
== Tasseled cap ==
 
* {{cmd|i.tasscap}} - performs Tasseled Cap (Kauth Thomas) transformation, resulting in 'Brightness' Tasseled Cap component 1, 'Greenness' Tasseled Cap component 2, 'Greenness' Tasseled Cap component 2, 'Wetness' Tasseled Cap component 3, and 'Atmospheric haze' Tasseled Cap component 4.
 
== Spectral unmixing ==
 
* {{AddonCmd|i.spec.unmix}} is used to perform "Spectral Unmixing"
* {{cmd|i.spectral}} - displays spectral response at user specified locations in group or images.
 
=== Spectral unmixing ideas for processing hyperspectral image data ===
 
* Make use of the [http://spectralpython.sourceforge.net/ Spectral Python] (SPy) which is a pure Python module for processing hyperspectral image data
 
=== Spectral angle mapping ===
 
* {{AddonCmd|i.spec.sam}} is used to perform "Spectral Angle Mapping"
 
== Thermal remote sensing ==
 
* {{cmd|r.mapcalc}} can be used to convert from DN (digital number) of arbitrary sensors to Kelvin/Celsius/...
* {{cmd|i.landsat.toar}} - Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI
* {{AddonSrc|imagery|i.landsat8.swlst|version=7}} Practical split-window algorithm estimating Land Surface Temperature from Landsat 8 OLI/TIRS imagery
* {{cmd|i.aster.toar}} - Calculates top-of-atmosphere radiance or reflectance and temperature for ASTER
* [[MODIS#Advanced_MODIS_LST_time_series_reconstruction|MODIS]]
 
== Time series analysis ==
 
* {{cmd|r.series}}- Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.
* see also [[Time series]]
* see also [[Time series development]]
* see also [[MODIS#Advanced_MODIS_LST_time_series_reconstruction|MODIS]]


{| {{table}}
== Enhancements ==
| ||'''radiometric<BR>unsupervised'''||'''radiometric<BR>supervised 1'''||'''radiometric<BR>supervised 2'''||'''radiometric & geometric<BR>supervised'''
|-
| '''Preprocessing'''||i.cluster||i.class (monitor digitizing)||i.gensig (using training maps)||i.gensigset (using training maps)
|-
| '''Computation'''||i.maxlik||i.maxlik||i.maxlik||i.smap
|}


=== Interactive setup ===
=== Radiometric Enhancements ===
* {{cmd|i.landsat.rgb}} (GRASS 6.x) | {{cmd|i.colors.enhance}} (GRASS 7.x)
* Decorrelation stretching with {{cmd|r.colors}} or {{cmd|r.mapcalc}}
* Density slicing with {{cmd|r.colors}}
* [[Principal Component Analysis]] with {{cmd|i.pca}}


* i.class - Generates spectral signatures for an image by allowing the user to outline regions of interest.
=== Geometric Enhancements - Image Fusion - Pansharpening - Image Segmentation ===
: The resulting signature file can be used as input for i.maxlik or as a seed signature file for i.cluster.


=== Processing ===
Image fusion and Pansharpening:
* {{cmd|i.fusion.hpf}} is fusing high resolution panchromatic and low resolution multi-spectral data based on the High-Pass Filter Addition technique (Gangkofner, 2008).
* {{cmd|i.pansharpen}}: Image fusion algorithms to sharpen multispectral with high-res panchromatic channels
* {{cmd|i.rgb.his}} and {{cmd|i.his.rgb}}: can be used for image fusion


* i.cluster - Generates spectral signatures for land cover types in an image using a clustering algorithm.
Segmentation:
: The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.
* {{cmd|i.segment}}: Identifies segments (objects) from imagery data
* i.gensig - Generates statistics for i.maxlik from raster map layer.
* {{AddonCmd|i.superpixels.slic}} performs image segmentation using the SLIC segmentation method. (Addons)
* i.gensigset - Generate statistics for i.smap from raster map layer.
* {{AddonCmd|r.smooth.seg}} which performs image segmentation and discontinuity detection (based on the Mumford-Shah variational model). The module generates a piece-wise smooth approximation of the input raster map and a raster map of the discontinuities of the output approximation. The discontinuities of the output approximation are preserved from being smoothed. (Addons)


=== Unsupervised classification ===
=== Optimal channel selection for color composites ===
* {{cmd|i.oif}}: Calculates Optimum-Index-Factor table for spectral bands


* i.maxlik - Classifies the cell spectral reflectances in imagery data.
== Vegetation indices ==
: Classification is based on the spectral signature information generated by either i.cluster, i.class, or i.gensig.


=== Supervised classification ===
* {{cmd|i.vi}}: various vegetation indices
* {{cmd|r.mapcalc}} can be used to calculate uncommon vegetation indices


* i.smap  - Performs contextual (image segmentation) image classification using sequential maximum a posteriori (SMAP) estimation.
== Water indices ==
* {{AddonCmd|i.wi}}: Calculates different types of water indices (addon)


== Filtering ==
== Biomass growth ==
* {{cmd|i.biomass}}: The biomass growth computes the daily increment of biomass from vegetation, with an optional Harvest Index applied (i.e. if not = 1.0, then it is considering the final grain proportion at the end of the season). By repeatedly computing the biomass growth, with or without Harvest Index, for the whole period of the crop development on the field with several satellite images, we can do a temporal integration of the biomass growth, or the yield (using the Harvest Index != 1.0) for a given crop of interest. By using a set of temporal masks on a large map, and varying the temporal integration periods, as well as the Harvest Indices by crop type, we can estimate several crop types yields in one processing.


* i.fft, i.ifft, i.pca, r.mfilter, r.neighbors
== Evapotranspiration ==


== Enhancement ==
* i.eb.* and i.evapo.* are modules dedicated to evapotranspiration, see {{cmd|topic_evapotranspiration}}


* i.landsat.rgb
Please look at [[Image_processing/Evapotranspiration]] for some background information.
* i.fusion.brovey
* i.oif


== Stereo anaglyphs ==
== Stereo anaglyphs ==
Line 118: Line 243:
Below modules need some tuning before being added to GRASS 6. Volunteers welcome.
Below modules need some tuning before being added to GRASS 6. Volunteers welcome.


=== Spectral unmixing ===
=== libCTL - Library for affine, Helmert and projective transformations in 2D ===


* [http://mpa.itc.it/markus/spectral_unmixing/ i.spec.unmix] (source code)
To be evaluated: plain C translation
https://svn.code.sf.net/p/gvsigce/code/trunk/libraries/libCTL/


=== Spectral angle mapping ===
* requires GNU Scientific Library for the matrix algebra
* It is a small library that provides a handful of transformation methods from source to target (2D) coordinates. Currently, this includes affine, Helmert and projective transformations in 2D.
*  The main library is written in plain C and the transformation functions are a plain C conversion of the methods found in the QGIS (www.qgis.org) Georeferencer Plugin (projective and Helmert transformations) and Olivier Dalang's "worldfile transform" (https://gist.github.com/olivierdalang/ba97fc986ade4545068d).
* author: B Ducke


* [http://mpa.itc.it/markus/spectral_unmixing/ i.spec.sam] (source code)
=== Geocoding ideas ===


=== Geocoding ===
* {{AddonCmd|i.homography}}: geocoding with lines (instead of points) with homography (as improved i.points; it was formerly called i.linespoints)
* support splines from GDAL (see [[GRASS_AddOns#Imagery_add-ons]])
* New [[WxGUI#Georectifier|Georectifier]]: see also http://gama.fsv.cvut.cz/~landa/grass/swf/georect.html


* [http://trac.osgeo.org/grass/browser/grass-addons/imagery i.points.auto]: automated search of GCPs based on FFT correlation (as improved i.points)
=== Image matching ideas ===
* [http://trac.osgeo.org/grass/browser/grass-addons/imagery i.homography]: geocoding with lines (instead of points) with homography (as improved i.points; it was formerly called i.linespoints)
* {{AddonCmd|i.points.auto}}: automated search of GCPs based on FFT correlation (as improved i.points)
* support splines from GDAL (see [[GRASS_AddOns#Imagery_add-ons]])
: ''Reference:'' M. Neteler, D. Grasso, I. Michelazzi, L. Miori, S. Merler, and C. Furlanello, 2005: An integrated toolbox for image registration, fusion and classification. International Journal of Geoinformatics, 1(1), pp. 51-61 [http://www.grassbook.org/neteler/papers/neteler2005_IJG_051-061_draft.pdf PDF]


=== Image classification ===
=== Image classification ideas ===


* [http://mpa.itc.it/merler/index.html#ml pr: C code for classification problems]
* [http://mpa.itc.it/merler/index.html#ml pr: C code for classification problems]
* GRASS implementation: i.pr.* source code is available [http://trac.osgeo.org/grass/browser/grass-addons/imagery here])
* GRASS implementation: i.pr.* source code is available [http://trac.osgeo.org/grass/browser/grass-addons/grass6/imagery/i.pr here])


=== Stereo ===
=== Stereo ideas ===


This is stand-alone stereo modeling software (DEM extraction etc). Waits for integration into GRASS.
This is stand-alone stereo modeling software (DEM extraction etc). Waits for integration into GRASS.
* http://grass.itc.it/outgoing/grass5/stereo-0.2b.tar.gz
* http://grass.osgeo.org/outgoing/grass5/stereo-0.2b.tar.gz
* [http://grass.osgeo.org/gdp/stereo-grass/index.html Stereo Tutorial]
* [http://grass.osgeo.org/gdp/stereo-grass/index.html Stereo Tutorial]


=== Lidar LAS format ===
=== Bundle block adjustment ===
 
Needed to orthorectify a series aerial images taken sequentially with overlap. "Historical" method which is nowadays interesting for UAV flights with octocopters and such.
 
Automatec GPC search could be done by "auto-sift".


LAS Tools by M. Isenburg: http://www.cs.unc.edu/~isenburg/lastools/
Available: Octave code which prepares input to an {{cmd|i.ortho.photo}} batch job (contact Markus Neteler).


    las2txt | r.in.xyz in=- fs=" "
=== Lidar LAS format ===


(see [http://grass.osgeo.org/grass63/manuals/html63_user/r.in.xyz.html r.in.xyz])
(see [[LIDAR]])


=== Improving the existing code ===
=== Improving the existing code ===
Line 156: Line 291:


* GRASS 6 standard libs:
* GRASS 6 standard libs:
** lib/imagery/: standard lib, in use (i.* except for i.points3, i.rectify3)
** lib/imagery/: standard lib, in use (i.* except for i.points3, i.rectify3, see below)
** imagery/i.ortho.photo/libes/: standard lib, in use (i.ortho.photo, photo.*)
** imagery/i.ortho.photo/libes/: standard lib, in use ({{cmd|i.ortho.photo}}, photo.*)
* GRASS 5 (! only) image3 lib:
* GRASS 5 (! only) image3 lib:
** lib/image3/: never finished improvement which integrated the standard lib and the ortho lib. Seems to provide also ortho rectification for satellite data (i.points3, i.rectify3)
** [http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_5_5/src/libes/image3 libes/image3/]: never finished improvement which integrated the standard lib and the ortho lib. Seems to provide also ortho rectification for satellite data ([http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_5_5/src/imagery/i.points3 i.points3], [http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_5_5/src/imagery/i.rectify3 i.rectify3])
* GRASS 5/6 image proc commands:
* GRASS 5/6 image proc commands:
** merge of i.points, i.vpoints, i.points3
** merge of {{cmd|i.points}}, {{cmd|i.vpoints}}, i.points3 (see above)
** merge of i.rectify and i.rectify3
** merge of {{cmd|i.rectify}} and i.rectify3 (see above)
** addition of new resampling algorithms such as bilinear, cubic convolution (take from r.proj or upcoming r.resamp.aggreg)
** <strike>addition of new resampling algorithms such as bilinear, cubic convolution (take from {{cmd|r.proj}} or {{cmd|r.resamp.aggreg}})</strike> (done 10/2010)
** add other warping methods (maybe thin splines from GDAL?)
** add other warping methods (maybe lanczos or thin splines from GDAL?): [[Addons#i.warp]]
** implement/finish linewise ortho-rectification of satellite data
** implement/finish linewise ortho-rectification of satellite data


== Bibliography ==
* Search for [http://scholar.google.com/scholar?sourceid=mozclient&ie=utf-8&oe=utf-8&q=grass+gis+image+processing "GRASS GIS Image processing"] - Google Scholar
* Search for [http://scholar.google.com/scholar?sourceid=mozclient&ie=utf-8&oe=utf-8&q=grass+gis+remote+sensing "GRASS GIS Remote Sensing"] - Google Scholar


[[Category:Development]]
[[Category:Development]]
[[Category:Documentation]]
[[Category:Image processing]]

Latest revision as of 05:02, 2 December 2023

Introduction

For a general overview, see "Introduction: image processing in GRASS GIS" at imageryintro.

General introduction

Digital numbers and physical values (reflection/radiance-at-sensor):

Satellite imagery is commonly stored in Digital Numbers (DN) for minimizing the storage volume, i.e. the originally sampled analog physical value (color, temperature, etc) is stored a discrete representation in 8-16 bits. For example, Landsat data are stored in 8bit values (i.e., ranging from 0 to 255); other satellite data may be stored in 10 or 16 bits. Having data stored in DN, it implies that these data are not yet the observed ground reality. Such data are called "at-satellite", for example the amount of energy sensed by the sensor of the satellite platform is encoded in 8 or more bits. This energy is called radiance-at-sensor. To obtain physical values from DNs, satellite image providers use a linear transform equation (y = a * x + b) to encode the radiance-at-sensor in 8 to 16 bits. DNs can be turned back into physical values by applying the reverse formula (x = (y - b) / a).

The GRASS GIS module i.landsat.toar easily transforms Landsat DN to radiance-at-sensor. The equivalent module for ASTER data is i.aster.toar. For other satellites, r.mapcalc can be employed.

Reflection/radiance-at-sensor and surface reflectance

When radiance-at-sensor has been obtained, still the atmosphere influences the signal as recorded at the sensor. This atmospheric interaction with the sun energy reflected back into space by ground/vegetation/soil needs to be corrected. There are two ways to apply atmospheric correction for satellite imagery. The simple way for Landsat is with i.landsat.toar, using the DOS correction method. The more accurate way is using i.atcorr (which works for many satellite sensors). The atmospherically corrected sensor data represent surface reflectance, which ranges theoretically from 0 % to 100 %. Note that this level of data correction is the proper level of correction to calculate vegetation indices.

Image processing in GRASS GIS

Satellite imagery and orthophotos (aerial photographs) are handled in GRASS as raster maps and specialized tasks are performed using the imagery (i.*) modules. All general operations are handled by the raster modules.

  • Data import is generally handled by the r.in.gdal module

Screenshots

Importing

The wxGUI offers a convenient tool for single map and bulk import:

Satellite Data

Ocean Color

Sea Surface Temperature (SST)

High Resolution Data

Commercial satellite imagery

See also,

Hyperspectral Data

Orthophotos

The wxGUI offers a convenient tool for single map and bulk import:

Imagery groups

A multi-band image may be grouped with i.group (some commands actually require the input being defined as a imagery group rather than a list of map names).

Preprocessing

See also NASA LaRC Satellite Overpass Predictor

Geometric preprocessing/Georectification

A multi-band image may be grouped and georectified with a single set of ground control points (i.group, i.target, i.rectify).

See also the Georeferencing wiki page

Orthorectification

Radiometric preprocessing

Correction for atmospheric effects

Visit the dedicated page on Atmospheric correction

Related Modules

Correction for topographic/terrain effects

In rugged terrain, such correction might be useful to minimize negative effects.

  • simple "cosine correction" using r.sunmask, r.mapcalc (tends to overshoot when slopes are high)
  • In i.topo.corr the following correction methods are implemented: cosine, minnaert, percent, c-factor.
    • Note, that for the sun's zenith (in degrees) parameter, the equation "Sun's Zenith = 90 - Sun's Elevation" is generally valid

Examples:

Cloud removal

Image classification

See the dedicated Image classification page.

Image segmentation

  • i.smap: Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation
  • i.segment: Image Segmentation
  • r.smooth.seg: Performs image segmentation and discontinuity detection (based on the Mumford-Shah variational model) (addon)
  • i.superpixels.slic: : Perform image segmentation using the SLIC segmentation method (addon)

Edge detection

  • i.zc: Zero-crossing edge detector
  • i.edge: Canny edge detector (addon)

Filtering

Fourier Transform

Canonical Component Analysis

Principal Component Analysis

Texture

A series of commonly used texture measures (derived from the Grey Level Co-occurrence Matrix, GLCM), also called Haralick's texture features are available:

  • r.texture: In case of panchromatic maps or limited amount of channels, it is often recommended to generate synthetic channels through texture analysis

See here and here for the formulas to calculate texture. See also canopy texture mapping.

Tasseled cap

  • i.tasscap - performs Tasseled Cap (Kauth Thomas) transformation, resulting in 'Brightness' Tasseled Cap component 1, 'Greenness' Tasseled Cap component 2, 'Greenness' Tasseled Cap component 2, 'Wetness' Tasseled Cap component 3, and 'Atmospheric haze' Tasseled Cap component 4.

Spectral unmixing

  • i.spec.unmix is used to perform "Spectral Unmixing"
  • i.spectral - displays spectral response at user specified locations in group or images.

Spectral unmixing ideas for processing hyperspectral image data

  • Make use of the Spectral Python (SPy) which is a pure Python module for processing hyperspectral image data

Spectral angle mapping

  • i.spec.sam is used to perform "Spectral Angle Mapping"

Thermal remote sensing

  • r.mapcalc can be used to convert from DN (digital number) of arbitrary sensors to Kelvin/Celsius/...
  • i.landsat.toar - Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI
  • i.landsat8.swlst (src) Practical split-window algorithm estimating Land Surface Temperature from Landsat 8 OLI/TIRS imagery
  • i.aster.toar - Calculates top-of-atmosphere radiance or reflectance and temperature for ASTER
  • MODIS

Time series analysis

Enhancements

Radiometric Enhancements

Geometric Enhancements - Image Fusion - Pansharpening - Image Segmentation

Image fusion and Pansharpening:

  • i.fusion.hpf is fusing high resolution panchromatic and low resolution multi-spectral data based on the High-Pass Filter Addition technique (Gangkofner, 2008).
  • i.pansharpen: Image fusion algorithms to sharpen multispectral with high-res panchromatic channels
  • i.rgb.his and i.his.rgb: can be used for image fusion

Segmentation:

  • i.segment: Identifies segments (objects) from imagery data
  • i.superpixels.slic performs image segmentation using the SLIC segmentation method. (Addons)
  • r.smooth.seg which performs image segmentation and discontinuity detection (based on the Mumford-Shah variational model). The module generates a piece-wise smooth approximation of the input raster map and a raster map of the discontinuities of the output approximation. The discontinuities of the output approximation are preserved from being smoothed. (Addons)

Optimal channel selection for color composites

  • i.oif: Calculates Optimum-Index-Factor table for spectral bands

Vegetation indices

  • i.vi: various vegetation indices
  • r.mapcalc can be used to calculate uncommon vegetation indices

Water indices

  • i.wi: Calculates different types of water indices (addon)

Biomass growth

  • i.biomass: The biomass growth computes the daily increment of biomass from vegetation, with an optional Harvest Index applied (i.e. if not = 1.0, then it is considering the final grain proportion at the end of the season). By repeatedly computing the biomass growth, with or without Harvest Index, for the whole period of the crop development on the field with several satellite images, we can do a temporal integration of the biomass growth, or the yield (using the Harvest Index != 1.0) for a given crop of interest. By using a set of temporal masks on a large map, and varying the temporal integration periods, as well as the Harvest Indices by crop type, we can estimate several crop types yields in one processing.

Evapotranspiration

Please look at Image_processing/Evapotranspiration for some background information.

Stereo anaglyphs

Ideas collection for improving GRASS' Image processing capabilities

Below modules need some tuning before being added to GRASS 6. Volunteers welcome.

libCTL - Library for affine, Helmert and projective transformations in 2D

To be evaluated: plain C translation https://svn.code.sf.net/p/gvsigce/code/trunk/libraries/libCTL/

  • requires GNU Scientific Library for the matrix algebra
  • It is a small library that provides a handful of transformation methods from source to target (2D) coordinates. Currently, this includes affine, Helmert and projective transformations in 2D.
  • The main library is written in plain C and the transformation functions are a plain C conversion of the methods found in the QGIS (www.qgis.org) Georeferencer Plugin (projective and Helmert transformations) and Olivier Dalang's "worldfile transform" (https://gist.github.com/olivierdalang/ba97fc986ade4545068d).
  • author: B Ducke

Geocoding ideas

Image matching ideas

  • i.points.auto: automated search of GCPs based on FFT correlation (as improved i.points)
Reference: M. Neteler, D. Grasso, I. Michelazzi, L. Miori, S. Merler, and C. Furlanello, 2005: An integrated toolbox for image registration, fusion and classification. International Journal of Geoinformatics, 1(1), pp. 51-61 PDF

Image classification ideas

Stereo ideas

This is stand-alone stereo modeling software (DEM extraction etc). Waits for integration into GRASS.

Bundle block adjustment

Needed to orthorectify a series aerial images taken sequentially with overlap. "Historical" method which is nowadays interesting for UAV flights with octocopters and such.

Automatec GPC search could be done by "auto-sift".

Available: Octave code which prepares input to an i.ortho.photo batch job (contact Markus Neteler).

Lidar LAS format

(see LIDAR)

Improving the existing code

It might be sensible to merge the various image libraries:

  • GRASS 6 standard libs:
    • lib/imagery/: standard lib, in use (i.* except for i.points3, i.rectify3, see below)
    • imagery/i.ortho.photo/libes/: standard lib, in use (i.ortho.photo, photo.*)
  • GRASS 5 (! only) image3 lib:
    • libes/image3/: never finished improvement which integrated the standard lib and the ortho lib. Seems to provide also ortho rectification for satellite data (i.points3, i.rectify3)
  • GRASS 5/6 image proc commands:
    • merge of i.points, i.vpoints, i.points3 (see above)
    • merge of i.rectify and i.rectify3 (see above)
    • addition of new resampling algorithms such as bilinear, cubic convolution (take from r.proj or r.resamp.aggreg) (done 10/2010)
    • add other warping methods (maybe lanczos or thin splines from GDAL?): Addons#i.warp
    • implement/finish linewise ortho-rectification of satellite data

Bibliography