IMVBlobCounter2
The IMVBlobCounter2 interface extends the IMVBlobCounter interface.
Methods:
| CalculateBlobProperties | Calculate blob properties (position, angle, area, ...). |
| GetAngle | Get the angle of the blob. |
| GetArea | Get the contour area. |
| GetEnclosingCircle | Get the enclosing circle (center + radius). |
| GetFittingEllipse | Get the fitting elipse. |
| GetPerimeter | Get the contour perimeter. |
| GetUprightBoundingRect | Get the upright bounding rectangle. |
| GetXCenterOfMass | Get the horizontal center of mass. |
| GetYCenterOfMass | Get the vertical center of mass. |
| IsConvex | Get the convexity flag (blob convex = TRUE, otherwise FALSE). |
Header file: IMVBlobCounter.h
Interface definition language file: IMVBlobCounter.idl
Typelib: MVBlobCounter
Interface ID: IID_IMVBlobCounter2
Property IMVBlobCounter2::CalculateBlobProperties
Declaration: Property Get/Put CalculateBlobProperties As BooleanCalculate blob properties (position, angle, area, ...). TRUE enables the calculation.
C Prototype:HRESULT put_CalculateBlobProperties(VARIANT_BOOL newVal);
HRESULT get_CalculateBlobProperties(VARIANT_BOOL *pVal);
Method IMVBlobCounter2::GetAngle
Declaration: Function GetAngle(iBlob As Long) As DoubleGet the angle of the blob in degrees.
Parameter:
C Prototype:
iBlob The index of the blob. HRESULT GetAngle(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter2::GetArea
Declaration: Function GetArea(iBlob As Long) As DoubleGet the contour area.
Parameter:
C Prototype:
iBlob The index of the blob. HRESULT GetArea(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter2::GetEnclosingCircle
Declaration: Sub GetEnclosingCircle(iBlob As Long, CenterX As Double, CenterY As Double, Radius As Double)Get the enclosing circle (center + radius).
Parameter:
C Prototype:
iBlob The index of the blob. CenterX Horizontal center of the circle. CenterY Vertical center of the circle. Radius Radius of the circle. HRESULT GetEnclosingCircle(LONG iBlob, DOUBLE CenterX, DOUBLE CenterY, DOUBLE Radius);
Method IMVBlobCounter2::GetFittingEllipse
Declaration: Sub GetFittingEllipse(iBlob As Long, CenterX As Double, CenterY As Double, MajorAxis As Double, MinorAxis As Double, Angle As Double)Get the fitting elipse.
Parameter:
C Prototype:
iBlob The index of the blob. CenterX Horizontal center of the ellipse. CenterY Vertical center of the ellipse. MajorAxis Length of the major axis. MinorAxis Length of the minor axis. Angle Angle of the ellipse. HRESULT GetFittingEllipse(LONG iBlob, DOUBLE CenterX, DOUBLE CenterY, DOUBLE MajorAxis, DOUBLE MinorAxis, DOUBLE Angle);
Method IMVBlobCounter2::GetPerimeter
Declaration: Function GetPerimeter(iBlob As Long) As DoubleGet the contour perimeter.
Parameter:
C Prototype:
iBlob The index of the blob. HRESULT GetPerimeter(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter2::GetUprightBoundingRect
Declaration: Sub GetUprightBoundingRect(iBlob As Long, xOffset As Double, yOffset As Double, Width As Double, Height As Double)Get the upright bounding rectangle.
Parameter:
C Prototype:
iBlob The index of the blob. xOffset Horizontal offset of the rectangle. yOffset Vertical offset of the rectangle. Width Width of the rectangle. Height Height of the rectangle. HRESULT GetUprightBoundingRect(LONG iBlob, DOUBLE xOffset, DOUBLE yOffset, DOUBLE Width, DOUBLE Height);
Method IMVBlobCounter2::GetXCenterOfMass
Declaration: Function GetXCenterOfMass(iBlob As Long) As DoubleGet the horizontal center of mass.
Parameter:
C Prototype:
iBlob The index of the blob. HRESULT GetXCenterOfMass(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter2::GetYCenterOfMass
Declaration: Function GetYCenterOfMass(iBlob As Long) As DoubleGet the vertical center of mass.
Parameter:
C Prototype:
iBlob The index of the blob. HRESULT GetYCenterOfMass(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter2::IsConvex
Declaration: Function IsConvex(iBlob As Long) As BooleanGet the convexity flag (blob convex = TRUE, otherwise FALSE).
Parameter:
C Prototype:
iBlob The index of the blob. HRESULT IsConvex(LONG iBlob, VARIANT_BOOL* value);