|
Safemotion Lib
|
Public Member Functions | |
| __init__ (self) | |
| initiate (self, measurement) | |
| predict (self, mean, covariance) | |
| project (self, mean, covariance) | |
| update (self, mean, covariance, measurement) | |
Protected Attributes | |
| _motion_mat | |
| _update_mat | |
| _std_weight_position | |
| _std_weight_velocity | |
A simple Kalman filter for tracking bounding boxes in image space. The implementation is referred to https://github.com/nwojke/deep_sort.
Definition at line 4 of file kalman_filter.py.
| kalman_filter.KalmanFilter.__init__ | ( | self | ) |
Definition at line 21 of file kalman_filter.py.
| kalman_filter.KalmanFilter.initiate | ( | self, | |
| measurement ) |
Create track from unassociated measurement.
Args:
measurement (ndarray): Bounding box coordinates (x, y, a, h) with
center position (x, y), aspect ratio a, and height h.
Returns:
(ndarray, ndarray): Returns the mean vector (8 dimensional) and
covariance matrix (8x8 dimensional) of the new track.
Unobserved velocities are initialized to 0 mean.
Definition at line 42 of file kalman_filter.py.
| kalman_filter.KalmanFilter.predict | ( | self, | |
| mean, | |||
| covariance ) |
Run Kalman filter prediction step.
Args:
mean (ndarray): The 8 dimensional mean vector of the object
state at the previous time step.
covariance (ndarray): The 8x8 dimensional covariance matrix
of the object state at the previous time step.
Returns:
(ndarray, ndarray): Returns the mean vector and covariance
matrix of the predicted state. Unobserved velocities are
initialized to 0 mean.
Definition at line 69 of file kalman_filter.py.
| kalman_filter.KalmanFilter.project | ( | self, | |
| mean, | |||
| covariance ) |
Project state distribution to measurement space.
Args:
mean (ndarray): The state's mean vector (8 dimensional array).
covariance (ndarray): The state's covariance matrix (8x8
dimensional).
Returns:
(ndarray, ndarray): Returns the projected mean and covariance
matrix of the given state estimate.
Definition at line 102 of file kalman_filter.py.
| kalman_filter.KalmanFilter.update | ( | self, | |
| mean, | |||
| covariance, | |||
| measurement ) |
Run Kalman filter correction step.
Args:
mean (ndarray): The predicted state's mean vector (8 dimensional).
covariance (ndarray): The state's covariance matrix (8x8
dimensional).
measurement (ndarray): The 4 dimensional measurement vector
(x, y, a, h), where (x, y) is the center position, a the
aspect ratio, and h the height of the bounding box.
Returns:
(ndarray, ndarray): Returns the measurement-corrected state
distribution.
Definition at line 126 of file kalman_filter.py.
|
protected |
Definition at line 31 of file kalman_filter.py.
|
protected |
Definition at line 39 of file kalman_filter.py.
|
protected |
Definition at line 40 of file kalman_filter.py.
|
protected |
Definition at line 34 of file kalman_filter.py.