mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
![]() 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  c |
||
---|---|---|
.. | ||
doc | ||
include/opencv2 | ||
misc | ||
perf | ||
src | ||
test | ||
CMakeLists.txt |