opencv/modules/calib3d
武士风度的牛 160879c100
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)
c
2024-07-24 15:29:13 +03:00
..
doc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
include/opencv2 calib3d: doc: enable line breaks in formulas 2024-07-07 07:15:28 +09:00
misc Merge pull request #25824 from j3knk:calib3d/fix_projectpoints 2024-07-15 15:10:08 +03:00
perf Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
src Merge pull request #25807 from spdfghi:4.x 2024-07-24 15:29:13 +03:00
test Merge pull request #25808 from DmitryYurov:bug-25806-checkerboard-marker-black-tile 2024-07-08 12:36:56 +03:00
CMakeLists.txt Revert "suppress warning on GCC 7 and later" 2022-08-07 15:43:10 +03:00