Meta Byte Track
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kalmanFilter.h 806B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "dataType.h"
  3. namespace byte_kalman
  4. {
  5. class KalmanFilter
  6. {
  7. public:
  8. static const double chi2inv95[10];
  9. KalmanFilter();
  10. KAL_DATA initiate(const DETECTBOX& measurement);
  11. void predict(KAL_MEAN& mean, KAL_COVA& covariance);
  12. KAL_HDATA project(const KAL_MEAN& mean, const KAL_COVA& covariance);
  13. KAL_DATA update(const KAL_MEAN& mean,
  14. const KAL_COVA& covariance,
  15. const DETECTBOX& measurement);
  16. Eigen::Matrix<float, 1, -1> gating_distance(
  17. const KAL_MEAN& mean,
  18. const KAL_COVA& covariance,
  19. const std::vector<DETECTBOX>& measurements,
  20. bool only_position = false);
  21. private:
  22. Eigen::Matrix<float, 8, 8, Eigen::RowMajor> _motion_mat;
  23. Eigen::Matrix<float, 4, 8, Eigen::RowMajor> _update_mat;
  24. float _std_weight_position;
  25. float _std_weight_velocity;
  26. };
  27. }