@@ -73,30 +73,9 @@ void unique(const std::vector<T> &A, std::vector<T> &U)
73
73
U.push_back (Tm[i]);
74
74
}
75
75
76
- void polyanticlockwise (std::vector<cv::Point2f> &points)
77
- {
78
- // Sort the points in anti-clockwise order
79
- // Trace a line between the first and second point.
80
- // If the third point is at the right side, then the points are anti-clockwise
81
- cv::Point2f v1 = points[1 ] - points[0 ];
82
- cv::Point2f v2 = points[2 ] - points[0 ];
83
-
84
- // if the third point is in the left side, then sort in anti-clockwise order
85
- if ((v1.x * v2.y ) - (v1.y * v2.x ) < 0.0 )
86
- std::swap (points[1 ], points[3 ]);
87
- }
88
- void polyclockwise (std::vector<cv::Point2f> &points)
89
- {
90
- // Sort the points in clockwise order
91
- // Trace a line between the first and second point.
92
- // If the third point is at the right side, then the points are clockwise
93
- cv::Point2f v1 = points[1 ] - points[0 ];
94
- cv::Point2f v2 = points[2 ] - points[0 ];
95
-
96
- // if the third point is in the left side, then sort in clockwise order
97
- if ((v1.x * v2.y ) - (v1.y * v2.x ) > 0.0 )
98
- std::swap (points[1 ], points[3 ]);
99
- }
76
+ void polyanticlockwise (std::vector<cv::Point2f> &points);
77
+ void polyclockwise (std::vector<cv::Point2f> &points);
78
+
100
79
// Does lexical cast of the input argument to string
101
80
template <typename T>
102
81
std::string ToString (const T &value)
0 commit comments