IMVBlobCounter3

The IMVBlobCounter3 interface extends the IMVBlobCounter2 interface.

Methods:

CalculateAverageColor Calculate the average color/grey value for every blob.
DrawAverageColor Redraw every blob using its average color/grey value.
GetAverageColor Get the average blob color/grey value.
GetHeight Get the blob height.
GetHuInvariants Get the Hu invariants.
GetMinimumBoundingRect Get the minimum bounding rectangle.
GetMoments Get the moments.
GetWidth Get the blob width.
IsHole Is it a blob or a hole inside a blob?.
SortBlobs Sort blobs by specified criteria.
SortBlobsBy Criteria for blob sorting.
UseRectSizeForFiltering Use the width and the length of the minimum bouding rect for the blob size filter.

Header file: IMVBlobCounter.h
Interface definition language file: IMVBlobCounter.idl
Typelib: MVBlobCounter
Interface ID: IID_IMVBlobCounter3


Property IMVBlobCounter3::CalculateAverageColor

Declaration: Property Get/Put CalculateAverageColor As Boolean

Calculate the average color/grey value for every blob.

C Prototype:

HRESULT put_CalculateAverageColor(VARIANT_BOOL newVal);
HRESULT get_CalculateAverageColor(VARIANT_BOOL *pVal);


Property IMVBlobCounter3::DrawAverageColor

Declaration: Property Get/Put DrawAverageColor As Boolean

Redraw every blob using its average color/grey value.

C Prototype:

HRESULT put_DrawAverageColor(VARIANT_BOOL newVal);
HRESULT get_DrawAverageColor(VARIANT_BOOL *pVal);


Method IMVBlobCounter3::GetAverageColor

Declaration: Function GetAverageColor(iBlob As Long) As Long

Get the average blob color/grey value.

Parameter:

iBlob Blob index.
C Prototype:

HRESULT GetAverageColor(LONG iBlob, LONG* value);


Method IMVBlobCounter3::GetHeight

Declaration: Function GetHeight(iBlob As Long) As Double

Get the blob height.

Parameter:

iBlob Blob index.
C Prototype:

HRESULT GetHeight(LONG iBlob, DOUBLE* value);


Method IMVBlobCounter3::GetHuInvariants

Declaration: Function GetHuInvariants(iBlob As Long) As _MV_HU_MOMENTS

Get the Hu invariants.

Parameter:

iBlob Blob index.
C Prototype:

HRESULT GetHuInvariants(LONG iBlob, _MV_HU_MOMENTS* value);


Method IMVBlobCounter3::GetMinimumBoundingRect

Declaration: Sub GetMinimumBoundingRect(iBlob As Long, xOffset As Double, yOffset As Double, Width As Double, Height As Double, Angle As Double)

Get the minimum bounding rectangle.

Parameter:

iBlob Blob index.
xOffset X offset of the rectangle in pixel.
yOffset X offset of the rectangle in pixel.
Width Width of the rectangle in pixel.
Height Height of the rectangle in pixel.
Angle Angle of the rectangle.
C Prototype:

HRESULT GetMinimumBoundingRect(LONG iBlob, DOUBLE* xOffset, DOUBLE* yOffset, DOUBLE* Width, DOUBLE* Height, DOUBLE* Angle);


Method IMVBlobCounter3::GetMoments

Declaration: Function GetMoments(iBlob As Long) As _MV_MOMENTS

Get the moments.

Parameter:

iBlob Blob index.
C Prototype:

HRESULT GetMoments(LONG iBlob, _MV_MOMENTS* value);


Method IMVBlobCounter3::GetWidth

Declaration: Function GetWidth(iBlob As Long) As Double

Get the blob width.

Parameter:

iBlob Blob index.
C Prototype:

HRESULT GetWidth(LONG iBlob, DOUBLE* value);


Method IMVBlobCounter3::IsHole

Declaration: Function IsHole(iBlob As Long) As Boolean

Is it a blob or a hole inside a blob?.

Parameter:

iBlob Blob index.
C Prototype:

HRESULT IsHole(LONG iBlob, VARIANT_BOOL* value);


Property IMVBlobCounter3::SortBlobs

Declaration: Property Get/Put SortBlobs As Boolean

Sort blobs by specified criteria.

C Prototype:

HRESULT put_SortBlobs(VARIANT_BOOL newVal);
HRESULT get_SortBlobs(VARIANT_BOOL *pVal);


Property IMVBlobCounter3::SortBlobsBy

Declaration: Property Get/Put SortBlobsBy As Long

Criteria for blob sorting.

Criteria

Value

MV_SORT_BY_AREA

0

MV_SORT_BY_PERIMETER

1

MV_SORT_BY_ANGLE

2

MV_SORT_BY_CIRCLE_RADIUS

3

MV_SORT_BY_HORIZONTAL_POSITION

4

MV_SORT_BY_VERTICAL_POSITION

5

MV_SORT_BY_WIDTH

6

MV_SORT_BY_HEIGHT

7

MV_SORT_BY_GREYVALUE

8

C Prototype:

HRESULT put_SortBlobsBy(LONG newVal);
HRESULT get_SortBlobsBy(LONG *pVal);


Property IMVBlobCounter3::UseRectSizeForFiltering

Declaration: Property Get/Put UseRectSizeForFiltering As Boolean

Use the width and the length of the minimum bouding rect for the blob size filter.

C Prototype:

HRESULT put_UseRectSizeForFiltering(VARIANT_BOOL newVal);
HRESULT get_UseRectSizeForFiltering(VARIANT_BOOL *pVal);