Share GetThresholdValue with global_calibration
Twas hard coded in two spots. Let's not do that.
Change-Id: I038ef4d6bb840c7558f7652e7073b531695844a7
diff --git a/y2019/vision/global_calibration.cc b/y2019/vision/global_calibration.cc
index 9c98787..c962fc9 100644
--- a/y2019/vision/global_calibration.cc
+++ b/y2019/vision/global_calibration.cc
@@ -125,8 +125,9 @@
std::to_string(i) + ".yuyv");
aos::vision::ImageFormat fmt{640, 480};
- aos::vision::BlobList imgs = aos::vision::FindBlobs(
- aos::vision::DoThresholdYUYV(fmt, frame.data.data(), 120));
+ aos::vision::BlobList imgs =
+ aos::vision::FindBlobs(aos::vision::DoThresholdYUYV(
+ fmt, frame.data.data(), TargetFinder::GetThresholdValue()));
finder_.PreFilter(&imgs);
bool verbose = false;