search in two directions when try to add new quad in addOuterQuad#25807
Merged
asmorkalov merged 2 commits intoopencv:4.xfrom Jul 24, 2024
spdfghi:4.x
Merged
search in two directions when try to add new quad in addOuterQuad#25807asmorkalov merged 2 commits intoopencv:4.xfrom spdfghi:4.x
asmorkalov merged 2 commits intoopencv:4.xfrom
spdfghi:4.x
Conversation
…d in function addOuterQuad
Contributor
Author
Contributor
|
@MaximSmolskiy Could you take a look and try with your dataset? |
1 similar comment
Contributor
|
@MaximSmolskiy Could you take a look and try with your dataset? |
Contributor
@asmorkalov I didn't deal with this function, so I amn't ready to review this pr.
|
Contributor
|
@MaximSmolskiy Thanks a lot for the feedback. The patch does not change result of synthetic benchmark. Just want to get feedback for real images. |
asmorkalov
approved these changes
Jul 22, 2024
Merged
fengyuentau
pushed a commit
to fengyuentau/opencv
that referenced
this pull request
Aug 15, 2024
Search in two directions when try to add new quad in addOuterQuad opencv#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
thewoz
pushed a commit
to CobbsLab/OPENCV
that referenced
this pull request
Feb 13, 2025
Search in two directions when try to add new quad in addOuterQuad opencv#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
a
b
c