Back to Adaptive Vision Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Features » PointsCaliperDiameter


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Computes the longest and the shortest width of the input points measured as distance between parallel lines containing all of them.


void avl::PointsCaliperDiameter
	const atl::Array<avl::Point2D>& inPoints,
	atl::Optional<avl::Segment2D&> outMinDiameter = atl::NIL,
	atl::Optional<float&> outMinDiameterLength = atl::NIL,
	atl::Optional<avl::Segment2D&> outMaxDiameter = atl::NIL,
	atl::Optional<float&> outMaxDiameterLength = atl::NIL


Name Type Default Description
Input value
inPoints const Array<Point2D>&
Output value
outMinDiameter Optional<Segment2D&> NIL
Output value
outMinDiameterLength Optional<float&> NIL
Output value
outMaxDiameter Optional<Segment2D&> NIL
Output value
outMaxDiameterLength Optional<float&> NIL

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outMinDiameter, outMinDiameterLength, outMaxDiameter, outMaxDiameterLength.

Read more about Optional Outputs.


List of possible exceptions:

Error type Description
DomainError Empty point array on input in PointsCaliperDiameter.