Image processing: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(updated)
(use cmd template)
Line 5: Line 5:
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.ibiblio.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/imagery.php imagery screenshots] page


== Importing ==
== Importing ==
Line 31: Line 31:
=== Orthophotos ===
=== Orthophotos ===


* See the i.ortho.photo modules
* See the {{cmd|i.ortho.photo}} modules




== Preprocessing ==
== Preprocessing ==
See [http://earthobservatory.nasa.gov/MissionControl/overpass.php Satellite Overpass Predictor]


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


* Tcl/Tk georectification tool is available from the File menu in the GUI.
* Tcl/Tk 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
Line 48: Line 50:
=== 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}} from [[GRASS AddOns]]


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


* i.landsat.dehaze: simple dark-object/Tasseled Cap based haze minimization (from [[GRASS AddOns]])
* {{cmd|i.landsat.dehaze}}: simple dark-object/Tasseled Cap based haze minimization (from [[GRASS AddOns]])
* i.atcorr: more complex correction but based on atmospheric models
* {{cmd|i.atcorr}}: more complex correction but based on atmospheric models


=== Correction for topographic/terrain effects ===
=== Correction for topographic/terrain effects ===
Line 60: Line 62:
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]])
* Minnaert or other corrections with i.topo.corr (from [[GRASS AddOns]])


Line 74: Line 76:
| ||'''radiometric<BR>unsupervised'''||'''radiometric<BR>supervised 1'''||'''radiometric<BR>supervised 2'''||'''radiometric & geometric<BR>supervised'''
| ||'''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)
| '''Preprocessing'''||{{cmd|i.cluster}}||{{cmd|i.class}} (monitor digitizing)||{{cmd|i.gensig}} (using training maps)||{{cmd|i.gensigset}} (using training maps)
|-
|-
| '''Computation'''||i.maxlik||i.maxlik||i.maxlik||i.smap
| '''Computation'''||{{cmd|i.maxlik}}||{{cmd|i.maxlik}}||{{cmd|i.maxlik}}||{{cmd|i.smap}}
|}
|}


=== Interactive setup ===
=== Interactive setup ===


* i.class - Generates spectral signatures for an image by allowing the user to outline regions of interest.
* {{cmd|i.class}} - Generates spectral signatures for an image by allowing the user to outline regions of interest.
: The resulting signature file can be used as input for i.maxlik or as a seed signature file for i.cluster.
: The resulting signature file can be used as input for {{cmd|i.maxlik}} or as a seed signature file for {{cmd|i.cluster}}.


=== Processing ===
=== Processing ===


*  i.cluster - Generates spectral signatures for land cover types in an image using a clustering algorithm.
{{cmd|i.cluster}} - Generates spectral signatures for land cover types in an image using a clustering algorithm.
: The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.
: The resulting signature file is used as input for {{cmd|i.maxlik}}, to generate an unsupervised image classification.
* i.gensig - Generates statistics for i.maxlik from raster map layer.
* {{cmd|i.gensig}} - Generates statistics for {{cmd|i.maxlik}} from raster map layer.
* i.gensigset - Generate statistics for i.smap from raster map layer.
* {{cmd|i.gensigset}} - Generate statistics for {{cmd|i.smap}} from raster map layer.


=== Unsupervised classification ===
=== Unsupervised classification ===


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


=== Supervised classification ===
=== Supervised classification ===


* i.smap  - Performs contextual (image segmentation) image classification using sequential maximum a posteriori (SMAP) estimation.
* {{cmd|i.smap}} - Performs contextual (image segmentation) image classification using sequential maximum a posteriori (SMAP) estimation.


== Filtering ==
== Filtering ==


* i.fft, i.ifft, i.pca, r.mfilter, r.neighbors
* {{cmd|i.fft}}, {{cmd|i.ifft}}, {{cmd|i.pca}}, {{cmd|r.mfilter}}, {{cmd|r.neighbors}}


== Enhancement ==
== Enhancement ==


* i.landsat.rgb
* {{cmd|i.landsat.rgb}}
* i.fusion.brovey
* {{cmd|i.fusion.brovey}}
* i.oif
* {{cmd|i.oif}}


== Stereo anaglyphs ==
== Stereo anaglyphs ==
Line 140: Line 142:


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]



Revision as of 22:56, 12 February 2009

This page needs review and enhancement from an expert! Thanks!

Introduction

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

Satellite Data

Ocean Color

Sea Surface Temperature (SST)

Orthophotos


Preprocessing

See Satellite Overpass Predictor

Geometric preprocessing/Georectification

  • Tcl/Tk georectification tool is available from the File menu in the GUI.
  • i.points, i.vpoints (scanned maps, satellite images)
  • 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).

See also the Georeferencing wiki page

Radiometric preprocessing

Correction for atmospheric effects

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)
  • Minnaert or other corrections with i.topo.corr (from GRASS AddOns)

Cloud removal

Image classification

Classification methods in GRASS

radiometric
unsupervised
radiometric
supervised 1
radiometric
supervised 2
radiometric & geometric
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

  • i.class - Generates spectral signatures for an image by allowing the user to outline regions of interest.
The resulting signature file can be used as input for i.maxlik or as a seed signature file for i.cluster.

Processing

  • i.cluster - Generates spectral signatures for land cover types in an image using a clustering algorithm.
The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.

Unsupervised classification

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

Supervised classification

  • i.smap - Performs contextual (image segmentation) image classification using sequential maximum a posteriori (SMAP) estimation.

Filtering

Enhancement

Stereo anaglyphs

Ideas collection for improving GRASS' Image processing capabilities

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

Spectral unmixing

Spectral angle mapping

Geocoding

  • i.points.auto: automated search of GCPs based on FFT correlation (as improved i.points)
  • 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)

Image classification

Stereo

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

Lidar LAS format

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

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

(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)
    • imagery/i.ortho.photo/libes/: standard lib, in use (i.ortho.photo, photo.*)
  • 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)
  • GRASS 5/6 image proc commands:
    • merge of i.points, i.vpoints, i.points3
    • merge of i.rectify and i.rectify3
    • addition of new resampling algorithms such as bilinear, cubic convolution (take from r.proj or upcoming r.resamp.aggreg)
    • add other warping methods (maybe thin splines from GDAL?)
    • implement/finish linewise ortho-rectification of satellite data