26 #include "modules/perception/camera/lib/lane/postprocessor/denseline/proto/denseline_postprocessor.pb.h" 30 namespace perception {
61 std::string Name()
const override;
63 std::vector<std::vector<LanePointInfo>> GetLanelinePointSet();
64 std::vector<LanePointInfo> GetAllInferLinePointSet();
66 void GetLaneCCs(std::vector<unsigned char>* lane_map,
int* lane_map_width,
68 std::vector<ConnectedComponent>* connected_components,
69 std::vector<ConnectedComponent>* select_connected_components);
74 bool LocateLanelinePointSet(
const CameraFrame* frame);
76 void CalLaneMap(
const float* output_data,
int width,
int height,
77 std::vector<unsigned char>* lane_map);
79 bool SelectLanecenterCCs(
const std::vector<ConnectedComponent>& lane_ccs,
80 std::vector<ConnectedComponent>* select_lane_ccs);
82 bool ClassifyLaneCCsPosTypeInImage(
83 const std::vector<ConnectedComponent>& select_lane_ccs,
84 std::vector<LaneType>* ccs_pos_type);
88 std::vector<base::Point2DI> cc1_pixels = cc1.
GetPixels();
89 std::vector<base::Point2DI> cc2_pixels = cc2.
GetPixels();
90 return cc1_pixels.size() > cc2_pixels.size();
93 void InferPointSetFromLaneCenter(
94 const std::vector<ConnectedComponent>& lane_ccs,
95 const std::vector<LaneType>& ccs_pos_type,
96 std::vector<std::vector<LanePointInfo>>* lane_map_group_point_set);
98 void InferPointSetFromOneCC(
100 std::vector<std::vector<LanePointInfo>>* lane_map_group_point_set);
102 bool MaxScorePoint(
const float* score_pointer,
const float* x_pointer,
103 const int* x_count_pointer,
int y_pos,
106 void Convert2OriginalCoord(
107 const std::vector<std::vector<LanePointInfo>>& lane_map_group_point_set,
108 std::vector<std::vector<LanePointInfo>>* image_group_point_set);
110 void ClassifyLanelinePosTypeInImage(
111 const std::vector<std::vector<LanePointInfo>>& image_group_point_set,
112 std::vector<base::LaneLinePositionType>* laneline_type,
113 std::vector<bool>* line_flag);
115 bool LocateNeighborLaneLine(
const std::vector<float>& latitude_intersection,
116 int line_index,
bool left_flag,
119 void AddImageLaneline(
const std::vector<LanePointInfo>& image_point_set,
123 std::vector<base::LaneLine>* lane_marks);
128 int input_image_width_ = 1920;
129 int input_image_height_ = 1080;
130 int input_offset_x_ = 0;
131 int input_offset_y_ = 440;
132 int input_crop_width_ = 1920;
133 int input_crop_height_ = 640;
135 int omit_bottom_line_num_ = 3;
136 float laneline_map_score_thresh_ = 0.4f;
137 float laneline_point_score_thresh_ = 0.6f;
138 int laneline_point_min_num_thresh_ = 2;
139 float cc_valid_pixels_ratio_ = 2.0F;
140 float laneline_reject_dist_thresh_ = 50.0f;
142 int lane_map_width_ = 192;
143 int lane_map_height_ = 64;
144 int lane_map_dim_ = lane_map_width_ * lane_map_height_;
145 int net_model_channel_num_ = 7;
146 float lane_max_value_ = 1e6f;
147 float lane_map_width_inverse_ = 1.0f /
static_cast<float>(lane_map_width_);
148 float lane_map_height_inverse_ = 1.0f /
static_cast<float>(lane_map_height_);
150 lane::LanePostprocessorParam lane_postprocessor_param_;
153 std::vector<std::vector<LanePointInfo>> image_group_point_set_;
154 std::vector<std::vector<base::Point3DF>> camera_group_point_set_;
156 std::vector<LanePointInfo> image_laneline_point_set_;
158 std::vector<unsigned char> lane_map_;
161 std::vector<float> lane_output_;
162 std::vector<ConnectedComponent> lane_ccs_;
163 std::vector<ConnectedComponent> select_lane_ccs_;
Definition: common_functions.h:36
Definition: camera_frame.h:33
LaneType
Definition: denseline_lane_postprocessor.h:33
Definition: common_functions.h:234
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::vector< base::Point2DI > GetPixels() const
Definition: common_functions.h:255
LaneLineType
Definition: lane_struct.h:26
LaneLinePositionType
Definition of the position of a lane marking in respect to the ego lane.
Definition: lane_struct.h:34
DenselineLanePostprocessor()
Definition: denseline_lane_postprocessor.h:42
virtual ~DenselineLanePostprocessor()
Definition: denseline_lane_postprocessor.h:44
Definition: denseline_lane_postprocessor.h:40
bool Init(const char *binary_name)
Definition: base_lane_postprocessor.h:36
Definition: base_lane_postprocessor.h:34
Definition: base_lane_postprocessor.h:29