i.gensigset(1grass)
β¨ i.gensigset β¨
okay bestie, welcome to the manual page for i.gensigset, straight out of the GRASS User's Manual π. This is the girl that makes the statistics for i.smap from a raster map, and she is thriving.
πΈ NAME πΈ
i.gensigset β generates statistics for i.smap from raster map. that's the whole job. no cap π
π KEYWORDS π
imagery, classification, supervised classification, SMAP, signatures
π¦ SYNOPSIS π¦
i.gensigset
i.gensigset --help
i.gensigset trainingmap=name group=name subgroup=name signaturefile=name
[maxsig=integer] [--overwrite] [--help] [--verbose] [--quiet]
[--ui]
π«Ά Flags π«Ά
--overwriteβ let your output files just body existing files, overwrite them, slay--helpβ prints the usage summary so you're not lost, we love that for us--verboseβ verbose module output, so it tells you everything, main character commentary--quietβ quiet module output, the introvert setting π€«--uiβ force launching the GUI dialog, for the girlies who need the pretty buttons
β Parameters β
trainingmap=nameβ required, ground truth training mapgroup=nameβ required, name of input imagery groupsubgroup=nameβ required, name of input imagery subgroupsignaturefile=nameβ required, name for the output file containing the result signaturesmaxsig=integerβ maximum number of sub-signatures in any class. Default:5
π DESCRIPTION π
so i.gensigset is a non-interactive method for generating input into i.smap. It's the first pass in a two-pass classification process, like the opening act before the headliner. It reads a raster map layer called the training map, and that map already has some of its pixels or regions classified (iconic of it honestly). Then i.gensigset extracts spectral signatures from an image based on how those pixels in the training map are classified, and makes those signatures available to i.smap. give it up π
Then you'd go ahead and run the GRASS program i.smap to create the final classified map. that's the whole arc.
This module generates signature files of type "sigset". Use module i.signatures to manage generated signature files, okay? manage your files, bestie, don't leave them lying around π§
For all raster maps used to generate a signature file, it's recommended to have a semantic label set. Use r.support to set semantic labels of each member of the imagery group. Signatures generated for one scene are suitable for classification of other scenes as long as they consist of the same raster bands and the semantic labels match. If semantic labels are not set, you'll only be able to use the obtained signature file to classify the same imagery group that was used for generating the signatures. so like... set your labels. it's giving self-care π
An usage example can be found in i.smap documentation.
β¨ OPTIONS β¨
π Parameters π
trainingmap=nameβ ground truth training map
This raster layer, supplied as input by you, has some of its pixels already classified, and the rest (probably most) of the pixels unclassified. Classified means the pixel has a non-zero value. Unclassified means the pixel has a zero value. that's it, that's the rule π
This map must be prepared by the user in advance, using a combination of wxGUI vector digitizer and v.to.rast, or some other import/development process (e.g., v.transects) to define the areas representative of the classes in the image.
At present, there is no fully-interactive tool specifically designed for producing this layer. yeah. we know. π
group=nameβ imagery group
This is the name of the group that contains the band files which comprise the image to be analyzed. The i.group command is used to construct groups of raster layers which comprise an image.
subgroup=nameβ subgroup containing image files
This names the subgroup within the group that selects a subset of the bands to be analyzed. The i.group command is also used to prepare this subgroup. The subgroup mechanism lets you select a subset of all the band files that form an image. choose your faves π
signaturefile=nameβ resultant signature file
This is the resultant signature file (containing the means and covariance matrices) for each class in the training map that is associated with the band files in the subgroup selected.
maxsig=valueβ maximum number of sub-signatures in any class. default:5
The spectral signatures produced by this program are "mixed" signatures (see NOTES). Each signature contains one or more subsignatures (representing subclasses). The algorithm in this program starts with a maximum number of subclasses and reduces this number to a minimal number of subclasses which are spectrally distinct. You have the option to set this starting value with this option. you're in control, queen π
π NOTES π
The algorithm in i.gensigset determines the parameters of a spectral class model known as a Gaussian mixture distribution. The parameters are estimated using multispectral image data and a training map which labels the class of a subset of the image pixels. The mixture class parameters are stored as a class signature which can be used for subsequent segmentation (i.e., classification) of the multispectral image.
The Gaussian mixture class is a useful model because it can be used to describe the behavior of an information class which contains pixels with a variety of distinct spectral characteristics. For example, forest, grasslands or urban areas are examples of information classes that a user may wish to separate in an image. However, each of these information classes may contain subclasses, each with its own distinctive spectral characteristic. For example, a forest may contain a variety of different tree species each with its own spectral behavior. the forest is a whole friend group, lowkey πΈ
The objective of mixture classes is to improve segmentation performance by modeling each information class as a probabilistic mixture with a variety of subclasses. The mixture class model also removes the need to perform an initial unsupervised segmentation for the purposes of identifying these subclasses. However, if misclassified samples are used in the training process, these erroneous samples may be grouped as a separate undesired subclass. Therefore, care should be taken to provide accurate training data. > bestie. please. give it good training data. bad data in, chaos out, fr fr
This clustering algorithm estimates both the number of distinct subclasses in each class, and the spectral mean and covariance for each subclass. The number of subclasses is estimated using Rissanen's minimum description length (MDL) criteria [1]. This criteria attempts to determine the number of subclasses which "best" describe the data. The approximate maximum likelihood estimates of the mean and covariance of the subclasses are computed using the expectation maximization (EM) algorithm [2,3]. she's doing math math π
π WARNINGS π
If warnings like this occur, reducing the remaining classes to 0:
...
WARNING: Removed a singular subsignature number 1 (4 remain)
WARNING: Removed a singular subsignature number 1 (3 remain)
WARNING: Removed a singular subsignature number 1 (2 remain)
WARNING: Removed a singular subsignature number 1 (1 remain)
WARNING: Unreliable clustering. Try a smaller initial number of clusters
WARNING: Removed a singular subsignature number 1 (-1 remain)
WARNING: Unreliable clustering. Try a smaller initial number of clusters
Number of subclasses is 0
then the user should check for:
- the range of the input data should be between
0and100or255but not between0.0and1.0(r.infoandr.univarshow the range) - the training areas need to contain a sufficient amount of pixels
π REFERENCES π
- J. Rissanen, "A Universal Prior for Integers and Estimation by Minimum Description Length," Annals of Statistics, vol. 11, no. 2, pp. 417-431, 1983.
- A. Dempster, N. Laird and D. Rubin, "Maximum Likelihood from Incomplete Data via the EM Algorithm," J. Roy. Statist. Soc. B, vol. 39, no. 1, pp. 1-38, 1977.
- E. Redner and H. Walker, "Mixture Densities, Maximum Likelihood and the EM Algorithm," SIAM Review, vol. 26, no. 2, April 1984.
π₯ SEE ALSO π₯
r.support, i.group, i.smap, r.info, r.univar, wxGUI vector digitizer
π«Ά AUTHORS π«Ά
- Charles Bouman, School of Electrical Engineering, Purdue University
- Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
- Semantic label support: Maris Nartiss, University of Latvia
π SOURCE CODE π
Available at: i.gensigset source code (history)
Latest change: Monday Feb 09 18:47:00 2026 in commit: 8cec756bc3c21c1086ba7c09dfda94b6a0e82f04
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
and that's the tea, bestie π this whole thing lives in the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team β version GRASS 8.5.0, periodt. go generate some signatures, you ate πβ¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms