Attach the perimeter to the polygons.
Change-Id: Ic278b68e2e0481d88869946a08588651e884a882
diff --git a/y2019/vision/target_finder.h b/y2019/vision/target_finder.h
index 83a1ebd..ebae3b4 100644
--- a/y2019/vision/target_finder.h
+++ b/y2019/vision/target_finder.h
@@ -18,6 +18,11 @@
using aos::vision::Vector;
using aos::vision::ContourNode;
+struct Polygon {
+ ::std::vector<aos::vision::Segment<2>> segments;
+ ::std::vector<::Eigen::Vector2f> contour;
+};
+
class TargetFinder {
public:
TargetFinder();
@@ -34,13 +39,11 @@
::std::vector<::Eigen::Vector2f> UnWarpContour(ContourNode *start) const;
// Turn a blob into a polgygon.
- std::vector<aos::vision::Segment<2>> FillPolygon(
- const ::std::vector<::Eigen::Vector2f> &contour, bool verbose);
+ Polygon FindPolygon(::std::vector<::Eigen::Vector2f> &&contour, bool verbose);
// Turn a bloblist into components of a target.
std::vector<TargetComponent> FillTargetComponentList(
- const std::vector<std::vector<aos::vision::Segment<2>>> &seg_list,
- bool verbose);
+ const ::std::vector<Polygon> &seg_list, bool verbose);
// Piece the compenents together into a target.
std::vector<Target> FindTargetsFromComponents(