trackforge / trackers / common / cmc
Module cmc
Camera motion compensation (CMC) shared across trackers.
A CameraMotion is a 2x3 affine transform that maps coordinates from the
previous frame into the current frame. Callers estimate it however they like
(for example image registration with OpenCV in a demo) and pass it to a
tracker's update; the tracker warps its predicted track states so motion
association stays valid under a moving camera. Trackers that consume it (Deep
OC-SORT today, BoT-SORT and StrongSORT++ in the future) all apply it the same
way through [super::KalmanTrack::apply_camera_motion].
Quick Reference
| Item | Kind | Description |
|---|---|---|
CameraMotion |
struct | A 2x3 affine camera-motion transform [[a, b, tx], [c, d, ty]]. |
Types
CameraMotion
A 2x3 affine camera-motion transform [[a, b, tx], [c, d, ty]].
Maps a previous-frame point (x, y) to (a*x + b*y + tx, c*x + d*y + ty).
The default is the identity (no camera motion).
Fields
| Name | Type | Description |
|---|---|---|
a |
f32 |
Row 0 of the linear part. |
tx |
f32 |
Horizontal translation. |
c |
f32 |
Row 1 of the linear part. |
ty |
f32 |
Vertical translation. |
Implementations
Build a transform from the six affine coefficients.
The identity transform (no camera motion).
Whether this transform is the identity, so application can be skipped.
Warp a Kalman mean and covariance in place.
Warp an XYAH observation [cx, cy, aspect, height] in place.
Trait Implementations
impl<R> ReadPrimitive<R> for CameraMotion