Click or drag to resize

RegionsOperatorsmaRgnCentroidXY Method

The X,Y coordinates of the centroid of the region boundary.

Namespace:  MediaCy.IQL.Operators
Assembly:  MediaCy.IQL.Operators (in MediaCy.IQL.Operators.dll) Version: 3.1.0.0
Syntax
VB
<ExtensionAttribute>
Public Shared Function maRgnCentroidXY ( 
	regions As McRegions
) As McMeasure

Parameters

regions
Type: MediaCy.IQL.FeaturesMcRegions

Return Value

Type: McMeasure

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type McRegions. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The spatially calibrated coordinates of the geometric centroid of each region boundary is returned as a length-2 array, X followed by Y. The Value for N regions is exposed as a 2-dimensional array of 2 by N. The geometric centroid is the mean position of the center of the line segments making up the boundary polygon, weighted by the length of each segment. The centroid position may fall outside of the boundary for regions with unusual shapes (e.g., a crescent moon shape); the mRgnIllFormed measurement can detect this condition. This is a boundary polygon-based measurement. So sub-pixel boundary vertex locations are significant. See mRgnPixelCentroidX and mRgnPixelCentroidY for the pixel-based centroid.
See Also