i.gensigset(1)
π i.gensigset π
okay bestie, welcome to the GRASS GIS User's Manual page for i.gensigset β¨ it's giving supervised-classification-prep realness and we're gonna walk through every single flag together, no cap.
πΈ NAME πΈ
i.gensigset β generates statistics for i.smap from raster map. periodt.
π 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β bestie this lets your output files overwrite existing files. use responsibly π--helpβ prints the usage summary so you're not out here guessing--verboseβ verbose module output, for when you want the tea in full β--quietβ quiet module output, for when you want it chill π€«--uiβ forces launching the GUI dialog π₯οΈ
π§ 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 output file containing 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 literally the first pass in a two-pass classification process, main character energy fr fr. It reads a raster map layer β called the training map β which has some of the pixels or regions already classified. Then i.gensigset extracts spectral signatures from an image based on the classification of the pixels in the training map and makes these signatures available to i.smap β¨
After that, you (the user) would go ahead and run the GRASS program i.smap to create the final classified map π
This module generates signature files of type "sigset". Use module i.signatures to manage generated signature files π
For all raster maps used to generate signature file it is recommended to have 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 same raster bands (semantic labels match). If semantic labels are not set, it will be possible to use obtained signature file to classify only the same imagery group used for generating signatures π (iykyk)
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 the user, has some of its pixels already classified, and the rest (probably most) of the pixels unclassified. Classified means that the pixel has a non-zero value and unclassified means that the pixel has a zero value π¨
This map must be prepared by the user in advance by 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. π (we make do bestie)
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 allows the user to select a subset of all the band files that form an image π―
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 which are 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. The user has the option to set this starting value with this option β
π§ 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 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 provided accurate training data π
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] π§
π¨ 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)
Accessed: Saturday Jan 17 05:41:41 2026
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual π
and that's the whole page bestie, GRASS 8.4.2 era, accessed Saturday Jan 17 05:41:41 2026, straight out of the i.gensigset(1) manual β slay, go classify something iconic π
β¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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