mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Open Source Computer Vision Library
160879c100
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 |
||
---|---|---|
.github | ||
3rdparty | ||
apps | ||
cmake | ||
data | ||
doc | ||
include | ||
modules | ||
platforms | ||
samples | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
COPYRIGHT | ||
LICENSE | ||
README.md | ||
SECURITY.md |
OpenCV: Open Source Computer Vision Library
Resources
- Homepage: https://opencv.org
- Courses: https://opencv.org/courses
- Docs: https://docs.opencv.org/4.x/
- Q&A forum: https://forum.opencv.org
- previous forum (read only): http://answers.opencv.org
- Issue tracking: https://github.com/opencv/opencv/issues
- Additional OpenCV functionality: https://github.com/opencv/opencv_contrib
- Donate to OpenCV: https://opencv.org/support/
Contributing
Please read the contribution guidelines before starting work on a pull request.
Summary of the guidelines:
- One pull request per issue;
- Choose the right base branch;
- Include tests and documentation;
- Clean up "oops" commits before submitting;
- Follow the coding style guide.
Additional Resources
- Submit your OpenCV-based project for inclusion in Community Friday on opencv.org
- Subscribe to the OpenCV YouTube Channel featuring OpenCV Live, an hour-long streaming show
- Follow OpenCV on LinkedIn for daily posts showing the state-of-the-art in computer vision & AI
- Apply to be an OpenCV Volunteer to help organize events and online campaigns as well as amplify them
- Follow OpenCV on Mastodon in the Fediverse
- Follow OpenCV on Twitter
- OpenCV.ai: Computer Vision and AI development services from the OpenCV team.