You are here: Start » AVL.NET » Function Reference » Region » Region Features » AVL.RegionBoundingCircle
Computes the smallest circle enclosing a region.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void RegionBoundingCircle ( AvlNet.Region inRegion, out AvlNet.Circle2D outBoundingCircle )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inRegion | AvlNet.Region | Input region. | |||
outBoundingCircle | AvlNet.Circle2D |
Examples
Following example draws a red circle 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(mountsImage, circle, red, style); } }
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty region on input in RegionBoundingCircle. |