Apollo  v5.5.0
Open source self driving car software
lane_common.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 #pragma once
17 #include <string>
18 #include <vector>
19 #include "opencv2/opencv.hpp"
20 
24 
25 DECLARE_string(list);
26 DECLARE_string(file_title);
27 DECLARE_string(debug_file);
28 DECLARE_string(save_dir);
29 DECLARE_string(file_ext_name);
30 DECLARE_string(file_debug_list);
31 DECLARE_bool(lane_line_debug);
32 DECLARE_bool(lane_cc_debug);
33 #if 0
34 DECLARE_bool(lane_center_debug);
35 DECLARE_bool(lane_ego_debug);
36 #endif
37 DECLARE_bool(lane_result_output);
38 #if 0
39 DECLARE_bool(lane_points_output);
40 DECLARE_string(image_dir);
41 #endif
42 DECLARE_string(camera_intrinsics_yaml);
43 
44 namespace apollo {
45 namespace perception {
46 namespace camera {
47 // draw detected lane point_set
49  const cv::Mat& image,
50  const std::vector<std::vector<LanePointInfo>>& detect_laneline_point_set,
51  const std::string& save_path);
52 
53 void show_all_infer_point_set(const cv::Mat& image,
54  const std::vector<LanePointInfo>& infer_point_set,
55  const std::string& save_path);
56 
57 //
58 void show_lane_lines(const cv::Mat& image,
59  const std::vector<base::LaneLine>& lane_marks,
60  const std::string& save_path);
61 
62 //
63 void show_lane_ccs(const std::vector<unsigned char>& lane_map,
64  const int lane_map_width, const int lane_map_height,
65  const std::vector<ConnectedComponent>& lane_ccs,
66  const std::vector<ConnectedComponent>& select_lane_ccs,
67  const std::string& save_path);
68 //
69 // save the lane line and points to json format
70 void output_laneline_to_json(const std::vector<base::LaneLine>& lane_objects,
71  const std::string& save_path);
72 
73 void output_laneline_to_txt(const std::vector<base::LaneLine>& lane_objects,
74  const std::string& save_path);
75 } // namespace camera
76 } // namespace perception
77 } // namespace apollo
DECLARE_string(list)
void output_laneline_to_txt(const std::vector< base::LaneLine > &lane_objects, const std::string &save_path)
Definition: blob.h:72
void output_laneline_to_json(const std::vector< base::LaneLine > &lane_objects, const std::string &save_path)
DECLARE_bool(lane_line_debug)
void show_detect_point_set(const cv::Mat &image, const std::vector< std::vector< LanePointInfo >> &detect_laneline_point_set, const std::string &save_path)
void show_lane_lines(const cv::Mat &image, const std::vector< base::LaneLine > &lane_marks, const std::string &save_path)
void show_all_infer_point_set(const cv::Mat &image, const std::vector< LanePointInfo > &infer_point_set, const std::string &save_path)
void show_lane_ccs(const std::vector< unsigned char > &lane_map, const int lane_map_width, const int lane_map_height, const std::vector< ConnectedComponent > &lane_ccs, const std::vector< ConnectedComponent > &select_lane_ccs, const std::string &save_path)