PyTrackObject

class btrack.btypes.PyTrackObject

Bases: Structure

The base btrack track object.

Primitive class to store information about an object. Essentially a single object in a field of view, with some member variables to keep track of data associated with an object.

Parameters:
IDint

The unique ID of the object.

xfloat

The x coordinate.

yfloat

The y coordinate.

zfloat

The z coordinate.

tint

The timestamp.

dummy: bool

Flag for whether the objects is real or a dummy (inserted by the tracker when no observation can be linked).

statesint

The number of states of the object. This corresponds to the number of possible labels.

labelint

The label of the object.

featuresarray

A vector of feature values.

n_featuresint

The length of the feature vector.

Notes

stackoverflow.com/questions/23329663/access-np-array-in-ctypes-struct

Attributes:
propertiesdict[str, Union[int, float]]

Dictionary of properties associated with this object.

stateconstants.States

A state label for the object. See constants.States

Attributes Summary

ID

Structure/Union member

dummy

Structure/Union member

features

Structure/Union member

label

Structure/Union member

n_features

Structure/Union member

properties

state

states

Structure/Union member

t

Structure/Union member

x

Structure/Union member

y

Structure/Union member

z

Structure/Union member

Methods Summary

from_dict(properties)

Build an object from a dictionary.

set_features(keys)

Set features to be used by the tracking update.

to_dict()

Return a dictionary of the fields and their values.

Attributes Documentation

ID

Structure/Union member

dummy

Structure/Union member

features

Structure/Union member

label

Structure/Union member

n_features

Structure/Union member

properties
state
states

Structure/Union member

t

Structure/Union member

x

Structure/Union member

y

Structure/Union member

z

Structure/Union member

Methods Documentation

static from_dict(properties: dict[str, Any]) PyTrackObject

Build an object from a dictionary.

set_features(keys: list[str]) None

Set features to be used by the tracking update.

to_dict() dict[str, Any]

Return a dictionary of the fields and their values.