Back to Adaptive Vision Library website
You are here: Start » Function Reference » Region Basics » CreateGridRegion
Creates a grid-shaped region with given parameters.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::CreateGridRegion ( const avl::Box& inGridBoundingBox, int inHorizontalStep, int inVerticalStep, int inFrameWidth, int inFrameHeight, avl::Region& outRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inGridBoundingBox | const Box& | ||||
inHorizontalStep | int | 1 - | Horizontal distance between vertical grid lines. | ||
inVerticalStep | int | 1 - | Vertical distance between horizontal grid lines. | ||
inFrameWidth | int | 0 - | Width of the created region's frame | ||
inFrameHeight | int | 0 - | Height of the created region's frame | ||
outRegion | Region& | Output region |
Description
The operation creates a region in a shape of a one-pixel-wide grid. Grid is described by its width, height, distances between its lines and coordinates of its upper-left corner.
The inFrameWidth and inFrameHeight parameters most often should be set equal to the dimensions of the image this region will be used with.
Hints
- Remember to set inFrameWidth and inFrameHeight inputs to specify the region frame.
Examples
Errors
Error type | Description |
---|---|
DomainError | Output region too big in CreateGridRegion. |
See Also
- CreateBoxRegion – Creates a rectangular region corresponding to a given box.
- CreateCrossRegion – Creates a cross-shaped region with given parameters.