Table of Contents

Method FromContour

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

FromContour(Seq)

Returns a ConnectedComponent derived from the spatial moments of the specified polygon.

public static ConnectedComponent FromContour(Seq currentContour)

Parameters

currentContour Seq

The polygon from which to derive the spatial moments used to initialize the ConnectedComponent.

Returns

ConnectedComponent

A ConnectedComponent object derived from the spatial moments of the polygon. If the area of the connected component is zero, the centroid and orientation angle will be set to NaN.