Center for Geospatial Analytics at North Carolina State University
Image classification: assigning a label from a fixed set of classes (building, tree, road, crop) to each unit of an image
Pixel based: each cell receives a label from its own feature values
Object based: the image is first segmented into groups of similar cells; the groups are classified
Scene classification: a whole image or image tile receives one label
Schematic spectra; the band positions are those of the MicaSense RedEdge (center wavelength, width in the shaded strip).
| Band | Typical range | What it responds to |
|---|---|---|
| Green | 500 to 600 nm, peak near 550 | Chlorophyll reflection; healthy leaves look green |
| Red | 600 to 700 nm | Chlorophyll absorption; low for vegetation, higher for soil |
| Red edge | 700 to 730 nm | The transition from absorption to NIR reflection; sensitive to chlorophyll content and stress |
| NIR | 700 nm to 1.3 µm | Leaf cell structure; the strongest reflectance of healthy vegetation |


Figure and table from Jeziorska (2019). One lens and sensor per band, so the bands are offset and aligned in processing.


MicaSense RedEdge-MX Dual, 10 bands, July 18, 2023, EROS calibration site, South Dakota (Irwin et al. 2025). NDVI from the 668 and 842 nm bands: grass 0.5 to 0.7, crop rows and trees 0.8 to 1, roads near zero.
| Index | Formula | Bands | Purpose |
|---|---|---|---|
| NDVI | (NIR - Red) / (NIR + Red) | NIR, red | Green vegetation; 0.2 to 0.8 for crops and forest |
| NDRE | (NIR - RedEdge) / (NIR + RedEdge) | NIR, red edge | Chlorophyll in dense canopies, late season crops |
| SAVI | (1 + L) (NIR - Red) / (NIR + Red + L), L = 0.5 | NIR, red | Sparse vegetation over bright soil |
| GNDVI | (NIR - Green) / (NIR + Green) | NIR, green | Chlorophyll, less saturation than NDVI |
| NDWI | (Green - NIR) / (Green + NIR) | green, NIR | Open water |
| VARI | (Green - Red) / (Green + Red - Blue) | RGB | Green vegetation from RGB |
| GLI | (2 Green - Red - Blue) / (2 Green + Red + Blue) | RGB | Green vegetation from RGB |
| NDBI | (SWIR - NIR) / (SWIR + NIR) | SWIR, NIR | Built-up areas (satellite sensors) |
Feature: one raster of values offered to the model for each cell: a band, an index, a filter result, a texture measure, or a terrain derivative
| Group | Examples | What it adds |
|---|---|---|
| Spectral | Bands, VARI, NDVI | Color and vegetation contrast |
| Spatial filters | Mean, standard deviation, edges | The neighborhood of the cell |
| Texture | GLCM measures | The pattern of grey levels |
| Terrain | Height, slope, curvature, landforms | The shape of the surface |
| Transformations | Principal components | Fewer, uncorrelated bands |
In GRASS: r.mapcalc expression="vari = float(ortho.2 - ortho.1) / (ortho.2 + ortho.1 - ortho.3)"; float() avoids integer division of the 8-bit bands
Low pass filter: a moving window mean; removes fine variation such as crop rows
High pass filter: local variation or edges; standard deviation, zero crossings
Grey level co-occurrence matrix (GLCM): counts how often pairs of grey levels occur in neighboring cells of a window; its statistics describe texture (Haralick et al. 1973). In GRASS: r.texture input=ortho.2 output=green_tex method=asm,contrast,corr size=5

Slope of the DSM

Geomorphons, 3 m search radius
In GRASS: r.slope.aspect for slope and curvatures, r.geomorphon for landforms (Jasiewicz and Stepinski 2013)
![]()
Superpixel: a compact group of neighboring cells with similar values; SLIC grows them from a regular grid of seeds (Achanta et al. 2012)
i.superpixels.slic and i.segment.stats; i.segment for region growingFoundation model: a model trained once on a very large dataset and used for many tasks without further training. SAM (Kirillov et al. 2023) and SAM 2 (Ravi et al. 2024) return the outline of an object for a prompt: a point, a box, or, combined with a text model, a word
i.sam2 group=farm_rgb output=sam_trees text_prompt="trees", through the samgeo package (Wu and Osco 2023)Prompts “trees”, “buildings”, and “cars” at the default thresholds of 0.24: 2, 15, and 15 objects.
Supervised: the model learns the classes from labeled samples
Unsupervised: cells are grouped by similarity; the analyst names the groups afterwards
| Design | How samples are placed | Consideration |
|---|---|---|
| Random | Anywhere in the extent with equal probability | Rare classes receive few samples |
| Stratified random | A fixed number per class or stratum | Needs a prior map of the strata |
| Cluster | Groups of nearby samples, such as digitized polygons | Efficient to collect; samples within a polygon are not independent |
Random forest: many decision trees, each trained on a bootstrap sample of the training data and a random subset of the features at each split; the class is the majority vote (Breiman 2001)
r.learn.train group=features training_map=train_rast model_name=RandomForestClassifier, then r.learn.predictRGB bands (left) and 14 features (right), July 17, 2024

| Map \ Reference | Forest | Water | Urban | Agriculture | User’s accuracy (%) |
|---|---|---|---|---|---|
| Forest | 50 | 2 | 3 | 0 | 90.9 |
| Water | 1 | 45 | 0 | 4 | 90.0 |
| Urban | 2 | 1 | 40 | 7 | 80.0 |
| Agriculture | 0 | 3 | 5 | 42 | 84.0 |
| Producer’s accuracy (%) | 94.3 | 88.2 | 83.3 | 79.2 |
| Model | Training polygons | Test polygons |
|---|---|---|
| RGB bands | 99.5 %, kappa 0.98 | 54.6 %, kappa 0.17 |
| 14 features | 100 %, kappa 1.00 | 53.6 %, kappa 0.21 |
Feature: a raster of values offered to the model for each cell
Random forest: an ensemble of decision trees trained on bootstrap samples; the class is their majority vote
Foundation model: a model pretrained on a very large dataset and prompted for a task without further training
Confusion matrix: the cross tabulation of mapped and reference classes
User’s accuracy: the share of a mapped class that is correct; the complement of the commission error
Producer’s accuracy: the share of a reference class that was found; the complement of the omission error
Assignment 6A: UAS image classification
Lab (optional): Vegetation indices from UAS imagery