Commit a3b94d41 authored by oscar's avatar oscar

提交测试

parent 6799e921
......@@ -265,12 +265,22 @@ void BaseTracker<T>::AssociateDetectionsToTrackers(const std::vector<std::vector
std::shared_ptr<float> detect_ptr = std::shared_ptr<float>(new float[detect_size], [](float* p) {if (p) delete[] p; p = nullptr; });
std::shared_ptr<float> tracker_ptr = std::shared_ptr<float>(new float[tracker_size], [](float* p) {if (p) delete[] p; p = nullptr; });
std::shared_ptr<float> iou_ptr = std::shared_ptr<float>(new float[iou_size], [](float* p) {if (p) delete[] p; p = nullptr; });
std::vector<int> det_type;
for (int i = 0; i < detections.size(); i++)
{
for (int j = 0; j < measure_size; j++)
std::vector<float> out;
int ob_type = 0;
T::MeasureData(detections[i], out, ob_type);
for (int j = 0; j < out.size(); j++)
{
detect_ptr.get()[i * measure_size + j] = detections[i][iouOrder[j]];
detect_ptr.get()[i * measure_size + j] = out[j];
}
det_type.push_back(ob_type);
//for (int j = 0; j < measure_size; j++)
//{
// detect_ptr.get()[i * measure_size + j] = detections[i][iouOrder[j]];
//}
}
for (int i = 0; i < tracker_states.size(); i++)
{
......
......@@ -355,3 +355,9 @@ void Track3D::SetValues(std::vector<float>& data)
0, 0, 0, 0, 0, 0, 1;
}
void Track3D::MeasureData(const std::vector<float>& input, std::vector<float>& out, int& obj_type)
{
}
......@@ -45,6 +45,8 @@ public:
virtual void SetValues(std::vector<float>& data);
static void MeasureData(const std::vector<float>& input, std::vector<float>& out, int& obj_type);
trackOjbPtr m_obj = nullptr;
std::vector<point2d> m_points;//保存最近的5个移动的点位
......
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