Renamed debug_viewer to debug_window to avoid confusion between year specific debug_viewer and debug_window.
Change-Id: I0bbd015f12abf3ffaabfd1181ff87f894a301495
diff --git a/aos/vision/debug/overlay.h b/aos/vision/debug/overlay.h
index fbd6838..5a9804f 100644
--- a/aos/vision/debug/overlay.h
+++ b/aos/vision/debug/overlay.h
@@ -117,18 +117,39 @@
~PixelLinesOverlay() {}
// build a segment for this line
- void add_line(Vector<2> st, Vector<2> ed) { add_line(st, ed, color); }
+ void AddLine(Vector<2> st, Vector<2> ed) { AddLine(st, ed, color); }
// build a segment for this line
- void add_line(Vector<2> st, Vector<2> ed, PixelRef newColor) {
+ void AddLine(Vector<2> st, Vector<2> ed, PixelRef newColor) {
lines_.emplace_back(
std::pair<Segment<2>, PixelRef>(Segment<2>(st, ed), newColor));
}
- void start_new_profile() { start_profile = true; }
+ void DrawCross(aos::vision::Vector<2> center, int width,
+ aos::vision::PixelRef color) {
+ using namespace aos::vision;
+ AddLine(Vector<2>(center.x() - width, center.y()),
+ Vector<2>(center.x() + width, center.y()), color);
+ AddLine(Vector<2>(center.x(), center.y() - width),
+ Vector<2>(center.x(), center.y() + width), color);
+ }
+
+ void DrawBBox(const ImageBBox &box, aos::vision::PixelRef color) {
+ using namespace aos::vision;
+ AddLine(Vector<2>(box.minx, box.miny), Vector<2>(box.maxx, box.miny),
+ color);
+ AddLine(Vector<2>(box.maxx, box.miny), Vector<2>(box.maxx, box.maxy),
+ color);
+ AddLine(Vector<2>(box.maxx, box.maxy), Vector<2>(box.minx, box.maxy),
+ color);
+ AddLine(Vector<2>(box.minx, box.maxy), Vector<2>(box.minx, box.miny),
+ color);
+ }
+
+ void StartNewProfile() { start_profile = true; }
// add a new point connected to the last point in the line
- void add_point(Vector<2> pt, PixelRef newColor) {
+ void AddPoint(Vector<2> pt, PixelRef newColor) {
if (lines_.empty() || start_profile) {
lines_.emplace_back(
std::pair<Segment<2>, PixelRef>(Segment<2>(pt, pt), newColor));