Commit ad1b1941 authored by oscar's avatar oscar

提交修改

parent 59fd78c7
......@@ -554,19 +554,19 @@ void TrackingRos::TrackingCameraCallBackFunc(const jfx_common_msgs::InferResesCo
{
for (auto& obj : cloudPtr->array)
{
//if (abs(obj.x - objMsg.x) < std::max(objMsg.l * 2.0, (double)3.0) && abs(obj.y - objMsg.y) < std::max(objMsg.w * 2.0, (double)3.0))
//{
// duplicate = 1;
// break;
//}
cv::RotatedRect rect1 = cv::RotatedRect(cv::Point2f(objMsg.x, objMsg.y), cv::Size2f(objMsg.l, objMsg.w), objMsg.rot_y);
cv::RotatedRect rect2 = cv::RotatedRect(cv::Point2f(obj.x, obj.y), cv::Size2f(obj.l, obj.w), obj.rot_y * 180 / 3.1415926);
float rate = calcIntersectionRate(rect1, rect2);
if (rate > m_lidar_camera_msg_iou)
if (abs(obj.x - objMsg.x) < std::max(objMsg.l * 1.2, (double)2.0) && abs(obj.y - objMsg.y) < std::max(objMsg.w * 1.2, (double)2.0))
{
duplicate = 1;
break;
}
//cv::RotatedRect rect1 = cv::RotatedRect(cv::Point2f(objMsg.x, objMsg.y), cv::Size2f(objMsg.l, objMsg.w), objMsg.rot_y);
//cv::RotatedRect rect2 = cv::RotatedRect(cv::Point2f(obj.x, obj.y), cv::Size2f(obj.l, obj.w), obj.rot_y * 180 / 3.1415926);
//float rate = calcIntersectionRate(rect1, rect2);
//if (rate > m_lidar_camera_msg_iou)
//{
// duplicate = 1;
// break;
//}
}
}
if (duplicate == 0)
......
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