//排序 bool cmp(Point2f a, Point2f b) { return a.y < b.y; } vector<Point2f> pt; sort(pt.begin(), pt.end(), cmp);