i.zc(1)

πŸ’… i.zc β€” the GRASS GIS User's Manual page, but make it cute

okay bestie, welcome to i.zc(1) from the GRASS GIS User's Manual 🌸 this is the zero-crossing edge detection raster function for image processing, and honestly? she's iconic. let's get into it πŸ’–


✨ NAME ✨

i.zc β€” zero-crossing "edge detection" raster function for image processing. yes that's the whole name. she does one thing and she ATE πŸ’…


πŸŽ€ KEYWORDS πŸŽ€

imagery, edges. two words. both slay. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

i.zc
i.zc --help
i.zc input=string output=string  [width=integer]   [threshold=float]
[orientations=integer]   [--overwrite]  [--help]  [--verbose]  [--quiet]
[--ui]

look at her. so simple. so powerful. the way that she just works 😭✨


🌈 Flags:

  • --overwrite β€” bestie this lets your output files overwrite files that already exist. use with intention, ok? πŸ‘€
  • --help β€” prints the usage summary so you're not out here guessing πŸ’–
  • --verbose β€” verbose module output, aka she tells you EVERYTHING, main character energy fr fr
  • --quiet β€” quiet module output, the opposite vibe, she says nothing and just does the thing 🀫
  • --ui β€” force launches the GUI dialog. clicky clicky mode πŸ–±οΈβœ¨

πŸ’œ Parameters:

  • input=string [required] β€” the name of your input raster map. mandatory, no skips 🫢
  • output=string [required] β€” the zero crossing raster map. also mandatory, also no skips πŸŽ€
  • width=integer β€” the x-y extent of the Gaussian filter. Default: 9 🌸
  • threshold=float β€” sensitivity of the Gaussian filter. Default: 1.0 ⭐
  • orientations=integer β€” number of azimuth directions categorized. Default: 1 πŸ¦‹

🌸 DESCRIPTION 🌸

so i.zc is an image processing module used for edge detection πŸŽ€ and the raster map she produces shows you the location of "boundaries" on the input map. literally that's her whole thing.

these boundaries tend to be found in regions of changing cell values, and they tend to run perpendicular to the direction of the slope. the algorithm she uses for edge detection is one of the "zero-crossing" algorithms β€” and bestie, we're gonna discuss it briefly below, don't worry, i got you πŸ’–


πŸ”₯ NOTES πŸ”₯

here's the procedure to find the "edges" in the image, step by step, no cap:

  1. The Fourier transform of the image is taken.
  2. The Fourier transform of the Laplacian of a two-dimensional Gaussian function is used to filter the transformed image.
  3. The result is run through an inverse Fourier transform.
  4. The resulting image is traversed in search of places where the image changes from positive to negative or from negative to positive.
  5. Each cell in the map where the value crosses zero (with a change in value greater than the threshold value) is marked as an edge and an orientation is assigned to it. The resulting raster map layer is output.

like. the way that she just does five whole steps and doesn't even break a sweat πŸ˜­πŸ’…


the width= parameter determines the x-y extent of the Gaussian filter. the default value is 9 ✨ and higher and lower values can be tested by the user β€” go off, experiment, live your truth. increasing the width will result in finding "edges" representing more gradual changes in cell values. so like, wider = softer edges, basically πŸ¦‹

the threshold= parameter determines the "sensitivity" of the Gaussian filter. the default value is 1 ⭐ and again, higher and lower values can be tested by the user. increasing the threshold value will result in fewer edges being found. so if you're getting too many edges and you're overwhelmed, crank that threshold up, bestie πŸ™ˆ

the orientations= value is the number of azimuth directions the cells on the output raster map layer are categorized into β€” similar to the aspect raster map layer produced by r.slope.aspect πŸ‘‘ for example, a value of 16 would result in detected edges being categorized into one of 16 bins depending on the direction of the edge at that point. sixteen bins!! categorized!! she's so organized πŸ’–

also important: the current region definition and mask settings are respected when reading the input map. so she's not out here ignoring your settings, she's respectful like that 🫢

πŸ’€ SEE ALSO πŸ’€

i.fft, i.ifft, r.mapcalc, r.mfilter, r.slope.aspect

go read those too, they're her friends 🧚✨


πŸ‘‘ AUTHOR πŸ‘‘

David Satnik, GIS Laboratory, Central Washington University. legend behaviour, we love to see it πŸ’œ


πŸ“ SOURCE CODE πŸ“

Available at: i.zc source code (history)

Accessed: Saturday Jan 17 05:41:46 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 πŸŽ€ this was i.zc(1) from the GRASS GIS 8.4.2 Reference Manual, accessed Saturday Jan 17 05:41:46 2026, and the footer says GRASS 8.4.2 β€” so if you're running that version, you're in the right place 🌈 stay slay, detect those edges, and remember: zero crossings only πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from