AutoCar  v1.0.0
draw.h
1 #ifndef __DRAW_H__
2 #define __DRAW_H__
3 
4 #include <opencv2/opencv.hpp>
5 #include <random>
6 #include <chrono>
7 #define _DEBUG_VISION
8 
9 #ifdef _DEBUG_VISION
10 
11 void draw_rotated_rect(const cv::Mat &img, const cv::RotatedRect &rect, const cv::Scalar &color, int thickness=1);
12 void draw_rotated_rects(const cv::Mat &img, const std::vector<cv::RotatedRect> &rects, const cv::Scalar &color, int thickness=1, bool tab=false, const cv::Scalar &text_color=cv::Scalar(100));
13 void draw_circle(const cv::Mat &img, const cv::Point &center, int radius, const cv::Scalar &color, int thickness=1);
14 void imshowd(const cv::String &winname, const cv::Mat &img);
15 
16 #else
17 
18 #define draw_rotated_rect(...)
19 #define draw_rotated_rects(...)
20 #define draw_circle(...)
21 #define imshowd(...)
22 
23 #endif // _DEBUG_VISION
24 
25 
26 #endif // !__DRAW_H__