OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::MotionEvent

Reported when motion is detected in a MotionZone.

Public attributes

zone_id

uint32_t zone_id = 0

Which zone saw it -- the id passed to Motion().SetZone().

One event per zone per frame, in ascending id order, and only for zones that found something: a frame with no motion produces no event at all. The zone's signals are still published with zeros on those frames, so an alarm Rule sees the quiet frames that this callback does not.

blob_count

uint32_t blob_count = 0

How many blobs the detector found on this frame.

Raw detections, before tracking -- not a stable count of objects. One object that breaks in two counts as two, and the number moves frame to frame across a scene a person would call unchanged. Treat it as "how much is going on", and reach for the tracker-backed max_velocity when identity matters. Also published as SignalField::kMotionBlobCount.

max_velocity

float max_velocity = 0.0f

Speed of the fastest confirmed track, in fractions of the frame per frame -- not pixels, and not per second.

x and y are normalized by the frame width and height separately, so on a non-square frame the magnitude is anisotropic, and the figure is an exponential average of the tracker's innovation rather than a raw displacement.

Only confirmed tracks count, and confirmation takes three consecutive matched frames. So a newly appeared object reports 0 for its first few frames, and a target crossing more than 20% of the frame per frame is never matched at all and reports 0 forever. blob_count > 0 with max_velocity == 0 is normal and does not mean the scene is still.

total_area

float total_area = 0.0f

How much of the frame is moving: the sum over blobs of each blob's bounding box as a fraction of the frame area.

Not pixels, and not the filled area that MotionZone::min_area is compared against -- a thin diagonal streak contributes its whole box. Boxes may overlap, so the sum can exceed 1.0. Multiply by width * height for a rough pixel figure. Unlike max_velocity it is computed over every blob, tracked or not. Also published as SignalField::kMotionArea.