Polygon AreaCenter Method Cognex VisionPro 9.25 SR1

Compute the centroid of this polygon. Generates an error if there are fewer than 3 vertices.

Namespace: Cognex.Vision
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.25.1.0
Syntax

public void AreaCenter(
	out double x,
	out double y
)

Parameters

x
Type: System Double 
X-coordinate of the center.
y
Type: System Double 
Y-coordinate of the center.
Exceptions

ExceptionCondition
ShapeExceptionNumVertices < 3.
Remarks

Computes the centroid of this polygon. The polygon must have at least three vertices. If the polygon is Complex, the value that AreaCenter() computes will not be valid, but AreaCenter() will not return an error. For Complex polygons use ArcCenter() instead.

See Also