Table of Contents

Method FromImage

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

FromImage(IplImage, bool)

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

public static ConnectedComponent FromImage(IplImage image, bool binary = false)

Parameters

image IplImage

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

binary bool

Specifies whether all non-zero pixels should be treated as having a weight of one.

Returns

ConnectedComponent

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