43 const std::unordered_map<int, ObstacleHistory>& obstacle_id_history_map);
45 bool GetMapById(
const int obstacle_id, cv::Mat* feature_map);
48 cv::Point2i GetTransPoint(
const double x,
const double y,
const double base_x,
49 const double base_y) {
50 return cv::Point2i(
static_cast<int>((x - base_x) / 0.1),
51 static_cast<int>(2000 - (y - base_y) / 0.1));
54 void DrawBaseMap(
const double x,
const double y,
const double base_x,
57 void DrawBaseMapThread();
61 const cv::Scalar& color = cv::Scalar(64, 64, 64));
63 void DrawJunctions(
const common::PointENU& center_point,
const double base_x,
65 const cv::Scalar& color = cv::Scalar(128, 128, 128));
67 void DrawCrosswalks(
const common::PointENU& center_point,
const double base_x,
69 const cv::Scalar& color = cv::Scalar(192, 192, 192));
73 const cv::Scalar& color = cv::Scalar(255, 255, 255));
75 cv::Scalar HSVtoRGB(
double H = 1.0,
double S = 1.0,
double V = 1.0);
77 void DrawRect(
const Feature& feature,
const cv::Scalar& color,
78 const double base_x,
const double base_y, cv::Mat* img);
80 void DrawPoly(
const Feature& feature,
const cv::Scalar& color,
81 const double base_x,
const double base_y, cv::Mat* img);
83 void DrawHistory(
const ObstacleHistory& history,
const cv::Scalar& color,
84 const double base_x,
const double base_y, cv::Mat* img);
87 void DrawADCTrajectory(
const cv::Scalar& color,
const double base_x,
88 const double base_y, cv::Mat* img);
90 cv::Mat CropArea(
const cv::Mat& input_img,
const cv::Point2i& center_point,
91 const double heading);
93 cv::Mat CropByHistory(
const ObstacleHistory& history,
const cv::Scalar& color,
94 const double base_x,
const double base_y);
100 double base_y_ = 0.0;
102 std::mutex draw_base_map_thread_mutex_;
106 double curr_base_x_ = 0.0;
107 double curr_base_y_ = 0.0;
109 std::unordered_map<int, ObstacleHistory> obstacle_id_history_map_;
112 std::future<void> task_future_;
114 bool started_drawing_ =
false;