NAME
i.cutlines - Creates semantically meaningful tile borders
KEYWORDS
imagery,
tiling
SYNOPSIS
i.cutlines
i.cutlines --help
i.cutlines input=name number_lines=integer edge_detection=string edge_weight=integer lane_border_resistance=integer [min_tile_size=integer] [vector_tiles=name] [vector_lines=name] [raster_lines=name] [zc_threshold=float] [zc_width=integer] [canny_low_threshold=float] [canny_high_threshold=float] [canny_sigma=float] [tile_width=integer] [tile_height=integer] [overlap=integer] processes=integer memory=integer [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
Parameters:
- input=name [required]
- Raster map to use as input for tiling
- number_lines=integer [required]
- Number of tile border lines in each direction
- edge_detection=string [required]
- Edge detection algorithm to use
- Options: zc, canny
- Default: zc
- edge_weight=integer [required]
- Priority to give to edge pixels over other pixels
- Default: 5
- lane_border_resistance=integer [required]
- Friction of borders of lanes
- Default: 10000
- min_tile_size=integer
- Minimum size of tiles in map units
- vector_tiles=name
- Name for output vector map with tiles as polygons
- Name for output vector map
- vector_lines=name
- Name for output vector map with tiles as lines
- Name for output vector map
- raster_lines=name
- Name for output raster map with tiles as lines
- Name for output raster map
- zc_threshold=float
- Sensitivity of Gaussian filter (i.zc)
- Default: 1
- zc_width=integer
- x-y extent of the Gaussian filter (i.zc)
- Default: 9
- canny_low_threshold=float
- Low treshold for edges (i.edge)
- Default: 3
- canny_high_threshold=float
- High treshold for edges (i.edge)
- Default: 10
- canny_sigma=float
- Kernel radius (i.edge)
- Default: 2
- tile_width=integer
- Width of tiles for tiled edge detection (pixels)
- tile_height=integer
- Height of tiles for tiled edge detection (pixels)
- overlap=integer
- Overlap between tiles for tiled edge detection (pixels)
- Default: 1
- processes=integer [required]
- Number of parallel processes
- Default: 1
- memory=integer [required]
- RAM memory available (in MB)
- Default: 300
i.cutlines tiles the images into tiles with irregular borders that
avoid cutting through meaningful objects. This allows tiling an image for
parallel processing while avoiding border effects.
The approach used in i.cutlines is inspired by Soares et al (2016).
The module first uses an edge detection algorithm (which the user can chose
with the edge_detection parameter) to identify edges in the image. It
then uses r.cost and r.drain to
draw lines through the image, following edges when possible and going straight
when there are none.
The user can determine the number of lines desired (number_lines) in each
direction and the relative weight given to edges compared to other pixels
(edge_weight), weight of other pixels being 1. In order to avoid that all
lines gather into one single lowest cost path, the module defines a lane for
each desired line. The parameter lane_border_resistance defines the cost
to cross that line, i.e. the lower the value, the more likely cutlines will join
each other. Output can be in the form of raster or vector lines
(raster_lines and vector_lines parameters) or in the form of
vector polygon tiles (vector_tiles). For the latter, the user can decide
a minimum size defined in map units (min_tile_size). Tiles smaller than
that size will be merged with the neighboring tile they share the longest
border with.
For edge detection the user can chose between the i.zc
module or the i.edge addon. For the former, the user
can determine the zc_threshold and the zc_width parameters. For
the latter, the canny_low_threshold, canny_high_threshold and
canny_sigma parameters. See the manual page of the respective modules
for details about these parameters which might need tuning to fit to the
specific image. As these modules read the entire image into RAM,
i.cutlines allows the user to run split the image into rectangular
tiles and to process each tile separately. Tiles can be defined with the
tile_width, tile_height and overlap parameters. If
processes is higher than one, these tiles will be processed in parallel
as will the r.cost calls for the two directions.
The memory parameter determines the memory used both for the
r.cost runs.
There is currently a parameter name conflict between
i.zc
and the GridModule class in pygrass. Until this is resolved tiled edge
detection is only possible with
i.edge.
Using default
i.zc edge detection without tiling,
default parameters and 10 horizontal and 10 vertical cutlines, creating
vector polygon output:
g.region rast=ortho_2001_t792_1m
i.cutlines ortho_2001_t792_1m number_lines=10 vector_tiles=ortho_tiles

Irregular vector tiles created for the NC demo data set orthophoto
Soares, Anderson Reis, Thales Sehn Körting, and Leila Maria Garcia Fonseca. 2016. "Improvements of the Divide and Segment Method for Parallel Image Segmentation." Revista Brasileira de Cartografia 68 (6), http://www.lsie.unb.br/rbc/index.php/rbc/article/view/1602.
i.zc,
i.edge,
r.tile,
v.mkgrid,
i.segment
Moritz Lennert
Last changed: $Date: 2018-03-12 12:24:32 +0100 (Mon, 12 Mar 2018) $
SOURCE CODE
Available at: i.cutlines source code (history)
Main index |
Imagery index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2018
GRASS Development Team,
GRASS GIS 7.4.1svn Reference Manual