Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions
ILBlobFilter Interface Reference

This interface provide functionalities of blob filtering. More...

Inheritance diagram for ILBlobFilter:
ILObject LBlobFilter

Public Member Functions

BOOL Filter (ILBlob *blob)
 
ILBlobResultsFilterResults (ILBlobResults *blobResults)
 
void GetFilterFeature (LPVBlobFeatures feature, double *lowerBound, double *upperBound)
 
void SetFilterFeature (LPVBlobFeatures feature, double lowerBound, double upperBound)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Detailed Description

This interface provide functionalities of blob filtering.

Blob filter is used to filter blobs of interest according to their features. There's two common ways to use the blob filter:

  1. Configure a blob filter, then attach it to the blob analysis tool via ILBlobAnalysis::AddBlobFilter().
  2. Manually filter the blob results to build a new filtered collection via ILBlobFilter::FilterResults().

You can have multiple blob filters in a blob analysis tool, for each blob candidate, it's reported as a result if one of the filters' criteria is satisfied.
You can define multiple filtering features in a blob filter, for each blob candidate, it's reported as a result if all filtering features' limitations are satisfied.

To use this interface, you should create a LBlobFilter object.

Example Code

Member Function Documentation

◆ Filter()

BOOL Filter ( ILBlob blob)

Apply the filter on a single blob.

Parameters
[in]blobThe input blob.
Return values
valReturn true if the input blob meet the filter's criteria; otherwise, return false.

◆ FilterResults()

ILBlobResults* FilterResults ( ILBlobResults blobResults)

Apply the filter on a collection of blob, and return the filtered new collection.

Parameters
[in]blobResultsThe input blob collection.
Return values
filterResultsReturn the filtered blob collection.

◆ GetFilterFeature()

void GetFilterFeature ( LPVBlobFeatures  feature,
double *  lowerBound,
double *  upperBound 
)

Get the filtering limitation for the specified feature

Parameters
[in]featureThe filtering feature, see LPVBlobFeatures.
[out]lowerBoundReturn the lower bound of the limitation. Negative value indicates to do no lower bound check. If both the bounds are negative and same, then the specified feature is in fact not filtered.
[out]upperBoundReturn the upper bound of the limitation. Negative value indicates to do no upper bound check.

◆ SetFilterFeature()

void SetFilterFeature ( LPVBlobFeatures  feature,
double  lowerBound,
double  upperBound 
)

Configure the filtering feature and its limitation. You can define multiple joint filtering features in one blob filter.

Parameters
[in]featureThe filtering feature, see LPVBlobFeatures.
[in]lowerBoundThe lower bound of the limitation. Negative value indicates to do no lower bound check, except LPVBlobCenterX or LPVBlobCenterY.
[in]upperBoundThe upper bound of the limitation. Negative value indicates to do no upper bound check, except LPVBlobCenterX or LPVBlobCenterY.