srianant / kalman_filter_multi_object_tracking

Multiple object tracking using Kalman Filter and Hungarian Algorithm - OpenCV
MIT License
537 stars 165 forks source link

Incorrect usage of Kalman filtering #19

Open MercuryGithub1 opened 11 months ago

MercuryGithub1 commented 11 months ago

Incorrect usage of Kalman filtering, because there is no speed information inputed: self.tracks[i].prediction = self.tracks[i].KF.correct( detections[assignment[i]], 1 ) You should create KF_X and KF_Y filters for X and Y dimensions respectively, and use position and speed as input parameters. For example:

    self.tracks[i].state_X = self.tracks[i].KF_X.correct( np.array([[x_observation], [x_speed]]), 1)
    self.tracks[i].state_Y = self.tracks[i].KF_Y.correct( np.array([[y_observation], [y_speed]]), 1)
devnim commented 7 months ago

Could you please create a fork and make changes? It will be helpful to see and test it.