Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILDataBlobAnalysis Interface Reference

This interface provide functionalities of data blob analysis. More...

Inheritance diagram for ILDataBlobAnalysis:
ILObject LDataBlobAnalysis

Public Member Functions

void AddBlobFilter (ILDataBlobFilter *filter)
 
LPVErrorCode Build (ILDataList *data, ILDataBlobResults **results)
 
void ResetBlobFilter ()
 
void SetBlobRange (double lb, double ub)
 
void SetRangeThresholdAdaptGlobal (LPVPolarity blobPolarity)
 
void SetRangeThresholdAdaptLocal (LPVPolarity blobPolarity, int blockSize, double bias)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

LPVAggregation DataAggType [get, set]
 The aggregation type of the data when SortBy is set to LPVDataBlobData. More...
 
LPVExcludeBoundaryMode ExcludeBoundaryMode [get, set]
 The mode how to handle data blobs at the start or end of the input data list, only LPVEBModeEntire and LPVEBModeNone is supported.
 
int MaxCount [get, set]
 The maximum of data blobs to find. If there are more than the setting counts of data blobs, sort the candidates then pick the tops. More...
 
LPVDataBlobFeatures SortBy [get, set]
 The method used to sort all data blob candidates, the top ones are reported as final results. More...
 
BOOL SortByDescending [get, set]
 Works together with SortBy. True to sort all data blob candidates descending(from large value to small), false for sorting in ascending order. More...
 

Detailed Description

This interface provide functionalities of data blob analysis.

Data blob analysis extracts the ranges of interest out of the numeric data list. The data list may be the distances between the inspected contours and the expectations, then we use the data blobs to find out the defects. Or, it may be the collected execution results in frames, then the filtered out data blobs are the NG abnormals.

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

Example Code

Member Function Documentation

◆ AddBlobFilter()

void AddBlobFilter ( ILDataBlobFilter filter)

Add an alternative data blob filter.

Parameters
[in]filterThe new data blob filter

◆ Build()

LPVErrorCode Build ( ILDataList data,
ILDataBlobResults **  results 
)

Build the data blobs using the input data list.

Parameters
[in]dataThe input data list.
[out]resultsReturn the data blob results.
Return values
errorReturn error code if anything is wrong.

◆ ResetBlobFilter()

void ResetBlobFilter ( )

Remove all data blob filters.

◆ SetBlobRange()

void SetBlobRange ( double  lb,
double  ub 
)

Set the range of the data blob. Data within the range will be treated as foreground, and connected to be data blobs.

Parameters
[in]lbThe lower bound of the blob range.
[in]ubThe upper bound of the blob range.

◆ SetRangeThresholdAdaptGlobal()

void SetRangeThresholdAdaptGlobal ( LPVPolarity  blobPolarity)

Use global-adaptive thresholding for segmentation. The optimal threshold value is calculated base on the entire input data list.

Parameters
[in]blobPolarityThe object polarity of the blob. LPVBlackOnWhite indicates the smaller values than global threshold are the data blobs, LPVWhiteOnBlack is exactly the opposite.

◆ SetRangeThresholdAdaptLocal()

void SetRangeThresholdAdaptLocal ( LPVPolarity  blobPolarity,
int  blockSize,
double  bias 
)

Use local-adaptive threshold value. The optimal threshold value is calculated base on a @math_eq{\pm blockSize / 2} region around individual data, then revised by the given bias value.

Parameters
[in]blobPolarityThe object polarity of the blob. LPVBlackOnWhite indicates the smaller values than the threshold are the data blobs, LPVWhiteOnBlack is exactly the opposite.
[in]blockSizeSize of the local region, should be an odd number, say, 3, 5, 7, etc. Set it to 0 for auto-generate block size based in the input data list size.
[in]biasRevise value to optimal threshold value as \( t' = t - bias \) for LPVBlackOnWhite , \( t' = t + bias \) for LPVWhiteOnBlack .

Property Documentation

◆ DataAggType

LPVAggregation DataAggType
getset

The aggregation type of the data when SortBy is set to LPVDataBlobData.

See also
MaxCount, SortByDescending, DataAggType

◆ MaxCount

int MaxCount
getset

The maximum of data blobs to find. If there are more than the setting counts of data blobs, sort the candidates then pick the tops.

See also
SortBy

◆ SortBy

LPVDataBlobFeatures SortBy
getset

The method used to sort all data blob candidates, the top ones are reported as final results.

See also
MaxCount, SortByDescending, DataAggType

◆ SortByDescending

BOOL SortByDescending
getset

Works together with SortBy. True to sort all data blob candidates descending(from large value to small), false for sorting in ascending order.

See also
SortBy