You are here: Start » AVL.NET » AVL.RegionBoundingCircle(AvlNet.Region, AvlNet.Circle2D)

AVL.RegionBoundingCircle(AvlNet.Region, AvlNet.Circle2D)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void RegionBoundingCircle(
	AvlNet.Region inRegion,
	out AvlNet.Circle2D outBoundingCircle
)

Parameters

inRegion
Type: AvlNet.Region
outBoundingCircle
Type: AvlNet.Circle2D

Examples

The resulting outBoundingCircle circle drawn onto the input region.

Following example draws a red circles that bounds regions, which area is lower than 2000 pixels. It is a part of the bigger Blob Analysis Example.

            foreach (Region mount in mounts)
            {
                int area;
                AVL.RegionArea(mount, out area);
                if (area < 2000)
                {
                    Circle2D circle;
                    AVL.RegionBoundingCircle(mount, out circle);
                    AVL.DrawCircle(ref mountsImage, circle, red, style);
                }
            }

Errors

Error type Description
DomainError Empty region on input in RegionBoundingCircle.

See also