Commit 6ad05d9c authored by oscar's avatar oscar

提交更新

parent 55bc8f51
......@@ -59,6 +59,8 @@ public:
uint64_t m_lastLastTimestamp = 0;//记录上上一次的时间戳
double m_center_rot_y = 0;//通过计算轨迹上的五个点算出来的方向
std::string m_number;//记录车牌号,出现一次就一直记录
};
double correct_angle(std::vector<point2d>& points);
......@@ -478,6 +478,18 @@ void TrackingRos::ThreadTrackingProcess()
}
if(iter.second->m_obj)
last_type = iter.second->m_obj->type;
if (iter.second->m_number.empty() && !obj.license_plate_number.empty())
{
iter.second->m_number = obj.license_plate_number;
}
else if (!iter.second->m_number.empty() && !obj.license_plate_number.empty())
{
if (iter.second->m_number != obj.license_plate_number)
{
SDK_LOG(SDK_INFO, "car number change old = %s, new = %s", iter.second->m_number.c_str(), obj.license_plate_number.c_str());
}
}
obj.license_plate_number = iter.second->m_number;
iter.second->m_obj = std::make_shared<jfx_common_msgs::det_tracking>(obj);
}
else
......@@ -567,7 +579,7 @@ void TrackingRos::ThreadTrackingProcess()
target.reportType = "Pedestrian";
else
target.reportType = "Other_Truck";
target.vehicleNum = "0";
target.vehicleNum = obj.license_plate_number;
target.confidence = obj.score * 100;
target.location.x = obj.Lat;
target.location.y = obj.Long;
......
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