Auto Exposure:
- Filter results down to the three best.
- Changing exposure based on distance to the target or at random.
- Plumb exposure through the debug framework.
- Refactor into target finder.
Change-Id: Ia083f56859938bf0825472fd15d248c545f6f2fc
diff --git a/y2019/vision/target_sender.cc b/y2019/vision/target_sender.cc
index 79e2ca4..db33419 100644
--- a/y2019/vision/target_sender.cc
+++ b/y2019/vision/target_sender.cc
@@ -262,7 +262,10 @@
results = finder.FilterResults(results, 30, verbose);
LOG(INFO) << "Results: " << results.size();
- // TODO: Select top 3 (randomly?)
+ int desired_exposure;
+ if (finder.TestExposure(results, &desired_exposure)) {
+ camera0->SetExposure(desired_exposure);
+ }
frc971::jevois::CameraFrame frame{};