Commit 24f30b77 authored by oscar's avatar oscar

提交测试

parent e4002a61
......@@ -181,6 +181,17 @@ double calcIntersectionArea(cv::RotatedRect rect1, cv::RotatedRect rect2)
double Track3D::CalculateIou(const std::vector<float>& data)
{
if (data.size() != 8)
{
SDK_LOG(SDK_INFO, "CalculateIou data size != 8");
return 0.0f;
}
if (m_obj == nullptr)
return 0.0f;
int input_type = data[0];
int obj_type = m_obj->type;
if (input_type != obj_type)
return 0.0f;
std::vector<float> states;
GetStateData(states);
......@@ -191,7 +202,7 @@ double Track3D::CalculateIou(const std::vector<float>& data)
cv::RotatedRect rect1 = cv::RotatedRect(cv::Point2f(states[0], states[1]), cv::Size2f(states[4], states[5]), states[3]*180 / 3.1415926);
cv::RotatedRect rect2 = cv::RotatedRect(cv::Point2f(data[0], data[1]), cv::Size2f(data[4], data[5]), data[3]*180/3.1415926);
cv::RotatedRect rect2 = cv::RotatedRect(cv::Point2f(data[1], data[2]), cv::Size2f(data[5], data[6]), data[4]*180/3.1415926);
uint64_t begin = GetCurTime();
double iou_3d = 0.0f;
......
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