40 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
42 template <
typename T,
class EigenType>
46 bool Init(
const std::vector<std::string> &camera_names,
49 const std::vector<std::string> &camera_names,
50 const std::string &visual_camera,
53 const Eigen::Matrix4d &ex_lidar2imu,
const double pitch_adj,
54 const double yaw_adj,
const double roll_adj,
const int image_height,
55 const int image_width);
56 bool adjust_angles(
const std::string &camera_name,
const double pitch_adj,
57 const double yaw_adj,
const double roll_adj);
64 const Eigen::Affine3d &world2camera);
66 const std::string &camera_name,
const cv::Mat &img,
67 const CameraFrame &frame,
const Eigen::Matrix3d &intrinsic,
68 const Eigen::Matrix4d &extrinsic,
const Eigen::Affine3d &world2camera,
74 Eigen::Vector2d
image2ground(
const std::string &camera_name, cv::Point p_img);
76 const Eigen::Vector2d &p_ground);
83 void Set_ROI(
int input_offset_y,
int crop_height,
int crop_width) {
84 roi_start_ = input_offset_y;
85 roi_height_ = crop_height;
86 roi_width_ = crop_width;
89 const double pitch_radian,
const double yaw_radian,
90 const double roll_radian);
92 const double pitch_adj_degree,
93 const double yaw_adj_degree,
94 const double roll_adj_degree);
96 const Eigen::Matrix4d &extrinsic,
97 const Eigen::Vector4d &quaternion,
98 const double pitch_radian,
99 const double yaw_radian,
100 const double roll_radian);
103 bool key_handler(
const std::string &camera_name,
const int key);
116 std::map<std::string, cv::Mat> camera_image_;
117 cv::Mat world_image_;
120 double last_timestamp_ = 0.0;
121 int image_width_ = 1920;
122 int image_height_ = 1080;
123 int wide_pixel_ = 800;
124 double scale_ratio_ = 0.6;
129 double fov_cut_ratio_ = 0.55;
130 double degree_to_radian_factor_ = M_PI / 180.0;
131 double radian_to_degree_factor_ = 180.0 / M_PI;
133 std::map<std::string, double> pitch_adj_degree_;
134 std::map<std::string, double> yaw_adj_degree_;
135 std::map<std::string, double> roll_adj_degree_;
137 double max_pitch_degree_ = 5.0;
138 double min_pitch_degree_ = -5.0;
139 double max_yaw_degree_ = 5.0;
140 double min_yaw_degree_ = -5.0;
141 double max_roll_degree_ = 5.0;
142 double min_roll_degree_ = -5.0;
148 int roi_height_ = 768;
149 int roi_start_ = 312;
150 int roi_width_ = 1920;
155 std::vector<std::string> camera_names_;
156 std::string visual_camera_ =
"front_6mm";
160 Eigen::Matrix4d ex_lidar2imu_;
162 Eigen::Matrix4d ex_camera2imu_;
163 Eigen::Matrix4d ex_imu2camera_;
164 Eigen::Matrix4d ex_car2camera_;
165 Eigen::Matrix4d ex_camera2car_;
166 Eigen::Matrix4d ex_imu2car_;
167 Eigen::Matrix4d adjusted_camera2car_ = Eigen::Matrix4d::Identity();
169 Eigen::Matrix4d projection_matrix_;
173 bool use_class_color_ =
true;
174 bool capture_screen_ =
false;
175 bool capture_video_ =
false;
176 bool show_camera_box2d_ =
true;
177 bool show_camera_box3d_ =
true;
178 bool show_camera_bdv_ =
true;
179 bool show_virtual_egolane_ =
true;
180 bool show_radar_pc_ =
true;
181 bool show_fusion_ =
false;
182 bool show_associate_color_ =
false;
183 bool show_type_id_label_ =
true;
184 bool show_verbose_ =
false;
185 bool show_trajectory_ =
true;
186 bool show_vp_grid_ =
true;
187 bool draw_lane_objects_ =
true;
188 bool show_box_ =
true;
189 bool show_velocity_ =
false;
190 bool show_polygon_ =
true;
191 bool show_text_ =
false;
192 bool show_help_text_ =
false;
193 bool manual_calibration_mode_ =
false;
194 bool show_homography_object_ =
false;
195 unsigned int show_lane_count_ = 1;
196 std::string help_str_;
198 cv::Scalar color_cipv_ = cv::Scalar(255, 255, 255);
199 cv::Scalar virtual_lane_color_ = cv::Scalar(0, 0, 255);
200 int line_thickness_ = 2;
201 int cipv_line_thickness_ = 6;
202 int trajectory_line_thickness_ = 1;
203 double speed_limit_ = 1.0;
204 unsigned int lane_step_num_ = 20;
206 unsigned int all_camera_recieved_ = 0;
bool Init_all_info_single_camera(const std::vector< std::string > &camera_names, const std::string &visual_camera, const EigenMap< std::string, Eigen::Matrix3f > &intrinsic_map, const EigenMap< std::string, Eigen::Matrix4d > &extrinsic_map, const Eigen::Matrix4d &ex_lidar2imu, const double pitch_adj, const double yaw_adj, const double roll_adj, const int image_height, const int image_width)
void Draw2Dand3D_all_info_single_camera(const std::string &camera_name, const cv::Mat &img, const CameraFrame &frame, const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, const Eigen::Affine3d &world2camera, const base::MotionBufferPtr motion_buffer)