You are here: Start » AVL.NET » AVL.RegionMassCenter(AvlNet.Region, AvlNet.Point2D)

AVL.RegionMassCenter(AvlNet.Region, AvlNet.Point2D)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void RegionMassCenter(
	AvlNet.Region inRegion,
	out AvlNet.Point2D outMassCenter
)

Parameters

inRegion
Type: AvlNet.Region
outMassCenter
Type: 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

The resulting outMassCenter point drawn onto the sample region.

Errors

Error type Description
DomainError Input region is empty in RegionMassCenter.
DomainError Input region area above 2^30 in RegionMassCenter.
DomainError Point-run length above 2^15 in RegionMassCenter.

See also