7 #include <opencv2/highgui/highgui.hpp> 8 #include <opencv2/imgcodecs.hpp> 9 #include <opencv2/imgproc.hpp> 20 std::vector<std::vector<cv::Point>> *found4CornersVector, std::vector<double> *bestValues,
21 int templ_method = cv::TM_SQDIFF,
22 std::vector<double> scaleFactors = std::vector<double>(),
23 bool showDisplay =
true);
26 std::vector<cv::Point> *found4Corners,
double* bestValue = NULL,
27 int templ_method = cv::TM_SQDIFF,
28 std::vector<double> scaleFactors = std::vector<double>(),
29 bool showDisplay =
true);
31 static void drawSquares( cv::Mat image,
const std::vector<std::vector<cv::Point> > squares,
32 const char* wndname =
"Square Detection Demo");
35 static int findSquare(cv::Mat &image, std::vector<std::vector<cv::Point>> *found4CornersVector,
36 int threshLevels = 11,
int cannyThresh = 50);
42 static void MatchingMethod(
int match_method, cv::Mat img, cv::Mat templ,
43 cv::Point *bestMatch,
double *minMaxVal);
46 static void _findSquares(
const cv::Mat& image, std::vector<std::vector<cv::Point> >& squares,
48 static int orderAngles(std::vector<std::vector<cv::Point>> angles, std::vector<std::vector<cv::Point>> *orderedAngles);
49 static int orderAngles(std::vector<cv::Point> angles, std::vector<cv::Point> *orderedAngles);
50 static cv::Point getCenter(std::vector<cv::Point> points);
51 static double angle( cv::Point pt1, cv::Point pt2, cv::Point pt0 );
static int findSquare(cv::Mat &image, std::vector< std::vector< cv::Point >> *found4CornersVector, int threshLevels=11, int cannyThresh=50)
Detector::findSquare find all square in images, exploiting functions of opencv. In practice is a blob...
static void drawSquares(cv::Mat image, const std::vector< std::vector< cv::Point > > squares, const char *wndname="Square Detection Demo")
Detector::drawSquares function to draw square in images.
static int templateMatching(cv::Mat img, std::vector< cv::Mat > templVector, std::vector< std::vector< cv::Point >> *found4CornersVector, std::vector< double > *bestValues, int templ_method=cv::TM_SQDIFF, std::vector< double > scaleFactors=std::vector< double >(), bool showDisplay=true)
Detector::templateMatching check function below, this one is used if multiple templates want be used...