Commit 14e09eac authored by oscar's avatar oscar

提交代码

parent 21d4b14f
......@@ -91,14 +91,15 @@ double Track3D::CalculateIou(const std::vector<float>& data)
GetStateData(states);
//SDK_LOG(SDK_INFO, "calculate size1 = %d, size2 = %d",states.size(),data.size());
//std::vector<float> truth_poses{ states[0], states[1], states[2],0, 0, states[6], states[3]/2, states[4]/2, states[5]/2 };
//std::vector<float> landmark_poses{ data[0], data[1], data[2],0, 0, data[6], data[3]/2, data[4]/2, data[5]/2 };
std::vector<float> truth_poses{ states[0], states[1], states[2],0, 0, states[6]/180* 3.1415926, states[3]/2, states[4]/2, states[5]/2 };
std::vector<float> landmark_poses{ data[0], data[1], data[2],0, 0, data[6] / 180 * 3.1415926, data[3]/2, data[4]/2, data[5]/2 };
double i3d_iou = CuboidIoU(truth_poses, landmark_poses);
cv::RotatedRect rect1 = cv::RotatedRect(cv::Point2f(states[0], states[1]), cv::Size2f(states[3], states[4]), states[6]);
cv::RotatedRect rect2 = cv::RotatedRect(cv::Point2f(data[0], data[1]), cv::Size2f(data[3], data[4]), data[6]);
uint64_t begin = GetCurTime();
//double iou_3d = CuboidIoU(truth_poses, landmark_poses);
double iou_2d = calcIOU(rect1,rect2);
double iou_3d = 0;
if (iou_2d > 0) {
......@@ -120,6 +121,10 @@ double Track3D::CalculateIou(const std::vector<float>& data)
//SDK_LOG(SDK_INFO, "CuboidIoU time = %llu", GetCurTime() - begin);
//if (iou_3d > m_iou_threshold)
// SDK_LOG(SDK_INFO, "iou_3d = %f", iou_3d);
if (i3d_iou > 0 || iou_3d > 0)
{
SDK_LOG(SDK_INFO, "i3d_iou = %f, iou_3d = %f", i3d_iou, iou_3d);
}
return iou_3d;
}
......
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