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);
71 std::string
Name()
const override;
76 bool LocateLanelinePointSet(
const CameraFrame* frame);
78 void CalLaneMap(
const float* output_data,
int width,
int height,
79 std::vector<unsigned char>* lane_map);
81 bool SelectLanecenterCCs(
const std::vector<ConnectedComponent>& lane_ccs,
82 std::vector<ConnectedComponent>* select_lane_ccs);
84 bool ClassifyLaneCCsPosTypeInImage(
85 const std::vector<ConnectedComponent>& select_lane_ccs,
86 std::vector<LaneType>* ccs_pos_type);
90 std::vector<base::Point2DI> cc1_pixels = cc1.
GetPixels();
91 std::vector<base::Point2DI> cc2_pixels = cc2.
GetPixels();
92 return cc1_pixels.size() > cc2_pixels.size();
95 void InferPointSetFromLaneCenter(
96 const std::vector<ConnectedComponent>& lane_ccs,
97 const std::vector<LaneType>& ccs_pos_type,
98 std::vector<std::vector<LanePointInfo>>* lane_map_group_point_set);
100 void InferPointSetFromOneCC(
102 std::vector<std::vector<LanePointInfo>>* lane_map_group_point_set);
104 bool MaxScorePoint(
const float* score_pointer,
const float* x_pointer,
105 const int* x_count_pointer,
int y_pos,
108 void Convert2OriginalCoord(
109 const std::vector<std::vector<LanePointInfo>>& lane_map_group_point_set,
110 std::vector<std::vector<LanePointInfo>>* image_group_point_set);
112 void ClassifyLanelinePosTypeInImage(
113 const std::vector<std::vector<LanePointInfo>>& image_group_point_set,
114 std::vector<base::LaneLinePositionType>* laneline_type,
115 std::vector<bool>* line_flag);
117 bool LocateNeighborLaneLine(
const std::vector<float>& latitude_intersection,
118 int line_index,
bool left_flag,
121 void AddImageLaneline(
const std::vector<LanePointInfo>& image_point_set,
125 std::vector<base::LaneLine>* lane_marks);
130 int input_image_width_ = 1920;
131 int input_image_height_ = 1080;
132 int input_offset_x_ = 0;
133 int input_offset_y_ = 440;
134 int input_crop_width_ = 1920;
135 int input_crop_height_ = 640;
137 int omit_bottom_line_num_ = 3;
138 float laneline_map_score_thresh_ = 0.4f;
139 float laneline_point_score_thresh_ = 0.6f;
140 int laneline_point_min_num_thresh_ = 2;
141 float cc_valid_pixels_ratio_ = 2.0F;
142 float laneline_reject_dist_thresh_ = 50.0f;
144 int lane_map_width_ = 192;
145 int lane_map_height_ = 64;
146 int lane_map_dim_ = lane_map_width_ * lane_map_height_;
147 int net_model_channel_num_ = 7;
148 float lane_max_value_ = 1e6f;
149 float lane_map_width_inverse_ = 1.0f /
static_cast<float>(lane_map_width_);
150 float lane_map_height_inverse_ = 1.0f /
static_cast<float>(lane_map_height_);
155 std::vector<std::vector<LanePointInfo>> image_group_point_set_;
156 std::vector<std::vector<base::Point3DF>> camera_group_point_set_;
158 std::vector<LanePointInfo> image_laneline_point_set_;
160 std::vector<unsigned char> lane_map_;
163 std::vector<float> lane_output_;
164 std::vector<ConnectedComponent> lane_ccs_;
165 std::vector<ConnectedComponent> select_lane_ccs_;
bool Process3D(const LanePostprocessorOptions &options, CameraFrame *frame) override
bool Process2D(const LanePostprocessorOptions &options, CameraFrame *frame) override
std::vector< std::vector< LanePointInfo > > GetLanelinePointSet()
bool Init(const LanePostprocessorInitOptions &options=LanePostprocessorInitOptions()) override
void GetLaneCCs(std::vector< unsigned char > *lane_map, int *lane_map_width, int *lane_map_height, std::vector< ConnectedComponent > *connected_components, std::vector< ConnectedComponent > *select_connected_components)