Commit 465ef35e authored by oscar's avatar oscar

提交gpu没有更新变量的问题

parent 029344bd
......@@ -48,6 +48,16 @@ void BaseTrack::Update(const std::vector<float>& data)
observation(i) = data[i];
kf_->Update(observation);
}
void BaseTrack::UpdateHit()
{
if (kf_ == nullptr)
return;
// get measurement update, reset coast cycle count
coast_cycles_ = 0;
// accumulate hit streak count
hit_streak_++;
}
int BaseTrack::GetStateData(std::vector<float>& data)
{
if (kf_ == nullptr)
......
......@@ -18,6 +18,7 @@ public:
virtual void Init(const std::vector<float>& data);
virtual void Predict();
virtual void Update(const std::vector<float>& data);
virtual void UpdateHit();
virtual int GetStateData(std::vector<float>& data);
virtual float GetNIS() const;
virtual float GetProb() const;
......
......@@ -105,6 +105,7 @@ int BaseTracker<T>::Run(const std::vector<std::vector<float> >& detections, std:
ns = m_tracker[id]->GetStatesNum();
}
bs_i++;
m_tracker[id]->UpdateHit();//gpu时需要update里面的变量
detectionsId[match.second] = id;
updateId[id] = match.second;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment