TcVnParamsSB

Offers parameters for SB method (a simple blob detector with multiple thresholds).

Syntax

Definition:

struct TcVnParamsSB
{
    bool          bFilterByArea;
    bool          bFilterByCircularity;
    bool          bFilterByColor;
    bool          bFilterByConvexity;
    bool          bFilterByInertia;
    float         fMinArea;
    float         fMaxArea;
    float         fMinCircularity;
    float         fMaxCircularity;
    unsigned char nBlobColor;
    float         fMinConvexity;
    float         fMaxConvexity;
    float         fMinInertiaRatio;
    float         fMaxInertiaRatio;
    float         fMinBlobDist;
    ULONG         nMinRepeatability;
    float         fMinThreshold;
    float         fMaxThreshold;
    float         fThresholdStep;
};

Parameters

Name

Type

Default

Description

bFilterByArea

bool

true

Enable filtering by area (fMinArea <= area < fMaxArea).

bFilterByCircularity

bool

false

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

bFilterByColor

bool

false

Enable filtering by color (thresholdedColor(0 or 255) = nBlobColor).

bFilterByConvexity

bool

false

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

bFilterByInertia

bool

false

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

fMinArea

float

25

Min estimated blob area in pixel

fMaxArea

float

15000

Max estimated blob area in pixel

fMinCircularity

float

0

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

fMaxCircularity

float

1

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

nBlobColor

unsigned char

255

0 or 255

fMinConvexity

float

0

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

fMaxConvexity

float

1

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

fMinInertiaRatio

float

0

Min inertia ratio (0.0 .. 1.0)

fMaxInertiaRatio

float

1

Max inertia ratio (0.0 .. 1.0)

fMinBlobDist

float

5

Min distance between different blobs

nMinRepeatability

ULONG

2

Min number of same detected blobs (dist < fMinBlobDist) in different thresholds

fMinThreshold

float

30

Min threshold (start)

fMaxThreshold

float

225

Max threshold (stop)

fThresholdStep

float

10

Threshold step between min and max threshold