From 770247f9b6087059a28e230b5fb8751f7933a054 Mon Sep 17 00:00:00 2001 From: Glz <354338225@qq.com> Date: Wed, 3 Jul 2024 16:37:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gl_get_corners.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/app/gl_get_corners.c b/app/gl_get_corners.c index 7414e17..4f68421 100644 --- a/app/gl_get_corners.c +++ b/app/gl_get_corners.c @@ -61,7 +61,15 @@ void get_corners() // L 角点阈值 if (Lpt0_found_barrier == false && (66. / 180. * PI32) < conf && conf < (140. / 180. * PI32) && i < 0.5 / RESAMPLEDIST) { Lpt0_rpts0s_id_barrier = i; - Lpt0_found_barrier = true; + if (pts_resample_left[i][1] <= pts_resample_left[clip(i + 2, 0, pts_resample_left_count - 1)][1]) + { + Lpt0_found_barrier = true; + } + else{ + Lpt0_found_barrier = false; + } + + //Lpt0_found_barrier = true; } } if (Lpt0_found_barrier) { @@ -73,6 +81,9 @@ void get_corners() } } + + + for (int i = 0; i < pts_resample_right_count; i++) { if (angle_new_right[i] == 0) continue; int im1 = clip(i - (int)round(ANGLEDIST / RESAMPLEDIST), 0, pts_resample_right_count - 1); @@ -118,7 +129,15 @@ void get_corners() if (Lpt1_found_barrier == false && (66. / 180. * PI32) < conf && conf < 140. / 180. * PI32 && i < 0.5 / RESAMPLEDIST) { Lpt1_rpts1s_id_barrier = i; - Lpt1_found_barrier = true; + + if (pts_resample_right[i][1] >= pts_resample_right[clip(i + 2, 0, pts_resample_left_count - 1)][1]) + { + Lpt1_found_barrier = true; + } + else{ + Lpt1_found_barrier = false; + } + //Lpt1_found_barrier = true; } } if (Lpt1_found_barrier) {