mirror of https://github.com/opencv/opencv.git
Merge pull request #25807 from spdfghi:4.x
Search in two directions when try to add new quad in addOuterQuad #25807 In ChessBoardDetector::addOuterQuad, previous code try to connect new quad with inner quad, if possible, but only search for one direction. I have made three test images, one is normal(a.jpg), one lossed an outer quad(b.jpg), and then i flipped it vertically(c.jpg). Only last one fails. I fixed it by check two directions and row/col. Here is the test code and images: ``` Mat img; vector<Point2f> corners; auto size = cv::Size(6, 6); img = imread("D:/tmp/a.jpg", 0); std::cout<<cv::findChessboardCorners(img, size, corners)<<"\n"; std::cout << corners.size() << "\n"; img = imread("D:/tmp/b.jpg", 0); std::cout<<cv::findChessboardCorners(img, size, corners)<<"\n"; std::cout << corners.size() << "\n"; img = imread("D:/tmp/c.jpg", 0); std::cout<<cv::findChessboardCorners(img, size, corners)<<"\n"; std::cout << corners.size() << "\n"; ```  a  b  cpull/25952/head
parent
14f9d71dd0
commit
160879c100
1 changed files with 32 additions and 14 deletions
Loading…
Reference in new issue