diff --git a/include/ByteTrack/BYTETracker.h b/include/ByteTrack/BYTETracker.h index 4338e1e..b9769e2 100644 --- a/include/ByteTrack/BYTETracker.h +++ b/include/ByteTrack/BYTETracker.h @@ -1,11 +1,14 @@ #pragma once +#include "ByteTrack/STrack.h" +#include "ByteTrack/lapjv.h" +#include "ByteTrack/Object.h" + +#include +#include #include #include - -#include -#include -#include +#include namespace byte_track { @@ -53,7 +56,7 @@ class BYTETracker std::vector &rowsol, std::vector &colsol, bool extend_cost = false, - float cost_limit = LONG_MAX, + float cost_limit = std::numeric_limits::max(), bool return_cost = true) const; private: diff --git a/include/ByteTrack/KalmanFilter.h b/include/ByteTrack/KalmanFilter.h index 39e91f2..18842a7 100644 --- a/include/ByteTrack/KalmanFilter.h +++ b/include/ByteTrack/KalmanFilter.h @@ -1,8 +1,8 @@ #pragma once -#include +#include "Eigen/Dense" -#include +#include "ByteTrack/Rect.h" namespace byte_track { diff --git a/include/ByteTrack/Object.h b/include/ByteTrack/Object.h index 303bed9..9302d64 100644 --- a/include/ByteTrack/Object.h +++ b/include/ByteTrack/Object.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "ByteTrack/Rect.h" namespace byte_track { diff --git a/include/ByteTrack/Rect.h b/include/ByteTrack/Rect.h index 067d267..b5ab291 100644 --- a/include/ByteTrack/Rect.h +++ b/include/ByteTrack/Rect.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "Eigen/Dense" namespace byte_track { diff --git a/include/ByteTrack/STrack.h b/include/ByteTrack/STrack.h index b4b372b..476ed11 100644 --- a/include/ByteTrack/STrack.h +++ b/include/ByteTrack/STrack.h @@ -1,7 +1,9 @@ #pragma once -#include -#include +#include "ByteTrack/Rect.h" +#include "ByteTrack/KalmanFilter.h" + +#include namespace byte_track { diff --git a/include/ByteTrack/lapjv.h b/include/ByteTrack/lapjv.h index b60cc85..2a81c00 100644 --- a/include/ByteTrack/lapjv.h +++ b/include/ByteTrack/lapjv.h @@ -1,10 +1,6 @@ #pragma once -#include -#include -#include - -#include +#include namespace byte_track { diff --git a/src/BYTETracker.cpp b/src/BYTETracker.cpp index 16fbe85..a02abc1 100644 --- a/src/BYTETracker.cpp +++ b/src/BYTETracker.cpp @@ -1,4 +1,12 @@ -#include +#include "ByteTrack/BYTETracker.h" + +#include +#include +#include +#include +#include +#include +#include byte_track::BYTETracker::BYTETracker(const int& frame_rate, const int& track_buffer, @@ -450,14 +458,14 @@ double byte_track::BYTETracker::execLapjv(const std::vector> } } - if (extend_cost || cost_limit < LONG_MAX) + if (extend_cost || cost_limit < std::numeric_limits::max()) { n = n_rows + n_cols; cost_c_extended.resize(n); for (size_t i = 0; i < cost_c_extended.size(); i++) cost_c_extended[i].resize(n); - if (cost_limit < LONG_MAX) + if (cost_limit < std::numeric_limits::max()) { for (size_t i = 0; i < cost_c_extended.size(); i++) { diff --git a/src/KalmanFilter.cpp b/src/KalmanFilter.cpp index c5ee2e6..a425bd2 100644 --- a/src/KalmanFilter.cpp +++ b/src/KalmanFilter.cpp @@ -1,4 +1,6 @@ -#include +#include "ByteTrack/KalmanFilter.h" + +#include byte_track::KalmanFilter::KalmanFilter(const float& std_weight_position, const float& std_weight_velocity) : diff --git a/src/Object.cpp b/src/Object.cpp index 60e62fb..22bfe37 100644 --- a/src/Object.cpp +++ b/src/Object.cpp @@ -1,4 +1,4 @@ -#include +#include "ByteTrack/Object.h" byte_track::Object::Object(const Rect &_rect, const int &_label, diff --git a/src/Rect.cpp b/src/Rect.cpp index e4a77c6..48d1691 100644 --- a/src/Rect.cpp +++ b/src/Rect.cpp @@ -1,4 +1,6 @@ -#include +#include "ByteTrack/Rect.h" + +#include template byte_track::Rect::Rect(const T &x, const T &y, const T &width, const T &height) : diff --git a/src/STrack.cpp b/src/STrack.cpp index 38cbb03..744b254 100644 --- a/src/STrack.cpp +++ b/src/STrack.cpp @@ -1,4 +1,6 @@ -#include +#include "ByteTrack/STrack.h" + +#include byte_track::STrack::STrack(const Rect& rect, const float& score) : kalman_filter_(), diff --git a/src/lapjv.cpp b/src/lapjv.cpp index 53e0a86..c393ce0 100644 --- a/src/lapjv.cpp +++ b/src/lapjv.cpp @@ -1,4 +1,8 @@ -#include +#include "ByteTrack/lapjv.h" + +#include +#include +#include #define LAPJV_CPP_NEW(x, t, n) if ((x = (t *)malloc(sizeof(t) * (n))) == 0) { return -1; } #define LAPJV_CPP_FREE(x) if (x != 0) { free(x); x = 0; } diff --git a/test/test_BYTETracker.cpp b/test/test_BYTETracker.cpp index 9a0f220..284dde9 100644 --- a/test/test_BYTETracker.cpp +++ b/test/test_BYTETracker.cpp @@ -1,11 +1,13 @@ -#include +#include "ByteTrack/BYTETracker.h" -#include +#include "gtest/gtest.h" -#include -#include -#include -#include +#include "boost/property_tree/ptree.hpp" +#include "boost/property_tree/json_parser.hpp" +#include "boost/foreach.hpp" +#include "boost/optional.hpp" + +#include namespace {