Track moving objects🔗

This tool takes in a set of points representing the locations of an arbitrary number of moving object at a time instant. It forms movement trajectories by connecting points in successive point sets based on a motion model. The trajectory estimates are updated each time new data comes in. The algorithm tries to find a set of trajectories that optimally describes the movement of the series of points in the used motion model.


  • points: The coordinates of detected moving objects as a N-by-2 matrix.

  • classIndices: An optional classification for each point as a N-by-1 matrix of integers. This information is not necessary, but helps if different objects can be reliably distinguished before tracking.

  • maxStartDistance: The maximum distance between two points in successive sets that can be considered “close enough” to start a new trajectory. This limit only applies until a movement estimate is available.

  • maxJoiningDistance: The maximum distance between an input point and the predicted location of an object that can still be considered a candidate for extending a trajectory.

  • maxPredictionLength: The maximum number of past measurements the tracker will consider in its movement estimate. A larger value makes movement estimates less noisy but also imposes some stiffness to the trajectories.

  • maxStopTime: The maximum number of time units a trajectory will be kept in memory if no new points can be connected to it.

  • time: A time stamp for the measurement. If connected, must be a DateTime object. If this input is not connected, the tool assumes that the measurement interval is constant.

  • minTrajectoryLength: The minimum number of connected points that will be reported as a trajectory.

  • maxTrajectoryLength: The maximum number of points connected to a trajectory before the oldest points start dropping out.

  • pointSnapDistance: Minimum distance between any two points within the same class. The set of input points are filtered so that the distance between any two points within the same class is at least pointSnapDistance. If classIndices input is not connected, every input point is assumed to belong to the same class.

  • decimation: The tracked points are decimated by averaging decimation consecutive points before writing them to trajectories output. 1 means decimation is not used.

  • reportingDelay: The number of invocations to delay the output of trajectories. Setting reportingDelay to a non-zero value is useful if tracked trajectories cross often, making the tracker to find a more optimal arrangement of trajectories later only after it has gathered more information. Analysing the trajectories becomes more reliable if one does not need to deal with changing estimates.


  • trajectories: The current set of estimated trajectories. A N-by-2 matrix of point coordinates that contains M trajectories with a variable number of points.

  • blockSize: The number of points in each of the trajectories stored in trajectories. An M-by-1 integer matrix in which the number of rows (M) corresponds to the number of detected trajectories. Values in this matrix are between minTrajectoryLength and maxTrajectoryLength, inclusive.

  • classIndices: The class index of each trajectory as an M-by-1 integer matrix. If class indices were not provided as input, the matrix is all zeros.

  • times: An array of time stamps, one for each point in trajectories. If time input is not connected, the time stamps are composed of an increasing frame count starting from zero. The count is converted to a time stamp by assuming that the interval between each frame is one millisecond and the time of the first frame is the beginning of the standard epoch (Jan 1, 1970).

  • identifiers: A (temporarily) unique identifier for each trajectory. An M-by-1 integer matrix containing an auto-generated unique ID for each trajectory. The ID lets one to associate trajectories even if their order and points change. Note that the ID is not suitable for long-term identification of trajectories as it rolls over after a while.

  • lastPoint: The last point of each trajectory. This is a copy of the last points in trajectories output for each active trajectory.

  • lastTime: The last time of each trajectory. This is a copy of the last times in times output for each active trajectory.