C# Class OpenCvSharp.Blob.CvBlob

显示文件 Open project: shimat/opencvsharp Class Usage Examples

Public Methods

Method Description
Angle ( ) : double

Calculates angle orientation of a blob. This function uses central moments so cvCentralMoments should have been called before for this blob. (cvAngle)

CalcCentroid ( ) : Point2d

Calculates centroid. Centroid will be returned and stored in the blob structure. (cvCentroid)

Clone ( ) : CvBlob

CvBlob ( ) : System

Constructor

SaveImage ( string fileName, Mat img ) : void

Save the image of a blob to a file. The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure. Then the function saves a copy of the part of the image where the blob is.

SetMoments ( ) : void

Set central/hu moments and centroid value from moment values (M**)

Private Methods

Method Description
CvBlob ( int label, int x, int y ) : System

Method Details

Angle() public method

Calculates angle orientation of a blob. This function uses central moments so cvCentralMoments should have been called before for this blob. (cvAngle)
public Angle ( ) : double
return double

CalcCentroid() public method

Calculates centroid. Centroid will be returned and stored in the blob structure. (cvCentroid)
public CalcCentroid ( ) : Point2d
return Point2d

Clone() public method

public Clone ( ) : CvBlob
return CvBlob

CvBlob() public method

Constructor
public CvBlob ( ) : System
return System

SaveImage() public method

Save the image of a blob to a file. The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure. Then the function saves a copy of the part of the image where the blob is.
public SaveImage ( string fileName, Mat img ) : void
fileName string Name of the file.
img Mat Image.
return void

SetMoments() public method

Set central/hu moments and centroid value from moment values (M**)
public SetMoments ( ) : void
return void