Apollo  6.0
Open source self driving car software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
18 #include <string>
19 #include <vector>
20 
21 #include <opencv2/opencv.hpp>
22 
26 
27 DECLARE_string(list);
28 DECLARE_string(file_title);
29 DECLARE_string(debug_file);
30 DECLARE_string(save_dir);
31 DECLARE_string(file_ext_name);
32 DECLARE_string(file_debug_list);
33 DECLARE_bool(lane_line_debug);
34 DECLARE_bool(lane_cc_debug);
35 #if 0
36 DECLARE_bool(lane_center_debug);
37 DECLARE_bool(lane_ego_debug);
38 #endif
39 DECLARE_bool(lane_result_output);
40 #if 0
41 DECLARE_bool(lane_points_output);
42 DECLARE_string(image_dir);
43 #endif
44 DECLARE_string(camera_intrinsics_yaml);
45 
46 namespace apollo {
47 namespace perception {
48 namespace camera {
49 // draw detected lane point_set
51  const cv::Mat& image,
52  const std::vector<std::vector<LanePointInfo>>& detect_laneline_point_set,
53  const std::string& save_path);
54 
55 void show_all_infer_point_set(const cv::Mat& image,
56  const std::vector<LanePointInfo>& infer_point_set,
57  const std::string& save_path);
58 
59 //
60 void show_lane_lines(const cv::Mat& image,
61  const std::vector<base::LaneLine>& lane_marks,
62  const std::string& save_path);
63 
64 //
65 void show_lane_ccs(const std::vector<unsigned char>& lane_map,
66  const int lane_map_width, const int lane_map_height,
67  const std::vector<ConnectedComponent>& lane_ccs,
68  const std::vector<ConnectedComponent>& select_lane_ccs,
69  const std::string& save_path);
70 //
71 // save the lane line and points to json format
72 void output_laneline_to_json(const std::vector<base::LaneLine>& lane_objects,
73  const std::string& save_path);
74 
75 void output_laneline_to_txt(const std::vector<base::LaneLine>& lane_objects,
76  const std::string& save_path);
77 } // namespace camera
78 } // namespace perception
79 } // namespace apollo
DECLARE_string(list)
void output_laneline_to_txt(const std::vector< base::LaneLine > &lane_objects, const std::string &save_path)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
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)