Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(traffic_light_multi_camera_fusion): take confidence into consideration #6267

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions perception/traffic_light_multi_camera_fusion/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,9 @@
int visible_score_1 = calVisibleScore(r1);
int visible_score_2 = calVisibleScore(r2);
if (visible_score_1 == visible_score_2) {
int area_1 = r1.roi.roi.width * r1.roi.roi.height;
int area_2 = r2.roi.roi.width * r2.roi.roi.height;
if (area_1 < area_2) {
return -1;
} else {
return static_cast<int>(area_1 > area_2);
}
double confidence_1 = r1.signal.elements[0].confidence;
double confidence_2 = r2.signal.elements[0].confidence;
return confidence_1 < confidence_2 ? -1 : 1;

Check warning on line 87 in perception/traffic_light_multi_camera_fusion/src/node.cpp

View check run for this annotation

Codecov / codecov/patch

perception/traffic_light_multi_camera_fusion/src/node.cpp#L85-L87

Added lines #L85 - L87 were not covered by tests
yuki-takagi-66 marked this conversation as resolved.
Show resolved Hide resolved
} else {
return visible_score_1 < visible_score_2 ? -1 : 1;
}
Expand Down
Loading