Back to Adaptive Vision Library Lite website

You are here: Start » Geometry 2D » Geometry 2D Spatial Transforms » AlignLine

AlignLine


Header: AVL.h
Namespace: avl

Moves a line from a local coordinate system to the absolute one.

Applications: Required when there is a line defined in a local coordinate system, but the next image-related filter in the program does not have any inAlignment input.

Syntax

void avl::AlignLine
(
	const avl::Line2D& inLine,
	const avl::CoordinateSystem2D& inAlignment,
	bool inInverse,
	avl::Line2D& outAlignedLine
)

Parameters

Name Type Default Description
inLine const Line2D&
inAlignment const CoordinateSystem2D& Coordinate system to align to
inInverse bool Switches to the inverse transform
outAlignedLine Line2D&

In-place Processing

This function supports in-place data processing - you can pass the same reference to inLine and outAlignedLine

Read more about In-place Computation.

Description

AlignLine aligns the inLine to the inAlignment coordinate system. The input line is translated, rotated and scaled.

Examples

AlignLine performed on the sample line. The inAlignment is drawn on the first image in blue.

Errors

List of possible exceptions:

Error type Description
DomainError Indefinite line on input in AlignLine.

See Also

  • RotateLine – Rotates a line clockwise around a center point.
  • AlignPath – Moves a path from a local coordinate system to the absolute one.