Image processing/it: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
mNo edit summary
(allineato con la versione inglese)
Line 1: Line 1:
{{Trans|Italiano|English}}
{{Trans|Italiano|English}}
== Introduzione ==
== Introduzione ==
Per una descrizione generale, vedi [http://grass.osgeo.org/grass72/manuals/imageryintro.html Introduction: image processing] in GRASS GIS


=== Introduzione generale ===
=== Introduzione generale ===
Line 12: Line 13:
I dati in forma di DN non sono ancora dati reali rilevati al suolo.
I dati in forma di DN non sono ancora dati reali rilevati al suolo.
Tali dati sono detti "al satellite"; per esempio, la quantità di energia rilevata dal sensore della piattaforma satellitare è codificata in 8 o più bit. Questa energia è detta radianza al sensore<!--radiance-at-sensor-->. Al fine di ottenere valori fisici dai DN, i fornitori di immagini satellitari usano un'equazione di trasformazione lineare <tt>(y = a * x + b)</tt> per codificare la radianza al sensore in valori da 8 a 16 bit. I DN si possono riconvertire in valori fisici applicando la formula inversa <tt>(x = (y - b) / a)</tt>.
Tali dati sono detti "al satellite"; per esempio, la quantità di energia rilevata dal sensore della piattaforma satellitare è codificata in 8 o più bit. Questa energia è detta radianza al sensore<!--radiance-at-sensor-->. Al fine di ottenere valori fisici dai DN, i fornitori di immagini satellitari usano un'equazione di trasformazione lineare <tt>(y = a * x + b)</tt> per codificare la radianza al sensore in valori da 8 a 16 bit. I DN si possono riconvertire in valori fisici applicando la formula inversa <tt>(x = (y - b) / a)</tt>.


Il modulo di GRASS GIS {{cmd|i.landsat.toar}} trasforma facilmente i DN Landsat in radiance-at-sensor. Il modulo equivalente per i dati ASTER è {{cmd|i.aster.toar}}. Per altri satelliti si può usare {{cmd|r.mapcalc}}.
Il modulo di GRASS GIS {{cmd|i.landsat.toar}} trasforma facilmente i DN Landsat in radiance-at-sensor. Il modulo equivalente per i dati ASTER è {{cmd|i.aster.toar}}. Per altri satelliti si può usare {{cmd|r.mapcalc}}.


'''Reflection/radiance-at-sensor and surface reflectance'''
'''Reflection/radiance-at-sensor and surface reflectance'''
Line 52: Line 51:


==== High Resolution Data ====
==== High Resolution Data ====
Commercial satellite imagery


* [[IKONOS]]
* [[IKONOS]]
* [[QuickBird]]
* [[QuickBird]]
* [[WorldView]]


See also, various [http://apollomapping.com/about-us/whitepapers Whitepapers] on High Resolution Satellite Imagery
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


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


* see [[Orthorectification]]
The wxGUI offers a convenient tool for single map and bulk import:
* see [[Orthorectification digital camera|Ortho-rectification of oblique photographs]]
 
* see [[Importing data]]


== Preprocessing ==
== Preprocessing ==


See also [http://www-air.larc.nasa.gov/tools/predict.htm NASA LaRC Satellite Overpass Predictor]
See also [http://cloudsgate2.larc.nasa.gov/cgi-bin/predict/predict.cgi NASA LaRC Satellite Overpass Predictor]


=== Geometric preprocessing/Georectification ===
=== Geometric preprocessing/Georectification ===
Line 76: Line 82:


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 ===
Line 98: Line 109:
* In {{cmd|i.topo.corr}} the following correction methods are implemented: cosine, minnaert, percent, c-factor.
* 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
** '''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 ===
Line 109: Line 123:
== Image segmentation ==
== Image segmentation ==


* {{cmd|i.smap}}: Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.  
* {{cmd|i.smap}}: Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation
* {{AddonCmd|r.seg}}: Performs image segmentation and discontinuity detection (based on the Mumford-Shah variational model).
* {{cmd|i.segment}}: Image Segmentation
* [[GRASS GSoC 2012 Image Segmentation|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 ==
== Filtering ==
Line 121: Line 140:
* {{cmd|i.fft}}, {{cmd|i.ifft}}
* {{cmd|i.fft}}, {{cmd|i.ifft}}
* see also [[Image destriping]]
* see also [[Image destriping]]
* see also [[Fourier transforms for multitemporal analysis]]


== Canonical Component Analysis ==
== Canonical Component Analysis ==
Line 141: Line 161:
== Spectral unmixing ==
== Spectral unmixing ==


* {{AddonCmd|i.spec.unmix}} is used to perform Spectral Unmixing ([https://svn.osgeo.org/grass/grass-addons/grass6/imagery/i.spec.unmix/description.html manual])
* {{AddonCmd|i.spec.unmix}} is used to perform "Spectral Unmixing"
* {{AddonSrc|imagery|i.spec.unmix|version=7}}: version for GRASS GIS 7
* {{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 ==
== Time series analysis ==


* {{cmd|r.series}}
* {{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]]
* see also [[Time series development]]
* see also [[Time series development]]
* see also [[MODIS#Advanced_MODIS_LST_time_series_reconstruction|MODIS]]


== Enhancements ==
== Enhancements ==


=== Radiometric Enhancements ===
=== Radiometric Enhancements ===
* {{cmd|i.landsat.rgb}}
* {{cmd|i.landsat.rgb}} (GRASS 6.x) | {{cmd|i.colors.enhance}} (GRASS 7.x)
* Decorrelation stretching with {{cmd|r.colors}} or {{cmd|r.mapcalc}}
* Decorrelation stretching with {{cmd|r.colors}} or {{cmd|r.mapcalc}}
* Density slicing with {{cmd|r.colors}}
* Density slicing with {{cmd|r.colors}}
Line 161: Line 190:


Image fusion and Pansharpening:
Image fusion and Pansharpening:
* {{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
* {{cmd|i.rgb.his}} and {{cmd|i.his.rgb}}: can be used for image fusion
* {{cmd|i.fusion.brovey}}: image fusion of pan-chromatic and color channels
* {{cmd|i.pansharpen|version=70}}: Image fusion algorithms to sharpen multispectral with high-res panchromatic channels (GRASS 7)


Segmentation:
Segmentation:
* {{AddonCmd|r.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)
* {{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)
* {{cmd|i.segment|version=70}}: Identifies segments (objects) from imagery data (GRASS 7)
* {{cmd|i.segment}}: Identifies segments (objects) from imagery data (GRASS 7)


=== Optimal channel selection for color composites ===
=== Optimal channel selection for color composites ===
* {{cmd|i.oif}}
* {{cmd|i.oif}}
== Vegetation indices ==
* {{cmd|i.vi}}: various vegetation indices
* {{cmd|r.mapcalc}} can be used to calculate uncommon vegetation indices
== Water indices ==
* {{AddonCmd|i.wi}}: Calculates different types of water indices (addon)
== Biomass indices ==
* {{cmd|i.biomass}}
== Evapotranspiration ==
* i.eb.* and i.evapo.* are modules dedicated to evapotranspiration, see https://grass.osgeo.org/grass72/manuals/topic_evapotranspiration.html
Please look at [[Image_processing/Evapotranspiration]] for some background information.


== Stereo anaglyphs ==
== Stereo anaglyphs ==
Line 180: Line 225:
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 ideas ===
=== 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
 
=== 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
* Make use of the [http://spectralpython.sourceforge.net/ Spectral Python] (SPy) which is a pure Python module for processing hyperspectral image data
Line 211: Line 266:
=== Bundle block adjustment ===
=== Bundle block adjustment ===


Needed to orthorectify a series aerial images taken sequentially with overlap. "Histoical" method which is nowadays interesting for UAV flights with octocopters and such.
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".
Automatec GPC search could be done by "auto-sift".
Line 217: Line 272:
Available: Octave code which prepares input to an {{cmd|i.ortho.photo}} batch job (contact Markus Neteler).
Available: Octave code which prepares input to an {{cmd|i.ortho.photo}} batch job (contact Markus Neteler).


=== <strike>Lidar LAS format</strike> ===
=== Lidar LAS format ===


LAS Tools by M. Isenburg, Howard Butler et al.: http://www.liblas.org
LAS Tools by M. Isenburg, Howard Butler et al.: http://www.liblas.org
Line 223: Line 278:
     las2txt | r.in.xyz in=- fs=" "
     las2txt | r.in.xyz in=- fs=" "


''Update:'' {{cmd|r.in.lidar|version=70}} and {{cmd|v.in.lidar|version=70}} implemented by Markus Metz (GRASS 7)
''Update:'' {{cmd|r.in.lidar|version=70}} and {{cmd|v.in.lidar|version=70}} implemented by Markus Metz (GRASS 7), but las2txt is still useful for added control such as filtering or importing secondary data streams such as intensity.


(see [[LIDAR]])
(see [[LIDAR]])

Revision as of 14:54, 19 October 2018

This page is in progress of translating to Italiano from English.

Introduzione

Per una descrizione generale, vedi Introduction: image processing in GRASS GIS

Introduzione generale

Numeri digitali e valori fisici (riflessione/radianza-al-sensore):

Le immagini da satellite sono comunemente fornite come numeri digitali (Digital Numbers - DN) per minimizzare il volume di memoria, cioè il valore fisico analogico campionato in origine (colore, temperatura, etc) è memorizzato come una rappresentazione discreta in 8-16 bit. Per esempio, i dati Landsat vengono memorizzati come valori a 8bit (cioè in un intervallo da 0 a 255); i dati di altri satelliti possono essere memorizzati a 10 o 16 bit. I dati in forma di DN non sono ancora dati reali rilevati al suolo. Tali dati sono detti "al satellite"; per esempio, la quantità di energia rilevata dal sensore della piattaforma satellitare è codificata in 8 o più bit. Questa energia è detta radianza al sensore. Al fine di ottenere valori fisici dai DN, i fornitori di immagini satellitari usano un'equazione di trasformazione lineare (y = a * x + b) per codificare la radianza al sensore in valori da 8 a 16 bit. I DN si possono riconvertire in valori fisici applicando la formula inversa (x = (y - b) / a).

Il modulo di GRASS GIS i.landsat.toar trasforma facilmente i DN Landsat in radiance-at-sensor. Il modulo equivalente per i dati ASTER è i.aster.toar. Per altri satelliti si può usare r.mapcalc.

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,

Orthophotos

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

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.

Spectral unmixing

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.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:

  • 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)
  • i.segment: Identifies segments (objects) from imagery data (GRASS 7)

Optimal channel selection for color composites

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 indices

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

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 ideas

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

LAS Tools by M. Isenburg, Howard Butler et al.: http://www.liblas.org

   las2txt | r.in.xyz in=- fs=" "

Update: r.in.lidar and v.in.lidar implemented by Markus Metz (GRASS 7), but las2txt is still useful for added control such as filtering or importing secondary data streams such as intensity.

(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