Perform Kalman filter measurement update step and update the feature cache. Parameters ---------- kf : kalman_filter.KalmanFilter The Kalman filter. detection : Detection The associated detection.
(self, kf, detection)
| 118 | self.increment_age() |
| 119 | |
| 120 | def update(self, kf, detection): |
| 121 | """Perform Kalman filter measurement update step and update the feature |
| 122 | cache. |
| 123 | Parameters |
| 124 | ---------- |
| 125 | kf : kalman_filter.KalmanFilter |
| 126 | The Kalman filter. |
| 127 | detection : Detection |
| 128 | The associated detection. |
| 129 | """ |
| 130 | self.mean, self.covariance = kf.update( |
| 131 | self.mean, self.covariance, detection.to_xyah()) |
| 132 | self.features.append(detection.feature) |
| 133 | |
| 134 | self.hits += 1 |
| 135 | self.time_since_update = 0 |
| 136 | if self.state == TrackState.Tentative and self.hits >= self._n_init: |
| 137 | self.state = TrackState.Confirmed |
| 138 | |
| 139 | def mark_missed(self): |
| 140 | """Mark this track as missed (no association at the current time step). |