图像尺寸改变
元素测试完成,图像改为80,140
This commit is contained in:
@@ -34,6 +34,13 @@ void ElementJudge() {
|
||||
CheckCircle();
|
||||
}
|
||||
}
|
||||
|
||||
if (garage_type != GARAGE_NONE)
|
||||
{
|
||||
cross_type = CROSS_NONE;
|
||||
circle_type = CIRCLE_NONE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ElementRun() {
|
||||
@@ -53,9 +60,15 @@ void ElementRun() {
|
||||
void MidLineTrack() {
|
||||
if (cross_type == CROSS_IN) {
|
||||
if (track_type == TRACK_LEFT) {
|
||||
mid_track = mid_left; // 这是为了预先分配内存
|
||||
GetMidLine_Left(pts_far_resample_left + far_Lpt0_rpts0s_id, pts_far_resample_left_count - far_Lpt0_rpts0s_id, mid_left, (int) round(ANGLEDIST / RESAMPLEDIST), PIXPERMETER * ROADWIDTH / 2);
|
||||
mid_track_count = pts_far_resample_left_count - far_Lpt0_rpts0s_id;
|
||||
} else {
|
||||
mid_track = mid_right; // 这是为了预先分配内存
|
||||
GetMidLine_Right(pts_far_resample_right + far_Lpt1_rpts1s_id, pts_far_resample_right_count - far_Lpt1_rpts1s_id, mid_right, (int) round(ANGLEDIST / RESAMPLEDIST), PIXPERMETER * ROADWIDTH / 2);
|
||||
mid_track_count =pts_far_resample_right_count - far_Lpt1_rpts1s_id;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (track_type == TRACK_LEFT) {
|
||||
mid_track = mid_left;
|
||||
mid_track_count = mid_left_count;
|
||||
@@ -66,8 +79,8 @@ void MidLineTrack() {
|
||||
}
|
||||
|
||||
// 车轮对应点 (纯跟踪起始点)
|
||||
float cx = InverseMapW[(int) (IMAGE_H * 0.85f)][94];
|
||||
float cy = InverseMapH[(int) (IMAGE_H * 0.85f)][94];
|
||||
float cx = InverseMapW[(int) (IMAGE_H * 0.75f)][94];
|
||||
float cy = InverseMapH[(int) (IMAGE_H * 0.75f)][94];
|
||||
|
||||
// 找最近点 (起始点中线归一化)
|
||||
float min_dist = 1e10;
|
||||
|
||||
Reference in New Issue
Block a user