Back to Adaptive Vision Library website
You are here: Start » Function Reference » Region Spatial Transforms » ShearRegion
ShearRegion
Header: | AVL.h |
---|---|
Namespace: | avl |
Computes a leant region.
Syntax
C++
C#
void avl::ShearRegion ( const avl::Region& inRegion, float inShear, avl::Axis::Type inAxis, avl::Region& outRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inRegion | const Region& | Input region | |||
inShear | float | - - | The relative shift of each consecutive row or column | ||
inAxis | Axis::Type | Switches between shifting rows or columns | |||
outRegion | Region& | Output region |
Description
The filter ShearRegion applies basic affine transform to each regions's pixel.
Shear affine transform when X axis is selected:
\[ \left[\begin{array}{ccc} x' \\ y' \end{array} \right] = \left[\begin{array}{ccc} 1 & inShear \\ 0 & 1 \end{array} \right] \left[\begin{array}{ccc} x \\ y \end{array} \right] \]Shear affine transform when Y axis is selected:
\[ \left[\begin{array}{ccc} x' \\ y' \end{array} \right] = \left[\begin{array}{ccc} 1 & 0\\ inShear & 1 \end{array} \right] \left[\begin{array}{ccc} x \\ y \end{array} \right] \]See Also
- ShearImage – Computes a leant image (shifts the rows).