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 BooleanCalculate 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 BooleanRedraw 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 LongGet the average blob color/grey value.
Parameter:
C Prototype:
iBlob Blob index. HRESULT GetAverageColor(LONG iBlob, LONG* value);
Method IMVBlobCounter3::GetHeight
Declaration: Function GetHeight(iBlob As Long) As DoubleGet the blob height.
Parameter:
C Prototype:
iBlob Blob index. HRESULT GetHeight(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter3::GetHuInvariants
Declaration: Function GetHuInvariants(iBlob As Long) As _MV_HU_MOMENTSGet the Hu invariants.
Parameter:
C Prototype:
iBlob Blob index. 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:
C Prototype:
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. 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_MOMENTSGet the moments.
Parameter:
C Prototype:
iBlob Blob index. HRESULT GetMoments(LONG iBlob, _MV_MOMENTS* value);
Method IMVBlobCounter3::GetWidth
Declaration: Function GetWidth(iBlob As Long) As DoubleGet the blob width.
Parameter:
C Prototype:
iBlob Blob index. HRESULT GetWidth(LONG iBlob, DOUBLE* value);
Method IMVBlobCounter3::IsHole
Declaration: Function IsHole(iBlob As Long) As BooleanIs it a blob or a hole inside a blob?.
Parameter:
C Prototype:
iBlob Blob index. HRESULT IsHole(LONG iBlob, VARIANT_BOOL* value);
Property IMVBlobCounter3::SortBlobs
Declaration: Property Get/Put SortBlobs As BooleanSort 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 LongCriteria for blob sorting.
C Prototype:
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
HRESULT put_SortBlobsBy(LONG newVal);
HRESULT get_SortBlobsBy(LONG *pVal);
Property IMVBlobCounter3::UseRectSizeForFiltering
Declaration: Property Get/Put UseRectSizeForFiltering As BooleanUse 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);