Compare commits
2 Commits
61a92c8620
...
7facae7a1a
| Author | SHA1 | Date | |
|---|---|---|---|
| 7facae7a1a | |||
| 770247f9b6 |
@@ -61,8 +61,16 @@ void get_corners()
|
|||||||
// L 角点阈值
|
// L 角点阈值
|
||||||
if (Lpt0_found_barrier == false && (40. / 180. * PI32) < conf && conf < (160. / 180. * PI32) && i < 0.6 / RESAMPLEDIST) {
|
if (Lpt0_found_barrier == false && (40. / 180. * PI32) < conf && conf < (160. / 180. * PI32) && i < 0.6 / RESAMPLEDIST) {
|
||||||
Lpt0_rpts0s_id_barrier = i;
|
Lpt0_rpts0s_id_barrier = i;
|
||||||
|
if (pts_resample_left[i][1] <= pts_resample_left[clip(i + 2, 0, pts_resample_left_count - 1)][1])
|
||||||
|
{
|
||||||
Lpt0_found_barrier = true;
|
Lpt0_found_barrier = true;
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
Lpt0_found_barrier = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Lpt0_found_barrier = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Lpt0_found_barrier) {
|
if (Lpt0_found_barrier) {
|
||||||
float angle1 = calculate_vector_angle(pts_resample_left[Lpt0_rpts0s_id_barrier][1], pts_resample_left[Lpt0_rpts0s_id_barrier][0], pts_resample_left[Lpt0_rpts0s_id_barrier + 5][1], pts_resample_left[Lpt0_rpts0s_id_barrier + 5][0]);
|
float angle1 = calculate_vector_angle(pts_resample_left[Lpt0_rpts0s_id_barrier][1], pts_resample_left[Lpt0_rpts0s_id_barrier][0], pts_resample_left[Lpt0_rpts0s_id_barrier + 5][1], pts_resample_left[Lpt0_rpts0s_id_barrier + 5][0]);
|
||||||
@@ -73,6 +81,9 @@ void get_corners()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < pts_resample_right_count; i++) {
|
for (int i = 0; i < pts_resample_right_count; i++) {
|
||||||
if (angle_new_right[i] == 0) continue;
|
if (angle_new_right[i] == 0) continue;
|
||||||
int im1 = clip(i - (int)round(ANGLEDIST / RESAMPLEDIST), 0, pts_resample_right_count - 1);
|
int im1 = clip(i - (int)round(ANGLEDIST / RESAMPLEDIST), 0, pts_resample_right_count - 1);
|
||||||
@@ -118,8 +129,16 @@ void get_corners()
|
|||||||
|
|
||||||
if (Lpt1_found_barrier == false && (40. / 180. * PI32) < conf && conf < 160. / 180. * PI32 && i < 0.6 / RESAMPLEDIST) {
|
if (Lpt1_found_barrier == false && (40. / 180. * PI32) < conf && conf < 160. / 180. * PI32 && i < 0.6 / RESAMPLEDIST) {
|
||||||
Lpt1_rpts1s_id_barrier = i;
|
Lpt1_rpts1s_id_barrier = i;
|
||||||
|
|
||||||
|
if (pts_resample_right[i][1] >= pts_resample_right[clip(i + 2, 0, pts_resample_left_count - 1)][1])
|
||||||
|
{
|
||||||
Lpt1_found_barrier = true;
|
Lpt1_found_barrier = true;
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
Lpt1_found_barrier = false;
|
||||||
|
}
|
||||||
|
//Lpt1_found_barrier = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Lpt1_found_barrier) {
|
if (Lpt1_found_barrier) {
|
||||||
float angle2 = calculate_vector_angle(pts_resample_right[Lpt1_rpts1s_id_barrier][1], pts_resample_right[Lpt1_rpts1s_id_barrier][0], pts_resample_right[Lpt1_rpts1s_id_barrier + 5][1], pts_resample_right[Lpt1_rpts1s_id_barrier + 5][0]);
|
float angle2 = calculate_vector_angle(pts_resample_right[Lpt1_rpts1s_id_barrier][1], pts_resample_right[Lpt1_rpts1s_id_barrier][0], pts_resample_right[Lpt1_rpts1s_id_barrier + 5][1], pts_resample_right[Lpt1_rpts1s_id_barrier + 5][0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user