Method FromImage
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
IplImageThe image from which to derive the spatial moments used to initialize the ConnectedComponent.
binary
boolSpecifies 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.