Back to FabImage Library Lite website

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

AlignSegment


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

Syntax

void fil::AlignSegment
(
	const fil::Segment2D& inSegment,
	const fil::CoordinateSystem2D& inAlignment,
	bool inInverse,
	fil::Segment2D& outAlignedSegment
)

Parameters

Name Type Default Description
inSegment const Segment2D&
inAlignment const CoordinateSystem2D& Coordinate system to align to
inInverse bool Switches to the inverse transform
outAlignedSegment Segment2D&

Description

AlignSegment aligns the inSegment to the inAlignment coordinate system. The input segment is translated, rotated and scaled.

The inAlignment is usually a coordinate system found by some template matching algorithm.

Examples

AlignSegment performed on the sample segment. The inAlignment is drawn on the first image in blue.

See Also

  • RotateSegment – Rotates a segment clockwise around a center point.