Force the 4 point solution to contain the lowest point
Otherwise it may be optimal to have shorter targets. This results in
significant skew which is bad.
Change-Id: I813d7977966afacec657cd6d2b86b225dfe6e169
diff --git a/y2019/vision/debug_viewer.cc b/y2019/vision/debug_viewer.cc
index e217d53..a919bce 100644
--- a/y2019/vision/debug_viewer.cc
+++ b/y2019/vision/debug_viewer.cc
@@ -163,7 +163,12 @@
for (const Target &target : target_list) {
results.emplace_back(
target_finder_.ProcessTargetToResult(target, draw_raw_IR_));
- if (draw_raw_IR_) DrawResult(results.back(), {255, 128, 0});
+ if (draw_raw_IR_) {
+ IntermediateResult updatable_result = results.back();
+ target_finder_.MaybePickAndUpdateResult(&updatable_result,
+ draw_raw_IR_);
+ DrawResult(updatable_result, {255, 128, 0});
+ }
}
// Check that our current results match possible solutions.