Back to Aurora Vision Library website

You are here: Start » Function Reference » Region » Region Basics » CreateEllipseRegion

CreateEllipseRegion


Header: AVL.h
Namespace: avl
Module: FoundationLite

Creates an elliptic region of given bounding rectangle.

Syntax

C++
C#
 
void avl::CreateEllipseRegion
(
	const avl::Rectangle2D& inEllipse,
	atl::Optional<const avl::CoordinateSystem2D&> inEllipseAlignment,
	int inFrameWidth,
	int inFrameHeight,
	avl::Region& outRegion,
	atl::Optional<avl::Rectangle2D&> outAlignedEllipse = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inEllipse const Rectangle2D&
Input value inEllipseAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the ellipse to the position of the inspected object
Input value inFrameWidth int 0 - 65535 Width of the created region's frame (not to be confused with the width of the ellipse!)
Input value inFrameHeight int 0 - 65535 Height of the created region's frame (not to be confused with the height of the ellipse!)
Output value outRegion Region& Output region
Output value outAlignedEllipse Optional<Rectangle2D&> NIL The input ellipse transformed to the absolute coordinate system

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outAlignedEllipse.

Read more about Optional Outputs.

Description

The operation creates a region containing pixels lying inside an ellipse which is described by its bounding rectangle.

The inFrameWidth and inFrameHeight parameters most often should be set equal to the dimensions of the image this region will be used with. If the input ellipse exceeds these dimensions, the output region will be cropped.

Hints

  • Remember to set inFrameWidth and inFrameHeight inputs to specify the region frame.

Examples

CreateEllipseRegion run with a sample rectangle.

See Also