I'm the new one,The key code is: void find_squares(Mat& image, vector<vector<point> >& squares) { // blur will enhance edge detection Mat blurred(image); medianBlur(image, blurred, 9); Mat gray0(blurred.size(), CV_8U), gray; vector<vector<point> > contours; // find squares in every color plane of the image for (int c = 0; c < 3; c++) { const int ch[] = {c, 0}; mixChannels(&blurred, 1, &gray0, 1, ch, 1);
but the function mixChannels can not pass, the system remind me : Invalid arguments ' Candidates are: void mixChannels(const cv::Mat *, ?, cv::Mat *, ?, const int *, ?)
and some other function also appear the same error I don't know why ,I hope someone can help me ,Thanks in advanced