Conversation
|
Some test is required for the new function. |
|
sure what kind of test do you think would be good? But do you mean a permanent test to put in the opencv tests or a test just to check that it works? |
|
I mean regular unit test. You can re-use some images from |
|
ok sound good for me. |
|
sorry but I'm not able to find the images used in the findChessboardCornes test |
|
may relate to "cv2.findChessboardCorners() running endlessly on certain images #23558" issue |
|
Hi, I may as well test on image #23558 but the result will depend on how I binarize the image before calling the proposed function. |
|
@asmorkalov sorry where I can find the findChessboardCorners test images? |
|
Hi, in https://github.com/opencv/opencv_extra/tree/4.x/testdata/cv/cameracalibration and the chessboard was found in each of them. |
|
Hello @thewoz . Thanks a lot for the contribution! The PR and API change was discussed on OpenCV Core team meeting. Team members propose to not introduce the new function, but add flag to |
|
Hi @asmorkalov thanks to you and to all the team. |
|
Hi there is anything else I can do ? |
|
@vpisarev @mshabunin Please take a look too. |
mshabunin
left a comment
There was a problem hiding this comment.
I think we need a test for this new flag, something simple - load one of the test images with QR code, manually do threshold, dilate and other preparations, call function and expect detection result. Also a test for exception for BGR image input.
modules/calib3d/src/calibinit.cpp
Outdated
| SHOW("New binarization", thresh_img_new); | ||
|
|
||
| if (flags & CALIB_CB_FAST_CHECK) | ||
| if (flags & CALIB_CB_FAST_CHECK && !(flags & CALIB_CB_PLAIN)) |
There was a problem hiding this comment.
| if (flags & CALIB_CB_FAST_CHECK && !(flags & CALIB_CB_PLAIN)) | |
| if (flags & CALIB_CB_FAST_CHECK && !is_plain) |
There was a problem hiding this comment.
BTW, wouldn't it be useful to have both PLAIN and FAST_CHECK flags enabled?
There was a problem hiding this comment.
Hi mshabunin I'm not so sure about the idea of having both CALIB_CB_PLAIN and CALIB_CB_FAST_CHECK active at the same time.
The basic idea with CALIB_CB_PLAIN is to have a function that in fact does "nothing" in the sense that all image processing (binarization) is done externally
Where do you think is the best place to put these tests? |
|
Perhaps here: https://github.com/opencv/opencv/blob/4.x/modules/calib3d/test/test_chesscorners.cpp or in one of neighbour files. |
|
I added the first test. |
|
is there anything else i can do? |
|
@vpisarev @mshabunin May I merge the patch? |
Check Checkerboard Corners opencv#24546 What I did was get you to pull out of findChessboardCorners cornres the whole part that "checks" and sorts the corners of the checkerboard if present. The main reason for this is that findChessboardCorners is often very slow to find the corners and this depends in that the size the contrast etc of the checkerboards can be very different from each other and writing a function that works on all kinds of images is complicated. So I find it very useful to have the ability to write your own code to process the image and then have a function that controls or orders the corners. See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
Check Checkerboard Corners opencv#24546 What I did was get you to pull out of findChessboardCorners cornres the whole part that "checks" and sorts the corners of the checkerboard if present. The main reason for this is that findChessboardCorners is often very slow to find the corners and this depends in that the size the contrast etc of the checkerboards can be very different from each other and writing a function that works on all kinds of images is complicated. So I find it very useful to have the ability to write your own code to process the image and then have a function that controls or orders the corners. See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
What I did was get you to pull out of findChessboardCorners cornres the whole part that "checks" and sorts the corners of the checkerboard if present.
The main reason for this is that findChessboardCorners is often very slow to find the corners and this depends in that the size the contrast etc of the checkerboards can be very different from each other and writing a function that works on all kinds of images is complicated.
So I find it very useful to have the ability to write your own code to process the image and then have a function that controls or orders the corners.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.