Get current position in bounding box format `(top left x, top left y, width, height)`. Returns ------- ndarray The bounding box.
(self)
| 78 | self._max_age = max_age |
| 79 | |
| 80 | def to_tlwh(self): |
| 81 | """Get current position in bounding box format `(top left x, top left y, |
| 82 | width, height)`. |
| 83 | Returns |
| 84 | ------- |
| 85 | ndarray |
| 86 | The bounding box. |
| 87 | """ |
| 88 | ret = self.mean[:4].copy() |
| 89 | ret[2] *= ret[3] |
| 90 | ret[:2] -= ret[2:] / 2 |
| 91 | return ret |
| 92 | |
| 93 | def to_tlbr(self): |
| 94 | """Get current position in bounding box format `(min x, miny, max x, |