i.zc(1grass)
π i.zc β the zero-crossing edge-detection glow-up π
okay so bestie, you know how the GRASS User's Manual has a whole page for this? It's called i.zc, it lives in the 1grass manual section, and it is literally the "Zero-crossing 'edge detection' raster function for image processing." No cap. π
KEYWORDS: imagery, edges β¨
π SYNOPSIS π
i.zc
i.zc --help
i.zc input=string output=string [width=integer] [threshold=float]
[orientations=integer] [--overwrite] [--help] [--verbose] [--quiet]
[--ui]
π Flags π
--overwriteβ lets your output files just bulldoze whatever existing files are sitting there. permission to be messy granted.--helpβ prints the usage summary. your lil cheat sheet π«Ά--verboseβ verbose module output, aka the module tells you everything it's doing.--quietβ quiet module output. shhh. not a peep. π€«--uiβ forces the GUI dialog to launch. clicky clicky instead of typey typey β¨
π¦ Parameters π¦
input=string[required] β name of the input raster map. mandatory, bestie, you can't skip it πoutput=string[required] β the zero crossing raster map. also mandatory!!width=integerβ 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 for edge detection, and the raster map it spits out shows you where the "boundaries" are on your input map. It's giving detective energy, honestly π
These boundaries show up in regions where cell values are changing, and they tend to run perpendicular to the direction of the slope. The algorithm doing all this is one of the "zero-crossing" algorithms β and yeah, we get into it below. no crumbs left. π
π NOTES π
Here's the whole procedure for finding the "edges" in the image, step by step:
- The Fourier transform of the image is taken,
- The Fourier transform of the Laplacian of a two-dimensional Gaussian function is used to filter the transformed image,
- The result is run through an inverse Fourier transform,
- The resulting image is traversed in search of places where the image changes from positive to negative or from negative to positive,
- Each cell in the map where the value crosses zero (with a change in value greater than the
thresholdvalue) is marked as an edge and an orientation is assigned to it. The resulting raster map layer is output.
okay now the parameters, one at a time, because they each have a whole personality π
The width= parameter determines the x-y extent of the Gaussian filter. Default is 9, and you can test higher and lower values yourself. Bump the width up and you'll find "edges" that represent more gradual changes in cell values. it's giving soft focus π¦
The threshold= parameter determines the "sensitivity" of the Gaussian filter. Default is 1, and again, higher and lower values can be tested by the user. Raise the threshold and fewer edges get found. picky filter, honestly. π
The orientations= value is the number of azimuth directions the cells on the output raster map layer get categorized into β similar to the aspect raster map layer produced by r.slope.aspect. So 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. bins!! categorized!! iconic β¨
Heads up: the current region definition and mask settings are respected when reading the input map. so set your region first, bestie, don't come crying to me later π
πΈ SEE ALSO πΈ
i.fft, i.ifft, r.mapcalc, r.mfilter, r.slope.aspect
π AUTHOR π
David Satnik, GIS Laboratory, Central Washington University
π SOURCE CODE π
Available at: i.zc source code (history)
Latest change: Friday Jan 02 21:25:59 2026 in commit: 83362df5af36c1e7d95fad93dff0a57b4dfde476
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
and that's the whole vibe check, bestie π«Ά this was written up against GRASS 8.5.0, from the i.zc(1grass) page, with Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual holding it down at the bottom. slay, go find some edges. ππβ
π¦ 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