Table of Contents

Class ConnectedComponent

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

Represents a collection of measurements extracted from a cluster of connected pixels in an image.

public class ConnectedComponent
Inheritance
ConnectedComponent
Inherited Members

Properties

Area

Gets or sets the number of pixels in the connected component.

Centroid

Gets or sets the center of mass of the connected component.

Contour

Gets or sets the polygonal contour from which the connected component properties were extracted. This property might be null if the connected component was created from an image.

MajorAxisLength

Gets or sets the length, in pixels, of the major axis of the ellipse fit to the connected component.

MinorAxisLength

Gets or sets the length, in pixels, of the minor axis of the ellipse fit to the connected component.

Orientation

Gets or sets the angle, in radians, between the x-axis and the major axis of the ellipse fit to the connected component.

Patch

Gets or sets the image subregion corresponding to the bounding box of the connected component. This property might be null if the connected component was created from a polygonal contour.

Methods

FromContour(Seq)

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

FromImage(IplImage, bool)

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

FromMoments(Moments)

Returns a ConnectedComponent derived from the spatial moments of a polygon or rasterized shape.