5 #include <opencv2/opencv.hpp>
7 #include <vision_module/Tools/Parameters.hpp>
8 #include <vision_module/Tools/General.hpp>
9 #include <vision_module/Projections/CameraProjections.hpp>
10 #include <vision_module/SoccerObjects/IDetector.hpp>
14 bool SortFuncDescending(vector<Point> i, vector<Point> j);
16 bool SortFuncDistanceAcending(vector<Point> i, vector<Point> j,
CameraProjections &projecttion);
27 bool operator()(vector<Point> o1, vector<Point> o2) {
30 bool res=projecttion->GetOnRealCordinate_single(minAreaRect(o1).center,iR);
31 res&=projecttion->GetOnRealCordinate_single(minAreaRect(o2).center,jR);
34 ROS_ERROR(
"Error in programming!");
37 return GetDistance(iR) < GetDistance(jR);
40 bool operator()(Rect o1, Rect o2) {
44 bool res=projecttion->GetOnRealCordinate_single(GetCenter(o1),iR);
45 res&=projecttion->GetOnRealCordinate_single(GetCenter(o2),jR);
48 ROS_ERROR(
"Error in programming!");
51 return GetDistance(iR) < GetDistance(jR);
For pixel projections.
Definition: CameraProjections.hpp:50
For sorting operations on custom objects.
Definition: SortFuntions.hpp:23