Blob (CVCBlob.dll) 15.0
Parameter Enquiry

Functions

cvbres_t BlobGetBoundingBox (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t &x, intptr_t &y, intptr_t &dx, intptr_t &dy)
 This function returns the bounding box of the object. More...
 
cvbres_t BlobGetCenter (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t &x, intptr_t &y)
 This function returns the centre of gravity of the object. More...
 
cvbres_t BlobGetCenterEx (PBLOB BlobHandle, cvbval_t BlobNum, double &dX, double &dY)
 This function returns the centre of gravity of the object in sub-pixels. More...
 
cvbres_t BlobGetConvex (PBLOB BlobHandle, cvbval_t BlobNum, double &ConvexPerimeter, double &ConvexArea, double &ConvexAreaRatio, double &ConvexPerimeterRatio)
 This function returns the convex parameters of a blob object. More...
 
cvbres_t BlobGetConvexPoints (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t *kx, intptr_t *ky)
 This function returns the points that lie on the approximated convex perimeter. More...
 
cvbres_t BlobGetEuler (PBLOB BlobHandle, cvbval_t BlobNum, cvbval_t &Euler)
 This function returns the Euler number of an object. More...
 
cvbres_t BlobGetExtractionMode (PBLOB BlobHandle, cvbval_t &lValue)
 This function returns the mode of the blob object. More...
 
cvbres_t BlobGetFeretDiameter (PBLOB BlobHandle, cvbval_t BlobNum, double *diameter, cvbval_t arrlen)
 This function returns the distance (diameter) between pairs of opposite lines of a convex projection. More...
 
cvbres_t BlobGetFeretDiameterAngle (PBLOB BlobHandle, cvbval_t BlobNum, double *diameter, double *angle, cvbval_t arrlen)
 This function returns the distance (diameter) between pairs of opposite lines of a convex projection and its angle. More...
 
cvbres_t BlobGetFeretDiamMax (PBLOB BlobHandle, cvbval_t BlobNum, double &min, double &max)
 This function returns the maximal distance between two lines of a line pair of a convex projection and the distance of the 90 degree line-pair. More...
 
cvbres_t BlobGetFeretDiamMaxAngle (PBLOB BlobHandle, cvbval_t BlobNum, double &min, double &max, double &anglemin, double &anglemax)
 This function returns the maximal distance between two lines of a line pair of a convex projection and the distance of the 90 degree projection and their angle. More...
 
cvbres_t BlobGetFeretDiamMaxBBox (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t *coordx, intptr_t *coordy, cvbval_t arrlen)
 This function returns four points of a bounding box using the maximum distance of a projection and the 90 degree line-pair. More...
 
cvbres_t BlobGetFeretDiamMin (PBLOB BlobHandle, cvbval_t BlobNum, double &min, double &max)
 This function returns the minimal distance between two lines of a line pair of a convex projection and the distance of the 90 degree line-pair. More...
 
cvbres_t BlobGetFeretDiamMinAngle (PBLOB BlobHandle, cvbval_t BlobNum, double &min, double &max, double &anglemin, double &anglemax)
 This function returns the minimal distance between two lines of a line pair of a convex projection and the distance of the 90 degree line-pair. More...
 
cvbres_t BlobGetFeretDiamMinBBox (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t *coordx, intptr_t *coordy, cvbval_t arrlen)
 This function returns four points of a bounding box using the minimal distance of a projection and the 90 degrees line-pair. More...
 
cvbres_t BlobGetFeretDiamMinMax (PBLOB BlobHandle, cvbval_t BlobNum, double &min, double &max)
 This function returns the minimal and maximal distance between two lines of a line pair of a convex projection. More...
 
cvbres_t BlobGetFeretDiamMinMaxAngle (PBLOB BlobHandle, cvbval_t BlobNum, double &min, double &max, double &anglemin, double &anglemax)
 This function returns the minimal and maximal distance between two lines of a line pair of a convex projection and their angles. More...
 
cvbres_t BlobGetFeretDiamMinMaxBBox (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t *coordx, intptr_t *coordy, cvbval_t arrlen)
 This function returns returns four points of a bounding box using the minimal and maximal distance between line pairs of a convex projection. More...
 
cvbres_t BlobGetMinMomentPoints (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t &x0, intptr_t &y0, intptr_t &x1, intptr_t &y1)
 This function returns the start point and end point of a straight line that describes the minimum moment of inertia and runs through the centre of the object. More...
 
cvbres_t BlobGetMoments (PBLOB BlobHandle, cvbval_t BlobNum, double &Min, double &Max, double &Ratio, double &MinAngle)
 This function reads the minimum and maximum moments of inertia, and the angle of the minimum moment of inertia. More...
 
cvbres_t BlobGetNumBlobs (PBLOB BlobHandle, cvbval_t &lNum)
 This function returns the number of objects . More...
 
cvbres_t BlobGetNumOfHoles (PBLOB BlobHandle, cvbval_t *lValue)
 This function gets the number of holes in the image. More...
 
cvbres_t BlobGetNumOfMeasHoles (PBLOB BlobHandle, cvbval_t lBlobNum, cvbval_t *plValue)
 This function returns the number of holes in the image. More...
 
cvbres_t BlobGetObjectFeatureRange (PBLOB BlobHandle, cvbval_t &lFeatureMin, cvbval_t &lFeatureMax)
 This function returns the grey scale range for binarization. More...
 
cvbres_t BlobGetObjectTouchBorder (PBLOB BlobHandle, cvbval_t &lMask)
 This function returns the criteria for touching the border of the Blob. More...
 
cvbres_t BlobGetPerimeter (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t &NumX, intptr_t &NumY, intptr_t &NumXY, double &Perimeter, double &Ratio)
 This function returns the perimeter of the object. More...
 
cvbres_t BlobGetResultImage (PBLOB BlobHandle, IMG Image, cvbdim_t PlaneIndex)
 This function returns the result image. More...
 
cvbres_t BlobLSGetOpenObjects (PBLOB BlobHandle, size_t &OpenObjects)
 Inquire the number of open (not finished) blobs. This means blob objects which reach across frame boundaries. The max number of open objects is half the image width. More...
 
cvbres_t BlobLSGetStartLine (PBLOB BlobHandle, size_t &StartLine)
 This function returns the startline of the current frame. So after initialization through a call to BlobLSStart this function returns 0. For each call to BlobLSNext this start line is incremented with the number of lines processed. More...
 

Detailed Description

Function Documentation

◆ BlobGetBoundingBox()

cvbres_t BlobGetBoundingBox ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t &  x,
intptr_t &  y,
intptr_t &  dx,
intptr_t &  dy 
)

This function returns the bounding box of the object.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]xLeft coordinate of the bounding box.
[out]yTop coordinate of the bounding box.
[out]dxWidth of the bounding box.
[out]dyHeight of the bounding box.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
Bounding box.
Examples:
Visual C++ - VC Blob Example

◆ BlobGetCenter()

cvbres_t BlobGetCenter ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t &  x,
intptr_t &  y 
)

This function returns the centre of gravity of the object.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]xx-coordinate of the centre of gravity of the object.
[out]yy-coordinate of the centre of gravity of the object.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Delphi - Delphi Blob Detection Example
Visual Basic - VB Blob Detection Example
Visual C++ - VC Blob Example

◆ BlobGetCenterEx()

cvbres_t BlobGetCenterEx ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  dX,
double &  dY 
)

This function returns the centre of gravity of the object in sub-pixels.

This function does the same as #BlobGetCenter, but the result is a sub-pixel float value.
Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]dXX-coordinate of the centre of gravity of the object.
[out]dYY-coordinate of the centre of gravity of the object.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Visual C++ - VC Blob Example

◆ BlobGetConvex()

cvbres_t BlobGetConvex ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  ConvexPerimeter,
double &  ConvexArea,
double &  ConvexAreaRatio,
double &  ConvexPerimeterRatio 
)

This function returns the convex parameters of a blob object.

Blob projects every object on to the x-axis at different angles. 
\a FeretNum (#BlobSetNumFeret) is the number of projections. The bounding box provides the projections for 0 degree and 90 degrees 
(projection on to y- and x-axes). Later, the projection diameter or calliper diameter is calculated from these projections for every angle. 
This supplies information on the orthogonal extent of the object in relation to the direction of projection.

The convex perimeter of the object can be calculated from the projections later. 
This is approximated by a polygon that consists of the individual projection parts. 
Calculation of the convex perimeter of an object is normally very compute-intensive.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]ConvexPerimeterConvex perimeter of the Blob object.
[out]ConvexAreaConvex area of the Blob object.
[out]ConvexAreaRatioRatio of area to convex area.
[out]ConvexPerimeterRatioRatio of perimeter to convex perimeter.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
Perimeter, Convex Perimeter, and Area
BlobGetPerimeter
BlobGetConvexPoints to get the coordinates of the convex shape
Examples:
Visual C++ - VC Blob Example

◆ BlobGetConvexPoints()

cvbres_t BlobGetConvexPoints ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t *  kx,
intptr_t *  ky 
)

This function returns the points that lie on the approximated convex perimeter.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob result for which to extract the convex perimeter points.
[out]kxPointer to an array that receives the x-coordinates of the convex perimeter points (note: the array must be big enough to hold BlobGetNumFeret integer values)
[out]kyPointer to an array that receives the y-coordinates of the convex perimeter points (note: the array must be big enough to hold BlobGetNumFeret integer values)
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32 Win64
Examples:
Visual C++ - VC Blob Example
Hints for drawing the shape as overlay:
In Visual C++ and Delphi the easiest way to paint the perimeter is to use the Display OCX method AddUserObject together with the PolyLine overlay plugin.

◆ BlobGetEuler()

cvbres_t BlobGetEuler ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
cvbval_t &  Euler 
)

This function returns the Euler number of an object.

E = 1 - NHOLES, where E is the Euler number and NHOLES is the number of holes in the object including holes that have been filtered out.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]EulerEuler number (1 - number of holes in an object).
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Visual C++ - VC Blob Example

◆ BlobGetExtractionMode()

cvbres_t BlobGetExtractionMode ( PBLOB  BlobHandle,
cvbval_t &  lValue 
)

This function returns the mode of the blob object.

Parameters
[in]BlobHandleHandle to the Blob object.
[out]lValueExtraction mode. Following extraction modes are possible:
CVC_BLOB_EXTRACT_SIZE,
CVC_BLOB_EXTRACT_PERIMETER,
CVC_BLOB_EXTRACT_PIXDATA,
CVC_BLOB_EXTRACT_CONVEX,
CVC_BLOB_EXTRACT_CENTER,
CVC_BLOB_EXTRACT_MOMENTS,
CVC_BLOB_EXTRACT_BBOX,
CVC_BLOB_EXTRACT_MEASUREMENT,
CVC_BLOB_EXTRACT_ALL,
CVC_BLOB_EXTRACT_NONE
Returns
>= 0 on success,
< 0 if an error occurs.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiameter()

cvbres_t BlobGetFeretDiameter ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double *  diameter,
cvbval_t  arrlen 
)

This function returns the distance (diameter) between pairs of opposite lines of a convex projection.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]diameterPointer to an array of doubles which can hold number of projections (BlobSetNumFeret) times the size of double (8 Byte).
[out]arrlenSize of the array in doubles.
For example if you call BlobSetNumFeret and you specify 10 projections the size of the array should be at least 80 Byte and arrlen should be at least 10.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiameterAngle()

cvbres_t BlobGetFeretDiameterAngle ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double *  diameter,
double *  angle,
cvbval_t  arrlen 
)

This function returns the distance (diameter) between pairs of opposite lines of a convex projection and its angle.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]diameterDistance between the pairs of lines of a convex projection.
Pointer to an array of doubles which can hold number of projections (BlobSetNumFeret) times the size of double (8 Byte).
[out]angleAngle of a convex projection.
Pointer to an array of doubles which can hold number of projections (BlobSetNumFeret) times the size of double (8 Byte).
[out]arrlenSize of the array in doubles.
For example if you call BlobSetNumFeret and you specify 10 projections the size of the array should be at least 80 Byte and arrlen should be at least 10.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Visual C++ - VC Blob Example

◆ BlobGetFeretDiamMax()

cvbres_t BlobGetFeretDiamMax ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  min,
double &  max 
)

This function returns the maximal distance between two lines of a line pair of a convex projection and the distance of the 90 degree line-pair.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]minDistance of the line pair which has a 90 degree angle to the line pair with the maximum distance.
[out]maxMaximal distance between two lines of a line pair of a convex projection.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiamMaxAngle()

cvbres_t BlobGetFeretDiamMaxAngle ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  min,
double &  max,
double &  anglemin,
double &  anglemax 
)

This function returns the maximal distance between two lines of a line pair of a convex projection and the distance of the 90 degree projection and their angle.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]minDistance of the line pair which has a 90 degree angle to the line pair with the maximum distance.
[out]maxMaximal distance between two lines of a line pair of a convex projection.
[out]anglemin90 degree to anglemax.
[out]anglemaxAngle of the projection with the maximal distance.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiamMaxBBox()

cvbres_t BlobGetFeretDiamMaxBBox ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t *  coordx,
intptr_t *  coordy,
cvbval_t  arrlen 
)

This function returns four points of a bounding box using the maximum distance of a projection and the 90 degree line-pair.

The bounding box describes the maximal  surrounding rectangle.
Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]coordxPointer to an array containing x-coordinates.
[out]coordyPointer to an array containing y-coordinates.
[out]arrlenSize of the array in longs (4 Byte).
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
BlobGetBoundingBox, BlobGetFeretDiamMinBBox, and BlobGetFeretDiamMinMaxBBox.
Examples:
Visual C++ - VC Blob Example

◆ BlobGetFeretDiamMin()

cvbres_t BlobGetFeretDiamMin ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  min,
double &  max 
)

This function returns the minimal distance between two lines of a line pair of a convex projection and the distance of the 90 degree line-pair.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]minMinimal distance between two lines of a line pair of a convex projection.
[out]maxDistance of the line pair which has a 90 degree angle to the line pair with the minimal distance.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiamMinAngle()

cvbres_t BlobGetFeretDiamMinAngle ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  min,
double &  max,
double &  anglemin,
double &  anglemax 
)

This function returns the minimal distance between two lines of a line pair of a convex projection and the distance of the 90 degree line-pair.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]minMinimal distance between two lines of a line pair of a convex projection.
[out]maxDistance of the line pair which has a 90 degree angle to the line pair with the minimal distance.
[out]angleminAngle of the projection with the minimal distance.
[out]anglemax90 degrees to anglemin.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiamMinBBox()

cvbres_t BlobGetFeretDiamMinBBox ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t *  coordx,
intptr_t *  coordy,
cvbval_t  arrlen 
)

This function returns four points of a bounding box using the minimal distance of a projection and the 90 degrees line-pair.

The bounding box describes the minimal surrounding rectangle. This bounding box can also be used to determine 
the width an height of an object rotation invariant. 
Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]coordxPointer to an array containing x-coordinates.
[out]coordyPointer to an array containing y-coordinates.
[out]arrlenSize of the array in longs (4 Byte).
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
BlobGetBoundingBox, BlobGetFeretDiamMinMaxBBox, and BlobGetFeretDiamMaxBBox.
Examples:
Visual C++ - VC Blob Example

◆ BlobGetFeretDiamMinMax()

cvbres_t BlobGetFeretDiamMinMax ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  min,
double &  max 
)

This function returns the minimal and maximal distance between two lines of a line pair of a convex projection.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]minMinimal distance between two lines of a line pair of a convex projection.
[out]maxMaximal distance between two lines of a line pair of a convex projection.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiamMinMaxAngle()

cvbres_t BlobGetFeretDiamMinMaxAngle ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  min,
double &  max,
double &  anglemin,
double &  anglemax 
)

This function returns the minimal and maximal distance between two lines of a line pair of a convex projection and their angles.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]minMinimal distance between two lines of a line pair of a convex projection.
[out]maxMaximal distance between two lines of a line pair of a convex projection.
[out]angleminAngle of the projection with the minimal distance.
[out]anglemaxAngle of the projection with the maximal distance.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetFeretDiamMinMaxBBox()

cvbres_t BlobGetFeretDiamMinMaxBBox ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t *  coordx,
intptr_t *  coordy,
cvbval_t  arrlen 
)

This function returns returns four points of a bounding box using the minimal and maximal distance between line pairs of a convex projection.

The result is usually a parallelogram.
Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]coordxPointer to an array with x-coordinates.
[out]coordyPointer to an array with y-coordinates.
[out]arrlenSize of the array in longs (4 Byte).
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
BlobGetBoundingBox, BlobGetFeretDiamMinBBox, and BlobGetFeretDiamMaxBBox.
Examples:
Visual C++ - VC Blob Example

◆ BlobGetMinMomentPoints()

cvbres_t BlobGetMinMomentPoints ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t &  x0,
intptr_t &  y0,
intptr_t &  x1,
intptr_t &  y1 
)

This function returns the start point and end point of a straight line that describes the minimum moment of inertia and runs through the centre of the object.

Attention
This value is not meaningful for all objects, for instance circles. See BlobGetMoments - Ratio.
Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]x0X-position of start point.
[out]y0Y-position of start point.
[out]x1X-position of end point.
[out]y1Y-position of end point.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Visual C++ - VC Blob Example

◆ BlobGetMoments()

cvbres_t BlobGetMoments ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
double &  Min,
double &  Max,
double &  Ratio,
double &  MinAngle 
)

This function reads the minimum and maximum moments of inertia, and the angle of the minimum moment of inertia.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]MinMinimum moment of inertia.
The minimum and maximum moments of inertia of the object are calculated from the second-order central moments:  Minimum moment of inertia
[out]MaxMaximum moment of inertia.
The minimum and maximum moments of inertia of the object are calculated from the second-order central moments:  Maxiumum moment of inertia
[out]RatioRation between the minimum and maximum moment of inertia.
[out]MinAngleAngle of the minimum moment of inertia.

InertiaMinAngle is the angle in radians (-p...p) that the axis of the minimum moment of inertia encloses together with the x-axis. This parameter is frequently used as a measure for the orientation of an object. The axis always runs through the centre of gravity of the area.

There are objects - for example circles - which do not have any pronounced direction of this axis. However, Blob also returns an angle for these objects because sampling effects and the representation of objects in a digital raster also result in a certain angle for a circle. This value is only relevant if, for example, the InertiaRatio parameter shows a significant difference between the minimum and maximum moments of inertia. This angle depends very much on quantisation and noise effects.

Furthermore, there are objects which have multiple axes of inertia which are of equal weight (e.g. the letter M). Which angle is calculated here again depends on quantisation and noise effects. If several identical objects exist in an image, this angle may still assume different values.

IntertiaMinAngle is calculated from the central moments: Inertia minimum angle



Another way of interpreting this angle is to imagine every image point of an object as an independent point on the XY plane. If a straight line is fitted to this distribution of points by the least squares method, this line runs through the centre of gravity of the area (CogX, CogY), and has the angle InertiaMinAngle to the x-axis.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
Moments,
BlobGetMinMomentPoints
Examples:
Visual C++ - VC Blob Example

◆ BlobGetNumBlobs()

cvbres_t BlobGetNumBlobs ( PBLOB  BlobHandle,
cvbval_t &  lNum 
)

This function returns the number of objects .

Parameters
[in]BlobHandleHandle to the Blob object.
[out]lNumMinimal distance between two lines of a line pair of a convex projection.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Delphi - Delphi Blob Detection Example
Visual Basic - VB Blob Detection Example
Visual C++ - VC Blob Example

◆ BlobGetNumOfHoles()

cvbres_t BlobGetNumOfHoles ( PBLOB  BlobHandle,
cvbval_t *  lValue 
)

This function gets the number of holes in the image.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]lValueNumber of holes.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetNumOfMeasHoles()

cvbres_t BlobGetNumOfMeasHoles ( PBLOB  BlobHandle,
cvbval_t  lBlobNum,
cvbval_t *  plValue 
)

This function returns the number of holes in the image.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]lBlobNumNumber of holes in the image.
[out]plValueNumber of measured holes in a blob.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobGetObjectFeatureRange()

cvbres_t BlobGetObjectFeatureRange ( PBLOB  BlobHandle,
cvbval_t &  lFeatureMin,
cvbval_t &  lFeatureMax 
)

This function returns the grey scale range for binarization.

Parameters
[in]BlobHandleHandle to the Blob object.
[out]lFeatureMinLower limit for binarization.
[out]lFeatureMaxUpper limit for binarization.
Returns
>= 0 on success,
< 0 if an error occurs.
Supported platforms:
Win32
Win64
Related Topics:
BlobSetObjectFeature and BlobSetObjectFeatureRange

◆ BlobGetObjectTouchBorder()

cvbres_t BlobGetObjectTouchBorder ( PBLOB  BlobHandle,
cvbval_t &  lMask 
)

This function returns the criteria for touching the border of the Blob.

Parameters
[in]BlobHandleHandle to the Blob object.
[out]lMaskBorder mask. Following border masks are possible:
CVC_BLOB_BORDER_LEFT,
CVC_BLOB_BORDER_RIGHT,
CVC_BLOB_BORDER_TOP,
CVC_BLOB_BORDER_BOTTOM,
CVC_BLOB_BORDER_ALL,
CVC_BLOB_BORDER_NONE
Returns
>= 0 on success,
< 0 if an error occurs.
Supported platforms:
Win32
Win64

◆ BlobGetPerimeter()

cvbres_t BlobGetPerimeter ( PBLOB  BlobHandle,
cvbval_t  BlobNum,
intptr_t &  NumX,
intptr_t &  NumY,
intptr_t &  NumXY,
double &  Perimeter,
double &  Ratio 
)

This function returns the perimeter of the object.

Parameters
[in]BlobHandleHandle to the Blob object.
[in]BlobNumNumber of the Blob object.
[out]NumXNumber of x-transitions.
[out]NumYNumber of y-transitions.
[out]NumXYNumber of xy-transitions.
[out]PerimeterPerimeter from X+Y+sqrt(2)*XY.
[out]RatioRatio of area to perimeter.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Related Topics:
Perimeter and Convex Perimeter
BlobGetConvex
Examples:
Visual C++ - VC Blob Example

◆ BlobGetResultImage()

cvbres_t BlobGetResultImage ( PBLOB  BlobHandle,
IMG  Image,
cvbdim_t  PlaneIndex 
)

This function returns the result image.

The new image is generated in an eight-bit plane from the data pertaining to the 
objects (streaks). All pixels that belong to an object are set to 255, whereas all pixels 
that do not belong to an object are set to 0 (see \ref Filter).
Parameters
[in]BlobHandleHandle to the Blob object.
[out]ImageHandle to the result image.
[out]PlaneIndexPlane Index of the image in which the Blobs are to be entered.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64
Examples:
Delphi - Delphi Blob Detection Example
Visual Basic - VB Blob Detection Example

◆ BlobLSGetOpenObjects()

cvbres_t BlobLSGetOpenObjects ( PBLOB  BlobHandle,
size_t &  OpenObjects 
)

Inquire the number of open (not finished) blobs. This means blob objects which reach across frame boundaries. The max number of open objects is half the image width.

Attention
This function is new in Blob 4.5.
Parameters
[in]BlobHandleHandle to the Blob object.
[out]OpenObjectsNumber of open (not finished) Blob objects.
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64

◆ BlobLSGetStartLine()

cvbres_t BlobLSGetStartLine ( PBLOB  BlobHandle,
size_t &  StartLine 
)

This function returns the startline of the current frame. So after initialization through a call to BlobLSStart this function returns 0. For each call to BlobLSNext this start line is incremented with the number of lines processed.

Attention
This function is new in Blob 4.0.
Parameters
[in]BlobHandleHandle to the Blob object.
[out]StartLine
Returns
CVC_E_OK on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER or CVC_BLOB_E_INVALID_DATA.
Supported platforms:
Win32
Win64