Blob Tracker

Track moving blobs and objects in video by connected-component analysis.

What it does

Blob Tracker finds contiguous regions in an image and tracks them frame to frame as stable IDs. A segmentation model pulls a mask out of the image, or a mask is fed in directly; the individual blobs in that mask are isolated, then matched against the previous frame to carry position, velocity and identity forward.

Each tracked blob carries a centroid, velocity, area, bounding box, orientation, an age and a stable ID that survives frame to frame. Bounding-box shapes come out ready to composite or to use as an analytic-shape input.

When to use it

ParameterTypeDefault
imageOneOf([FieldOf(Raster)])
modelString"u2net_lite"
thresholdNumber0.500
min_areaNumber0.001
max_areaNumber0.900
max_blobsNumber20
sort_modeString"area"
max_distanceNumber0.150
persistenceNumber15
process_noiseNumber0.010
measurement_noiseNumber0.100
distance_weightNumber1
iou_weightNumber0.500
area_weightNumber0.300
enabledBooleantrue

Gotchas

Persistence sets how many frames a blob is kept alive after it is lost (covered, off-screen, or momentarily undetected) before its ID is dropped. Too low and fast-moving or briefly-occluded blobs lose their identity and restart as new blobs; too high and stale blobs linger and can steal a match from a real new one.

Worked example

  1. Add a Blob Tracker and wire a Camera or Video node into Image.

  2. Leave Model at "u2net_lite" for general subjects, or switch to "modnet" for people. Raise Threshold if the mask is picking up background noise.

  3. Set Min Area to filter out small flecks, and Max Blobs to cap how many blobs are tracked at once.

  4. Read the blobs output for full per-blob data, or wire centroids / velocities directly into whatever should follow the motion.

See also

Point Tracker · Vision Tracker · Vision Segment · Points