91 const float &yaw_rate,
const float &time_diff);
106 bool is_in_image(
const Eigen::Vector2f &point)
const {
110 x >= 0 && x < image_width_ && y >= 0 && y < image_height_;
111 return (is_in_image);
114 bool IsTravelingStraight(
const float &vehicle_yaw_changed)
const {
115 float abs_yaw =
static_cast<float>(fabs(vehicle_yaw_changed));
119 bool GetVanishingPoint(
const EgoLane &lane, VanishingPoint *v_point);
121 int GetCenterIndex(
const Eigen::Vector2f *points,
int nr_pts)
const;
123 bool SelectTwoPointsFromLineForVanishingPoint(
const LaneLine &line,
126 bool GetIntersectionFromTwoLineSegments(
const float line_seg_l[4],
127 const float line_seg_r[4],
128 VanishingPoint *v_point);
130 void PushVanishingPoint(
const VanishingPoint &v_point);
132 bool PopVanishingPoint(VanishingPoint *v_point);
134 bool GetPitchFromVanishingPoint(
const VanishingPoint &vp,
float *pitch)
const;
136 bool AddPitchToHistogram(
float pitch);
139 int image_width_ = 0;
140 int image_height_ = 0;
141 float k_mat_[9] = {0};
142 float pitch_cur_ = 0.0f;
143 float pitch_estimation_ = 0.0f;
144 float vanishing_row_ = 0.0f;
145 float accumulated_straight_driving_in_meter_ = 0.0f;
148 HistogramEstimator pitch_histogram_;
149 std::deque<VanishingPoint> vp_buffer_;
150 CalibratorParams params_;