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](https://github.com/opencv/opencv/assets/92856207/0dc7f5bf-7637-4333-9a9f-ec4ede790027) a ![b](https://github.com/opencv/opencv/assets/92856207/39793485-ca0c-44c0-b44d-a593d36c1888) b ![c](https://github.com/opencv/opencv/assets/92856207/2e7789c8-cfa5-438c-9530-2862a8a3741f) cpull/25952/head
parent
14f9d71dd0
commit
160879c100
1 changed files with 32 additions and 14 deletions
Loading…
Reference in new issue