Back to Adaptive Vision Library website

You are here: Start » Function Reference » Geometry 2D Constructions » CreateCoordinateSystemFromRectangle

CreateCoordinateSystemFromRectangle


Header:AVL.h
Namespace:avl

Creates a coordinate system from a rectangle.

Syntax

C++
C#
 
void avl::CreateCoordinateSystemFromRectangle
(
	const avl::Rectangle2D& inRectangle,
	const avl::Anchor2D::Type inPointAnchor,
	float inRelativeAngle,
	float inScale,
	float inScaleDivisor,
	avl::CoordinateSystem2D& outCoordinateSystem
)

Parameters

Name Type Range Default Description
inRectangle const Rectangle2D&
inPointAnchor const Anchor2D::Type TopLeft
inRelativeAngle float
inScale float 0.001 - 1.0f
inScaleDivisor float 0.001 - 1.0f
outCoordinateSystem CoordinateSystem2D&

Hints

  • Pass inRectangle to a computed rectangle representing a new coordinate system.
  • Optionally set inScale and inScaleDivisor to obtain a custom scale.
  • Optionally set inRelativeAngle to modify the rotation.

Examples

A local coordinate system created from a rectangle.

Remarks

Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.