i.oif(1grass)

πŸ’– i.oif πŸ’–

okay bestie, welcome to the GRASS User's Manual glow-up of i.oif β€” my name is i.oif and I am literally about to hand you the Optimum-Index-Factor table for your spectral bands. no cap. πŸ¦‹

KEYWORDS: imagery, multispectral, statistics ✨


🌸 SYNOPSIS 🌸

i.oif
i.oif --help
i.oif [-gs] input=name[,name,...]  [output=name]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags πŸŽ€

  • -g β€” prints in shell script style, periodt πŸ’…
  • -s β€” processes the bands serially (default is running them in parallel, FYI)
  • --overwrite β€” lets output files just steamroll over existing files, go off πŸ‘‘
  • --help β€” prints the usage summary, your little map πŸ—ΊοΈ
  • --verbose β€” verbose module output, she's chatty
  • --quiet β€” quiet module output, she's mysterious 🀫
  • --ui β€” forces the GUI dialog to launch, fancy

🧚 Parameters 🧚

  • input=name[,name,...] [required] β€” name of input raster map(s). this one is not optional bestie, she's mandatory. no skipping. 🚨
  • output=name β€” name for the output file. if you omit it, or if you literally just write -, it goes to stdout. iconic behavior honestly.

✨ DESCRIPTION ✨

so i.oif calculates the Optimum Index Factor for multi-spectral satellite imagery. that's the whole vibe.

the Optimum Index Factor (OIF) figures out which three-band combo maximizes the variability β€” aka the information β€” in a multi-spectral scene. it's a ratio: the total variance (standard deviation) within all the possible band combinations, over the correlation between them. the bands that make up the highest-scoring combination from i.oif are the ones you feed in as the three color channels for d.rgb or r.composite. slay. 🌈

the analysis gets saved to a file in the current directory called i.oif.result. she leaves receipts. πŸ’Ύ


πŸ’… NOTES πŸ’…

Landsat 1-7 TM: Colour Composites in BGR order as important Landsat TM band combinations. example drop: 234 in BGR order means B=2, G=3, R=4. iykyk.

  • 123: near natural ("true") colour; but because of the correlation of the 3 bands in the visible spectrum, this combination contains not much more info than is contained in a single band. kinda giving nothing, respectfully. 😭
  • 234: sensitive to green vegetation (portrayed as red), coniferous as distinctly darker red than deciduous forests. roads and water bodies are clear. very main character. πŸ“
  • 243: green vegetation is green but coniferous forests aren't as clear as the 234 combination.
  • 247: one of the best for info pertaining to forestry. good for operation scale mapping of recent harvest areas and road construction.
  • 345: contains one band from each of the main reflective units (vis, nir, shortwave infra). green vegetation is green and the shortwave band shows vegetational stress and mortality. roads are less evident as band 3 is blue.
  • 347: similar to 345 but depicts burned areas better. πŸ”₯ (literally)
  • 354: appears more like a colour infrared photo.
  • 374: similar to 354.
  • 457: shows soil texture classes (clay, loam, sandy).

by default the module calculates standard deviations for all bands in parallel. want it serial? use the -s flag, bestie. and if the WORKERS environment variable is set, the number of concurrent processes gets limited to that number of jobs. πŸ‘‘


🌟 EXAMPLE 🌟

North Carolina sample dataset, let's go:

g.region raster=lsat7_2002_10 -p
i.oif input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70

πŸ“š REFERENCES πŸ“š

Jensen, 1996. Introductory digital image processing. Prentice Hall, p.98. ISBN 0-13-205840-5


πŸ‘€ SEE ALSO πŸ‘€

d.rgb, r.composite, r.covar, r.univar


🫢 AUTHORS 🫢

Markus Neteler, ITC-Irst, Trento, Italy Updated to GRASS 5.7 by Michael Barton, Arizona State University


πŸ’– SOURCE CODE πŸ’–

Available at: i.oif source code (history)

Latest change: Tuesday Oct 21 09:57:14 2025 in commit: fb0165c2d021b7700528aca09c224847be871729

Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page bestie, we ate and left no crumbs πŸŽ€

okay so final sign-off: this is from the GRASS 8.5.0 Reference Manual (that's the version, and the page is dated with the latest change on Tuesday Oct 21 09:57:14 2025), and the page you just read is i.oif(1grass). mwah πŸ’‹ βœ¨πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from