sagoma/cvutils.h
2017-01-12 16:25:29 +01:00

22 lines
691 B
C++

#ifdef HAS_OPENCV3
#include <opencv2/core.hpp> //Any OPENCV3 code
#else
#include <opencv2/core/core.hpp> //Any Opencv2 code
#endif
unsigned* max2_distance(std::vector<cv::Point> hull);
bool
similar_fit(cv::Point a, cv::Point b, cv::Point newpoint);
bool
similar_fit(cv::Point a, cv::Point b, cv::Point newpoint, float tolerance_degrees);
bool
similar_fit(std::vector<cv::Point> group, cv::Point newpoint);
std::vector<std::vector<cv::Point>>
simplify_hull(std::vector<cv::Point> hull);
std::vector<std::vector<cv::Point>>
simplify_hull(std::vector<cv::Point> hull, double mindistance);
std::vector<cv::Point>
find_longest_line(std::vector<cv::Point> hull, unsigned begin, unsigned end);