You are here: Start » AVL.NET » AVL.RegionMassCenter
Computes a point with coordinates equal to the average coordinates of the region's pixels.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void RegionMassCenter ( AvlNet.Region inRegion, out AvlNet.Point2D outMassCenter )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inRegion | AvlNet.Region | Input region. | |||
outMassCenter | AvlNet.Point2D |
Description
The operation computes the average of all pixel locations contained in a region. Note that the result is a Point2D, not a Location as its coordinates may be not-integer.
Examples
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Input region area above 2^30 in RegionMassCenter. |
DomainError | Input region is empty in RegionMassCenter. |
DomainError | Point-run length above 2^15 in RegionMassCenter. |