Functions | |
void * | BlobCreate (IMG Image, cvbdim_t lPlane) |
This function creates and initialises a Blob object. More... | |
void | BlobDestroy (PBLOB BlobHandle) |
This function frees a Blob object. More... | |
cvbres_t | BlobGetBlobSize (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t &lSize) |
This function returns the size (area) of the blob in pixels. More... | |
cvbres_t | BlobGetMaxMemory (PBLOB BlobHandle, cvbuint32_t &lNumBlobs, cvbuint32_t &lNumHoles, cvbuint32_t &SwObjects, cvbuint32_t &SwHoles) |
This function reads the size of internal tables. More... | |
cvbres_t | BlobGetMaxMemoryEx (PBLOB BlobHandle, cvbuint32_t &dwNumObjects, cvbuint32_t &dwNumStreaks) |
This function reads the size of internal tables. More... | |
cvbres_t | BlobGetMaxNumBlobs (PBLOB BlobHandle, cvbval_t &NumBlobs, cvbval_t &NumHoles, cvbval_t &SwObjects, cvbval_t &SwHoles) |
This function reads the size of internal tables. More... | |
cvbres_t | BlobGetNumFeret (PBLOB BlobHandle, cvbval_t &NumFeret) |
This function reads the number of points on the convex projection. More... | |
cvbres_t | BlobGetNumFeretEx (PBLOB BlobHandle, cvbval_t &NumFeret) |
This function reads the number of points on the convex projection (where BlobGetNumFeret reads the number of points of a convex projection). More... | |
cvbres_t | BlobGetSize (PBLOB BlobHandle, cvbval_t BlobNum, intptr_t &lSize) |
This function returns the size of a found blob in pixels. More... | |
cvbbool_t | BlobIsBlob (PBLOB BlobHandle) |
This function checks whether a blob handle is a valid handle for a blob object. More... | |
cvbres_t | BlobReset (PBLOB BlobHandle) |
This function has to be used to reset the Blob object if a memory overflow occurs. More... | |
cvbres_t | BlobSetArea (PBLOB BlobHandle, cvbval_t lPlane, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom) |
This function defines an area of interest for the Blob object. More... | |
cvbres_t | BlobSetExtractionMode (void *BlobHandle, cvbdim_t lValue) |
This function sets the extraction mode. More... | |
cvbres_t | BlobSetImage (void *BlobHandle, IMG Image, cvbdim_t lPlane) |
This function passes a new image to a Blob object without the internal tables in the blob object having to be rebuilt. More... | |
cvbres_t | BlobSetMaxMemory (void *BlobHandle, cvbval_t lNumBlobs, cvbval_t lNumHoles, cvbval_t SwObjects, cvbval_t SwHoles) |
Each blob tool has to create internal tables to store the data. If the default table size is inadequate you can use this function to allocate more memory. More... | |
cvbres_t | BlobSetMaxMemoryEx (void *BlobHandle, cvbval_t lNumObjects, cvbval_t lNumStreaks) |
This function sets the size of internal tables. More... | |
cvbres_t | BlobSetNumBlobs (void *BlobHandle, cvbval_t llastentry) |
This function defines the number of blobs to be found. More... | |
cvbres_t | BlobSetNumFeret (void *BlobHandle, cvbdim_t lValue) |
This function defines the number of convex projections. More... | |
cvbres_t | BlobSetObjectFeature (void *BlobHandle, cvbval_t lThreshold, cvbval_t lFeature) |
This function defines a threshold that is used for transformation to a binary image (also see BlobSetObjectFeatureRange). More... | |
cvbres_t | BlobSetObjectFeatureRange (void *BlobHandle, cvbval_t lFeatureMin, cvbval_t lFeatureMax) |
This function defines the grey value range that is used for binarizing. More... | |
cvbres_t | BlobSetSortMode (void *BlobHandle, cvbval_t lMode, cvbdim_t lx, cvbdim_t ly, cvbdim_t lLastEntry, cvbdim_t lSortOrder) |
This function specifies how objects can be sorted using various criteria after extraction. More... | |
cvbres_t | BlobSetSortParameter (void *BlobHandle, cvbval_t lMode, cvbdim_t lx, cvbdim_t ly, cvbval_t lSortOrder) |
This function sets the parameters for sorting the blobs. More... | |
void * BlobCreate | ( | IMG | Image, |
cvbdim_t | lPlane | ||
) |
This function creates and initialises a Blob object.
[in] | Image | Handle to the source image. |
[in] | lPlane | Number of plane to be used. |
NULL
pointer. void BlobDestroy | ( | PBLOB | BlobHandle | ) |
This function frees a Blob object.
[in] | BlobHandle | Handle to the Blob object. |
cvbres_t BlobGetBlobSize | ( | PBLOB | BlobHandle, |
cvbval_t | BlobNum, | ||
intptr_t & | lSize | ||
) |
This function returns the size (area) of the blob in pixels.
[in] | BlobHandle | Handle to the Blob object. |
[in] | BlobNum | Number of the object. |
[out] | lSize | Area (number of pixels) of the blob in pixels. |
CVC_E_OK
on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER
or CVC_BLOB_E_INVALID_DATA
. cvbres_t BlobGetMaxMemory | ( | PBLOB | BlobHandle, |
cvbuint32_t & | lNumBlobs, | ||
cvbuint32_t & | lNumHoles, | ||
cvbuint32_t & | SwObjects, | ||
cvbuint32_t & | SwHoles | ||
) |
This function reads the size of internal tables.
[in] | BlobHandle | Handle to the Blob object. |
[out] | lNumBlobs | Maximum number of objects in the image, respectively, AOI. |
[out] | lNumHoles | Maximum number of holes in the image. |
[out] | SwObjects | Maximum number of streaks in a row. |
[out] | SwHoles | Maximum number of holes in an object. |
0
on success, 0
if an error occurs. cvbres_t BlobGetMaxMemoryEx | ( | PBLOB | BlobHandle, |
cvbuint32_t & | dwNumObjects, | ||
cvbuint32_t & | dwNumStreaks | ||
) |
This function reads the size of internal tables.
[in] | BlobHandle | Handle to the Blob object. |
[out] | dwNumObjects | Maximum number of objects (Blobs AND Holes) in the image, respectively, AOI. |
[out] | dwNumStreaks | Maximum number of streaks stored during execution. See BlobSetExtractionMode with the option CVC_BLOB_EXTRACT_PIXDATA. |
0
on success, 0
if an error occurs. cvbres_t BlobGetMaxNumBlobs | ( | PBLOB | BlobHandle, |
cvbval_t & | NumBlobs, | ||
cvbval_t & | NumHoles, | ||
cvbval_t & | SwObjects, | ||
cvbval_t & | SwHoles | ||
) |
This function reads the size of internal tables.
[in] | BlobHandle | Handle to the Blob object. |
[out] | NumBlobs | Maximum number of objects in the image, respectively, AOI. |
[out] | NumHoles | Maximum number of holes in the image. |
[out] | SwObjects | Maximum number of streaks in a row. |
[out] | SwHoles | Maximum number of holes in an object. |
CVC_E_OK
on success, otherwise CVC_E_PARAMETER
for invalid function parameters. cvbres_t BlobGetNumFeret | ( | PBLOB | BlobHandle, |
cvbval_t & | NumFeret | ||
) |
This function reads the number of points on the convex projection.
[in] | BlobHandle | Handle to the Blob object. |
[out] | NumFeret | Number of points calculated for the convex perimeter (see convex shape and convex perimeter). When the BlobGetConvexPoints function is called, arrays of sufficient size must be available. This size depends directly on the BlobSetNumFeret function. BlobSetNumFeret specifies the number of projections, and BlobGetNumFeret returns the number of points on the perimeter. |
CVC_E_OK
on success, otherwise if an error occurs the function returns either CVC_E_PARAMETER
or CVC_BLOB_E_INVALID_DATA
. cvbres_t BlobGetNumFeretEx | ( | PBLOB | BlobHandle, |
cvbval_t & | NumFeret | ||
) |
This function reads the number of points on the convex projection (where BlobGetNumFeret reads the number of points of a convex projection).
This number is further on needed to access the information of the projections (see BlobGetFeretDiam..... functions).
[in] | BlobHandle | Handle to the Blob object. |
[out] | NumFeret | Number of convex projections (see convex shape and convex perimeter). |
CVC_E_OK
on success, otherwise if an error occurs the function returns either CVC_E_PARAMETER
or CVC_BLOB_E_INVALID_DATA
. cvbres_t BlobGetSize | ( | PBLOB | BlobHandle, |
cvbval_t | BlobNum, | ||
intptr_t & | lSize | ||
) |
This function returns the size of a found blob in pixels.
This function replaces the #BlobGetBlobSize function from version 1.0.
[in] | BlobHandle | Handle to the Blob object. |
[in] | BlobNum | Number of the blob. |
[out] | lSize | Size of the blob in pixels. |
0
on success, if
an error occurs. cvbbool_t BlobIsBlob | ( | PBLOB | BlobHandle | ) |
cvbres_t BlobReset | ( | PBLOB | BlobHandle | ) |
This function has to be used to reset the Blob object if a memory overflow occurs.
In normal circumstances this function will only be called internally.
[in] | BlobHandle | Handle to the Blob object. |
CVC_E_OK
on success, otherwise if an error occurs this function returns either CVC_E_PARAMETER
or CVC_E_MEMORY_ALLOCATION
. cvbres_t BlobSetArea | ( | PBLOB | BlobHandle, |
cvbval_t | lPlane, | ||
cvbdim_t | Left, | ||
cvbdim_t | Top, | ||
cvbdim_t | Right, | ||
cvbdim_t | Bottom | ||
) |
This function defines an area of interest for the Blob object.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lPlane | Plane index to be processed. |
[in] | Left | Left coordinate (first column) of the area of interest. |
[in] | Top | Top coordinate (first row) of the area of interest. |
[in] | Right | Right coordinate (last column)of the area of interest. |
[in] | Bottom | Bottom coordinate (last row)of the area of interest. |
CVC_E_OK
on success, otherwise if an error occurs this function returns CVC_E_PARAMETER
. cvbres_t BlobSetExtractionMode | ( | void * | BlobHandle, |
cvbdim_t | lValue | ||
) |
This function sets the extraction mode.
For reasons of speed, it is possible to set different extraction modes so that unnecessary parameters are not calculated.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lValue | Extraction 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 |
CVC_E_OK
on success, otherwise if an error occurs this function returns CVC_E_PARAMETER
. cvbres_t BlobSetImage | ( | void * | BlobHandle, |
IMG | Image, | ||
cvbdim_t | lPlane | ||
) |
This function passes a new image to a Blob object without the internal tables in the blob object having to be rebuilt.
[in] | BlobHandle | Handle to the Blob object. |
[in] | Image | Handle to the new source image. |
[in] | lPlane | Plane index to be processed. |
0
on success, cvbres_t BlobSetMaxMemory | ( | void * | BlobHandle, |
cvbval_t | lNumBlobs, | ||
cvbval_t | lNumHoles, | ||
cvbval_t | SwObjects, | ||
cvbval_t | SwHoles | ||
) |
Each blob tool has to create internal tables to store the data. If the default table size is inadequate you can use this function to allocate more memory.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lNumBlobs | Maximum number of objects in the image, respectively, AOI. Default = 500 . |
[in] | lNumHoles | Maximum number of holes in the image. Default = 500 . |
[in] | SwObjects | Maximum number of streaks in a row (max = (dx /2)+1). Default = 3000 . |
[in] | SwHoles | Maximum number of holes in an object (m = (dx/2+1)*(dy/2+1)). Default = 3000 . |
0
on success, cvbres_t BlobSetMaxMemoryEx | ( | void * | BlobHandle, |
cvbval_t | lNumObjects, | ||
cvbval_t | lNumStreaks | ||
) |
This function sets the size of internal tables.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lNumObjects | Maximum number of objects (blobs and holes) in the image, respectively, AOI. |
[in] | lNumStreaks | Maximum number of streaks stored during an execution. This Parameter is only relevant for the mode in which the streaks are stored with the objects. See BlobSetExtractionMode with CVC_BLOB_EXTRACT_PIXDATA. Otherwise the Parameter is ignored an set to zero. |
0
on success, cvbres_t BlobSetNumBlobs | ( | void * | BlobHandle, |
cvbval_t | llastentry | ||
) |
cvbres_t BlobSetNumFeret | ( | void * | BlobHandle, |
cvbdim_t | lValue | ||
) |
This function defines the number of convex projections.
Projections are applied to the object from the sides defined by \a lValue (see <i>convex shape and convex perimeter</i>). The more projections, the more precise the approximation to the perimeter. The four basic projections (0 degrees, 45 degrees, 90 degrees, 135 degrees) are the default values. See also #BlobGetNumFeret.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lValue | Number of projections to calculate the convex perimeter. BlobSetNumFeret specifies the number of projections, and BlobGetNumFeret returns the number of points on the perimeter. For example lValue is 4 returns 12 points on the convex perimeter shape. |
CVC_E_OK
on success, otherwise CVC_E_PARAMETER
for invalid function parameters. cvbres_t BlobSetObjectFeature | ( | void * | BlobHandle, |
cvbval_t | lThreshold, | ||
cvbval_t | lFeature | ||
) |
This function defines a threshold that is used for transformation to a binary image (also see BlobSetObjectFeatureRange).
[in] | BlobHandle | Handle to the Blob object. |
[in] | lThreshold | Threshold for conversion to a binary image. |
[in] | lFeature | Range to be recognized as an object (blob). Possible values are: CVC_BLOB_BLACK_TO_FEATURE or CVC_BLOB_WHITE_TO_FEATURE |
CVC_E_OK
on success, otherwise CVC_E_PARAMETER
for invalid function parameters. cvbres_t BlobSetObjectFeatureRange | ( | void * | BlobHandle, |
cvbval_t | lFeatureMin, | ||
cvbval_t | lFeatureMax | ||
) |
This function defines the grey value range that is used for binarizing.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lFeatureMin | Minimum grey value belonging to the object. Default = 128 . |
[in] | lFeatureMax | Maximum grey value belonging to the object. Default = 255 . |
CVC_E_OK
on success, otherwise CVC_E_PARAMETER
for invalid function parameters. cvbres_t BlobSetSortMode | ( | void * | BlobHandle, |
cvbval_t | lMode, | ||
cvbdim_t | lx, | ||
cvbdim_t | ly, | ||
cvbdim_t | lLastEntry, | ||
cvbdim_t | lSortOrder | ||
) |
This function specifies how objects can be sorted using various criteria after extraction.
Even if the blobs are not sorted, the Blob tool returns up to as many blobs as are specified with \a lLastEntry .
[in] | BlobHandle | Handle to the Blob object. |
[in] | lMode | Sort mode to be used. Following sort modes are possible: CVC_BLOB_SORT_UNSORTED, CVC_BLOB_SORT_SIZE, CVC_BLOB_SORT_POSX, CVC_BLOB_SORT_POSY, CVC_BLOB_SORT_DISTANCE |
[in] | lx | If CVC_BLOB_SORT_DISTANCE is selected, this value defines the x coordinate for which the distance is calculated. |
[in] | ly | If CVC_BLOB_SORT_DISTANCE is selected, this value defines the y coordinate for which the distance is calculated. |
[in] | lLastEntry | Number of blobs to be sorted. |
[in] | lSortOrder | Sort order. Possible values are possible: CVC_BLOB_SORT_RISING: descending order, CVC_BLOB_SORT_FALLING: ascending order Attention: The Sort-order constants are wrong. Due to compatibility reasons we did not change it. |
CVC_E_OK
on success, otherwise CVC_E_PARAMETER
for invalid function parameters. cvbres_t BlobSetSortParameter | ( | void * | BlobHandle, |
cvbval_t | lMode, | ||
cvbdim_t | lx, | ||
cvbdim_t | ly, | ||
cvbval_t | lSortOrder | ||
) |
This function sets the parameters for sorting the blobs.
[in] | BlobHandle | Handle to the Blob object. |
[in] | lMode | Sort mode to be used. Following sort modes are possible: CVC_BLOB_SORT_UNSORTED, CVC_BLOB_SORT_SIZE, CVC_BLOB_SORT_POSX, CVC_BLOB_SORT_POSY, CVC_BLOB_SORT_DISTANCE |
[in] | lx | If CVC_BLOB_SORT_DISTANCE is selected, this value defines the x coordinate for which the distance is calculated. |
[in] | ly | If CVC_BLOB_SORT_DISTANCE is selected, this value defines the y coordinate for which the distance is calculated. |
[in] | lSortOrder | Sort order. Possible values are possible: CVC_BLOB_SORT_RISING: descending order, CVC_BLOB_SORT_FALLING: ascending order Attention: The Sort-order constants are wrong. Due to compatibility reasons we did not change it. |
0
on success, 0
if an error occurs.