TcVnParamsBlobDetection

Offers parameters for blob detection

Syntax

Definition:

TYPE TcVnParamsBlobDetection :
STRUCT
    bFilterByArea         : BOOL;
    bFilterByCircularity  : BOOL;
    bFilterByConvexity    : BOOL;
    bFilterByEccentricity : BOOL;
    bFilterByInertiaRatio : BOOL;
    fMinArea              : REAL;
    fMaxArea              : REAL;
    fMinCircularity       : REAL;
    fMaxCircularity       : REAL;
    fMinConvexity         : REAL;
    fMaxConvexity         : REAL;
    fMinEccentricity      : REAL;
    fMaxEccentricity      : REAL;
    fMinInertiaRatio      : REAL;
    fMaxInertiaRatio      : REAL;
    eThresholdType        : ETcVnThresholdType;
    fMinThreshold         : REAL;
    fMaxThreshold         : REAL;
    fThresholdStep        : REAL;
    fMinBlobDistance      : REAL;
    nMinRepeatability     : UDINT;
    eBlobCombination      : ETcVnBlobCombination;
END_STRUCT
END_TYPE

Parameters

Name

Type

Default

Description

bFilterByArea

BOOL

TRUE

Enable filtering by area (fMinArea <= area <= fMaxArea); strongly recommended to activate for filtering noise with fMinArea.

bFilterByCircularity

BOOL

FALSE

Enable filtering by circularity (fMinCircularity <= circularity(4pi * area / perimeter^2) <= fMaxCircularity).

bFilterByConvexity

BOOL

FALSE

Enable filtering by convexity (fMinConvexity <= convexity(area / hullArea) <= fMaxConvexity).

bFilterByEccentricity

BOOL

FALSE

Enable filtering by eccentricity (fMinEccentricity <= eccentricity <= fMaxEccentricity).

bFilterByInertiaRatio

BOOL

FALSE

Enable filtering by inertia ratio (fMinInertiaRatio <= inertia ratio <= fMaxInertiaRatio).

fMinArea

REAL

10

Min estimated blob area in pixel

fMaxArea

REAL

100000000

Max estimated blob area in pixel

fMinCircularity

REAL

0

Min circularity (1.0: ideal circle, < 1: less circular, 0: not circular at all)

fMaxCircularity

REAL

1

Max circularity (1.0: ideal circle, < 1: less circular, 0: not circular at all)

fMinConvexity

REAL

0

Min convexity (1.0: blob fully convex, < 1: less convex)

fMaxConvexity

REAL

1

Max convexity (1.0: blob fully convex, < 1: less convex)

fMinEccentricity

REAL

0

Min eccentricity (0.0: circular, 1.0: linear)

fMaxEccentricity

REAL

1

Max eccentricity (0.0: circular, 1.0: linear)

fMinInertiaRatio

REAL

0

Min inertia ratio (1.0: equal width and height, 0.0: linear)

fMaxInertiaRatio

REAL

1

Max inertia ratio (1.0: equal width and height, 0.0: linear)

eThresholdType

ETcVnThresholdType

TCVN_TT_BINARY

Threshold type for internally applied threshold method (OTSU_XXX only supported for USINT images).

fMinThreshold

REAL

30

Threshold to start with (if fThresholdStep > 0, otherwise this is the only threshold used).

fMaxThreshold

REAL

225

Threshold to end with (if fThresholdStep > 0, otherwise this value is not used).

fThresholdStep

REAL

0

Sets to 0 if only 1 threshold should be used (much faster than multiple thresholds and combining the results).

fMinBlobDistance

REAL

5

Minimum distance between the center points of two different blobs (only used if fThresholdStep > 0; if distance < fMinBlobDistance, the blobs are treated as the same).

nMinRepeatability

UDINT

2

Minimum number of threshold steps, for which the same contour has to be detected (only used if fThresholdStep > 0; same means center point distance < fMinBlobDistance).

eBlobCombination

ETcVnBlobCombination

TCVN_BC_MEDIAN_THRESHOLD

Selects, which of the multi-threshold blob contours should be returned.