IMVBlobFinder
This interface is exposed to allow programmatic control of the filter. Read the filter description to see how the filter is used.
| Angle | Gets the angle for the current contour. |
| AngleXPos | X-position for the angle output text. |
| AngleYPos | Y-position for the angle output text. |
| ApproxContourAccuracy | Accuracy value for the approximation algorithm. |
| Area | Gets the area for the current contour. |
| AreaXPos | X-position for the area output text. |
| AreaYPos | Y-position for the area output text. |
| BoundingRect | Gets the upright bounding rect for the current contour. |
| CalcAngle | Enables the calculation of the contour angle. |
| CalcArea | Enables the calculation of the contour area. |
| CalcHu | Enables the calculation of the contour hu invariants. |
| CalcMinBoundingRect | Enables the calculation of the contour min bounding rectangle. |
| CalcPerimeter | Enables the calculation of the contour perimeter. |
| CalcUprightBoundingRect | Enables the calculation of the contour upright bounding rectangle. |
| CurrentContour | Returns the current contour |
| DrawAngle | Enables drawing of angle output text into the output image |
| DrawArea | Enables drawing of area output text into the output image |
| DrawContour | Draws contours into the output image. |
| DrawHu | Enables drawing of hu invariants output text into the output image |
| DrawMinBoundingRect | Enables drawing of the contours min bounding rectangle into the output image |
| DrawPerimeter | Enables drawing of perimeter output text into the output image |
| DrawUprightBoundingRect | Enables drawing of the contours upright bounding rectangle into the output image |
| EnableFilter | Enables the contour filter. |
| EnableHuFilter | Enables the hu invariants contour filter. |
| EnableSizeFilter | Enables the size contour filter. |
| HuInvariants | Get the hu invariants for the current contour. |
| HuXPos | X-position for the hu invariants output text. |
| HuYPos | Y-position for the hu invariants output text. |
| MaxHeight | Maximal contour height. |
| MaxHuInvariants | Maximum contour hu invariants. |
| MaxWidth | Maximal contour width. |
| MinBoundingRect | Get the min bounding rect for the current contour. |
| MinHeight | Minimal contour height. |
| MinHuInvariants | Minimum contour hu invariants. |
| MinWidth | Minimal contour width. |
| Moments | Gets the moments for the current contour. |
| ObjectFound | Gets the result from the current contour search. |
| Perimeter | Gets the perimeter for the current contour. |
| PerimeterXPos | X-position for the perimeter output text. |
| PerimeterYPos | X-position for the perimeter output text. |
| RetrievalMode | Sets the retrieval mode. |
| UseApproxContour | Calculates an approximate contour. |
| UseConvexHull | Calculates the convex hull. |
| UseMinBoundigRectAngle | Uses the min bounding rect angle for angle output. |
Header file: IMVBlobFinder.h
Interface definition language file: IMVBlobFinder.idl
Typelib: MVBlobFinder
Interface ID: IID_IMVBlobFinder
Declaration: Property Get Angle As DoubleGets the angle for the current contour. This is a read only property.
Prototype:HRESULT get_Angle(DOUBLE* value);
Property IMVBlobFinder::AngleXPos
Declaration: Property Get/Put AngleXPos As LongX-position for the angle output text.
Prototype:HRESULT put_AngleXPos(LONG value);
HRESULT get_AngleXPos(LONG* value);
Property IMVBlobFinder::AngleYPos
Declaration: Property Get/Put AngleYPos As LongY-position for the angle output text.
Prototype:HRESULT put_AngleYPos(LONG value);
HRESULT get_AngleYPos(LONG* value);
Property IMVBlobFinder::ApproxContourAccuracy
Declaration: Property Get/Put ApproxContourAccuracy As DoubleAccurency value for the approximation algorithm.
Prototype:HRESULT put_ApproxContourAccuracy(DOUBLE value);
HRESULT get_ApproxContourAccuracy(DOUBLE* value);
Declaration: Property Get Area As DoubleGet the area for the current contour.
Prototype:HRESULT put_Area(DOUBLE value);
HRESULT get_Area(DOUBLE* value);
Property IMVBlobFinder::AreaXPos
Declaration: Property Get/Put AreaXPos As LongX-position for the area output text.
Prototype:HRESULT put_AreaXPos(LONG value);
HRESULT get_AreaXPos(LONG* value);
Property IMVBlobFinder::AreaYPos
Declaration: Property Get/Put AreaYPos As LongY-position for the area output text.
Prototype:HRESULT put_AreaYPos(LONG value);
HRESULT get_AreaYPos(LONG* value);
Property IMVBlobFinder::BoundingRect
Declaration: Property Get BoundingRect As _MV_RECTGet the upright bounding rect for the current contour. This is a read only property.
Prototype:HRESULT get_BoundingRect(MV_RECT* rect);
Property IMVBlobFinder::CalcAngle
Declaration: Property Get/Put CalcAngle As LongEnables the calculation of the contour angle.
Prototype:HRESULT put_CalcAngle(LONG value);
HRESULT get_CalcAngle(LONG* value);
Property IMVBlobFinder::CalcArea
Declaration: Property Get/Put CalcArea As LongEnables the calculation of the contour area.
Prototype:HRESULT put_CalcArea(LONG value);
HRESULT get_CalcArea(LONG* value);
Property IMVBlobFinder::CalcHu
Declaration: Property Get/Put CalcHu As LongEnables the calculation of the contour hu invariants.
Prototype:HRESULT put_CalcHu(LONG value);
HRESULT get_CalcHu(LONG* value);
Property IMVBlobFinder::CalcMinBoundingRect
Declaration: Property Get/Put CalcMinBoundingRect As LongEnables the calculation of the contour min bounding rectangle.
Prototype:HRESULT put_CalcMinBoundingRect(LONG value);
HRESULT get_CalcMinBoundingRect(LONG* value);
Property IMVBlobFinder::CalcPerimeter
Declaration: Property Get/Put CalcPerimeter As LongEnable the calculation of the contour perimeter.
Prototype:HRESULT put_CalcPerimeter(LONG value);
HRESULT get_CalcPerimeter(LONG* value);
Property IMVBlobFinder::CalcUprightBoundingRect
Declaration: Property Get/Put CalcUprightBoundingRect As LongEnables the calculation of the contour upright bounding rectangle.
Prototype:HRESULT put_CalcUprightBoundingRect(LONG value);
HRESULT get_CalcUprightBoundingRect(LONG* value);
Method IMVBlobFinder::CurrentContour
Declaration: Sub CurrentContour(pContour As _MV_POINT, cMax As Long, cCount As Long)Return the current contour
Parameter:
pContour Array with _MV_POINT structures for the current contour points. cMax The cont of _MV_POINT structures in pContour. cCount Returns the available contour point in pContour. If cMax points in pContour is to small for the current blob contour or pContour = NULL the method returns E_INVALIDARG. In this case cCount contains the current size for the contour. Call the method again with a pCountour with cCount _MV_POINT structures.
Prototype:HRESULT CurrentContour(MV_POINT* pContour, LONG cMax, LONG* cCount);
Property IMVBlobFinder::DrawAngle
Declaration: Property Get/Put DrawAngle As LongEnables drawing of angle output text into the output image
Prototype:HRESULT put_DrawAngle(LONG value);
HRESULT get_DrawAngle(LONG* value);
Property IMVBlobFinder::DrawArea
Declaration: Property Get/Put DrawArea As LongEnables drawing of area output text into the output image
Prototype:HRESULT put_DrawArea(LONG value);
HRESULT get_DrawArea(LONG* value);
Property IMVBlobFinder::DrawContour
Declaration: Property Get/Put DrawContour As LongDraw countours into the output image.
Prototype:HRESULT put_DrawContour(LONG value);
HRESULT get_DrawContour(LONG* value);
Property IMVBlobFinder::DrawHu
Declaration: Property Get/Put DrawHu As LongEnables drawing of hu invariants output text into the output image
Prototype:HRESULT put_DrawHu(LONG value);
HRESULT get_DrawHu(LONG* value);
Property IMVBlobFinder::DrawMinBoundingRect
Declaration: Property Get/Put DrawMinBoundingRect As LongEnables drawing of the contours min bounding rectangle into the output image
Prototype:HRESULT put_DrawMinBoundingRect(LONG value);
HRESULT get_DrawMinBoundingRect(LONG* value);
Property IMVBlobFinder::DrawPerimeter
Declaration: Property Get/Put DrawPerimeter As LongEnables drawing of perimeter output text into the output image
Prototype:HRESULT put_DrawPerimeter(LONG value);
HRESULT get_DrawPerimeter(LONG* value);
Property IMVBlobFinder::DrawUprightBoundingRect
Declaration: Property Get/Put DrawUprightBoundingRect As LongEnables drawing of the contours upright bounding rectangle into the output image
Prototype:HRESULT put_DrawUprightBoundingRect(LONG value);
HRESULT get_DrawUprightBoundingRect(LONG* value);
Property IMVBlobFinder::EnableFilter
Declaration: Property Get/Put EnableFilter As LongEnables the contour filter.
Prototype:HRESULT put_EnableFilter(LONG value);
HRESULT get_EnableFilter(LONG* value);
Property IMVBlobFinder::EnableHuFilter
Declaration: Property Get/Put EnableHuFilter As LongEnable the hu invariants contour filter.
Prototype:HRESULT put_EnableHuFilter(LONG value);
HRESULT get_EnableHuFilter(LONG* value);
Property IMVBlobFinder::EnableSizeFilter
Declaration: Property Get/Put EnableSizeFilter As LongEnable the size contour filter.
Prototype:HRESULT put_EnableSizeFilter(LONG value);
HRESULT get_EnableSizeFilter(LONG* value);
Property IMVBlobFinder::HuInvariants
Declaration: Property Get HuInvariants As _MV_HU_MOMENTSGet the hu invariants for the current contour. This is a read only property.
Prototype:HRESULT get_HuInvariants(MV_HU_MOMENTS* hu);
Property IMVBlobFinder::HuXPos
Declaration: Property Get/Put HuXPos As LongX-position for the hu invariants output text.
Prototype:HRESULT put_HuXPos(LONG value);
HRESULT get_HuXPos(LONG* value);
Property IMVBlobFinder::HuYPos
Declaration: Property Get/Put HuYPos As LongY-position for the hu invariants output text.
Prototype:HRESULT put_HuYPos(LONG value);
HRESULT get_HuYPos(LONG* value);
Property IMVBlobFinder::MaxHeight
Declaration: Property Get/Put MaxHeight As LongMaximal contour height.
Prototype:HRESULT put_MaxHeight(LONG value);
HRESULT get_MaxHeight(LONG* value);
Property IMVBlobFinder::MaxHuInvariants
Declaration: Property Get/Put MaxHuInvariants As _MV_HU_MOMENTSMaximum contour hu invariants.
Prototype:HRESULT put_MaxHuInvariants(MV_HU_MOMENTS hu);
HRESULT get_MaxHuInvariants(MV_HU_MOMENTS* hu);
Property IMVBlobFinder::MaxWidth
Declaration: Property Get/Put MaxWidth As LongMaximal contour width.
Prototype:HRESULT put_MaxWidth(LONG value);
HRESULT get_MaxWidth(LONG* value);
Property IMVBlobFinder::MinBoundingRect
Declaration: Property Get MinBoundingRect As _MV_POINT()Get the min bounding rect for the current contour. This is a read only property. The MinBoundingRect is an Array with four MV_POINT values.
Prototype:HRESULT get_MinBoundingRect(MV_POINT* value);
Property IMVBlobFinder::MinHeight
Declaration: Property Get/Put MinHeight As LongMinimal contour height.
Prototype:HRESULT put_MinHeight(LONG value);
HRESULT get_MinHeight(LONG* value);
Property IMVBlobFinder::MinHuInvariants
Declaration: Property Get/Put MinHuInvariants As _MV_HU_MOMENTSMinimum contour hu invariants.
Prototype:HRESULT put_MinHuInvariants(MV_HU_MOMENTS hu);
HRESULT get_MinHuInvariants(MV_HU_MOMENTS* hu);
Property IMVBlobFinder::MinWidth
Declaration: Property Get/Put MinWidth As LongMinimal contour width.
Prototype:HRESULT put_MinWidth(LONG value);
HRESULT get_MinWidth(LONG* value);
Property IMVBlobFinder::Moments
Declaration: Property Get Moments As _MV_MOMENTSGet the moments for the current contour.
Prototype:HRESULT get_Moments(_MV_MOMENTS* moments);
Property IMVBlobFinder::ObjectFound
Declaration: Property Get ObjectFound As LongGet the result from the current contour search. This is a read only property.
Prototype:HRESULT get_ObjectFound(LONG* value);
Property IMVBlobFinder::Perimeter
Declaration: Property Get Perimeter As DoubleGet the perimeter for the current contour.
Prototype:HRESULT put_Perimeter(DOUBLE value);
HRESULT get_Perimeter(DOUBLE* value);
Property IMVBlobFinder::PerimeterXPos
Declaration: Property Get/Put PerimeterXPos As LongX-position for the perimeter output text.
Prototype:HRESULT put_PerimeterXPos(LONG value);
HRESULT get_PerimeterXPos(LONG* value);
Property IMVBlobFinder::PerimeterYPos
Declaration: Property Get/Put PerimeterYPos As LongX-position for the perimeter output text.
Prototype:HRESULT put_PerimeterYPos(LONG value);
HRESULT get_PerimeterYPos(LONG* value);
Property IMVBlobFinder::RetrievalMode
Declaration: Property Get/Put RetrievalMode As LongSet the retrival mode.
Prototype:HRESULT put_RetrievalMode(LONG value);
HRESULT get_RetrievalMode(LONG* value);
Property IMVBlobFinder::UseApproxContour
Declaration: Property Get/Put UseApproxContour As LongCalculate an approximate contour.
Prototype:HRESULT put_UseApproxContour(LONG value);
HRESULT get_UseApproxContour(LONG* value);
Property IMVBlobFinder::UseConvexHull
Declaration: Property Get/Put UseConvexHull As LongCalculate the convex hull.
Prototype:HRESULT put_UseConvexHull(LONG value);
HRESULT get_UseConvexHull(LONG* value);
Property IMVBlobFinder::UseMinBoundigRectAngle
Declaration: Property Get/Put UseMinBoundigRectAngle As LongUse the min boundig rect angle for angle output.
Prototype:HRESULT put_UseMinBoundigRectAngle(LONG value);
HRESULT get_UseMinBoundigRectAngle(LONG* value);
Filter specific structures and enumerators
typedef struct
_MV_MOMENTS
{
double m00, m10, m01, m20, m11, m02, m30, m21,
m12, m03; /* spatial moments */
double mu20, mu11, mu02, mu30, mu21, mu12, mu03;
/* central moments */
double inv_sqrt_m00; /* m00 != 0 ? 1/sqrt(m00) :
0 */
}MV_MOMENTS;
typedef struct
_MV_HU_MOMENTS
{
double hu1, hu2, hu3, hu4, hu5, hu6, hu7; /* hu
invariants */
}MV_HU_MOMENTS;
typedef struct
_MV_RECT
{
int x;
int y;
int width;
int height;
}MV_RECT;
typedef struct _MV_POINT
{
int x;
int y;
}MV_POINT;