Commit 7672746b authored by oscar's avatar oscar

提交数据修正逻辑

parent a23cc450
......@@ -47,6 +47,10 @@ void BaseTrack::Update(const std::vector<float>& data)
for (int i = 0; i < data.size(); i++)
observation(i) = data[i];
kf_->Update(observation);
}
void BaseTrack::UpdateDataCheck(const std::vector<float>& data, std::vector<float>& out)
{
}
void BaseTrack::UpdateHit()
{
......
......@@ -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 UpdateDataCheck(const std::vector<float>& data, std::vector<float>& out);//对于输入数据进行修正
virtual void UpdateHit();
virtual int GetStateData(std::vector<float>& data);
virtual int GetPredictData(std::vector<float>& data);
......
......@@ -94,10 +94,12 @@ int BaseTracker<T>::Run(const std::vector<std::vector<float> >& detections, std:
for (const auto& match : matched)
{
const auto& id = match.first;
std::vector<float> cre_det;
m_tracker[id]->UpdateDataCheck(detections[match.second], cre_det);
float* ptr_Z = Z.get() + bs_i * no;
for (int i = 0; i < no; i++)
{
ptr_Z[i] = detections[match.second][i];
ptr_Z[i] = cre_det[i];
}
X.get()[bs_i] = m_tracker[id]->GetStatesXPtr();
P.get()[bs_i] = m_tracker[id]->GetPredictPtr();
......
......@@ -215,3 +215,7 @@ int Track3D::GetKFDataOrder(std::vector<int>& order)
order.push_back(6);
return 0;
}
void Track3D::UpdateDataCheck(const std::vector<float>& data, std::vector<float>& out)
{
}
\ No newline at end of file
......@@ -24,5 +24,7 @@ public:
virtual int GetIouDataOrder(std::vector<int>& order);
virtual int GetKFDataOrder(std::vector<int>& order);
virtual void UpdateDataCheck(const std::vector<float>& data, std::vector<float>& out);//对于输入数据进行修正
trackOjbPtr m_obj = nullptr;
};
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