5.3.2.12. Struct RoIs_motion_t

5.3.2.12.1. Struct Documentation

struct RoIs_motion_t

Motion between RoI at \(t - 1\) and \(t\). The features of this structure are values computed after motion compensation. The memory layout is a Structure of Arrays (SoA), each field is an array of _max_size capacity (except for _max_size itself and _size fields that are both scalar values).

Public Members

uint32_t *id

RoI unique identifiers. A RoI identifier should starts from 1 while 0 should be reserved for uninitialized structure.

float *dx

\(x\) components of the distance between centroids at \(t - 1\) and \(t\). It can represent either abscissa velocity (if is_moving == 1) or abscissa error distance (if is_moving == 0).

float *dy

\(y\) components of the distance between centroids at \(t - 1\) and \(t\). It can represent either ordinate velocity (if is_moving == 1) or ordinate error distance if (is_moving == 0).

float *error

Velocity norm (if is_moving == 1) or error (if is_moving == 0). \( e = \sqrt{dx^2 + dy^2} \).

uint8_t *is_moving

Boolean that defines if the RoI is moving (is_moving == 1) or not (is_moving == 0).

size_t *_size

Current size/utilization of the fields. Note: it is allocated on the heap but it represents only one value.

size_t *_max_size

Maximum capacity of data that can be contained in the fields. Note: it is allocated on the heap but it represents only one value.