CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
findChessboardCornersSB improvements #16625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @D-Alex, as always, thanks for your great work in this field! Just one question: So what i do is that i typically take images from multiple chessboard poses with a fixed chessboard size. In your images from the blog you use a large chessboard patterns and find a "dynamically" sized chessboard. How do you handle that? Dont you have to give chessboards with the same dimensions into the calibration routine? Or can you just give every chessboard its own dynamically adjusted 3D corrdinates? Also: i see that you said that blurred images should be filtered out and you added a function estimateChessboardSharpness to estimate the sharpness for each board. Doesnt it make sense to also provide a funtion that returns the angle to the camera axis, so that the ones orthogonal are automatically removed? |
Regarding "fixing couple of issues preventing a detection of the board": would you mind explaining which cases have been improved? |
@tompollok for a mono camera, you can use a different coordinate system for each chessboard and feed different sized chessboards to the calibration routine as long as the object z-coordinates are zero and all boards are rectangular. However, in the case of a stereo system, you need the same coordinate system on the target, which is solved by adding little circles to mark the origin of the board visible in all calibration images. Concerning the orthogonal case. Little noise can completely change the orientation of the board. This is visible by a jumping overlayed pose indicator. They can only be removed after calibration because the calibration process itself will determine the pose. Usually, I try to avoid them by using a fixed target in V-configuration. The calibration process is as follows: For each of the two poses:
Concerning the detection rate:
|
6f7c782
to
0d02ebe
Compare
It looks like "Compare ABI dumps" failed because findChessboardSB has now an additional optional parameter for forwarding the actual board size in the case a larger board was found including some meta data. What would be the best approach for fixing this and allowing an existing method to have a new optional parameter? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contribution!
…th markers Changes: * UMat for blur + rotate resulting in a speedup of around 2X on an i7 * support for boards larger than specified allowing to cover full FOV * support for markers moving the origin into the center of the board * increase detection accuracy The main change is for supporting boards that are larger than the FOV of the camera and have their origin in the board center. This allows building OEM calibration targets similar to the one from intel real sense utilizing corner points as close as possible to the image border.
f40c53f
to
81376b1
Compare
The required additional meta data for testing estimateChessboardSharpness: The test is performed for chessboards found by findChessboardCorners and findChessboardCornersSB. In the case the sharpness is unknown for a given image, the test is bypassed for the particular image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To generate test data please use binaries with disabled optimizations:
- Debug build (disable compiler optimizations)
- disable OpenCL (
OPENCV_OPENCL_DEVICE=disabled
) - disable IPP (
OPENCV_IPP=disabled
)
*/ | ||
CV_EXPORTS_W cv::Scalar estimateChessboardSharpness(InputArray image, Size patternSize, InputArray corners, | ||
float rise_distance=0.8F,bool vertical=false, | ||
cv::OutputArray sharpness=noArray()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cv::OutputArray
Please avoid using of unnecessary cv::
(at least in public headers)
@D-Alex Thank you for the contribution! Do you have a chance to look on current tests failures? |
@alalek - I should be able to fix all suggestions over this weekend. |
Image sharpness, as well as brightness, are a critical parameter for accuracte camera calibration. For accessing these parameters for filtering out problematic calibraiton images, this method calculates edge profiles by traveling from black to white chessboard cell centers. Based on this, the number of pixels is calculated required to transit from black to white. This width of the transition area is a good indication of how sharp the chessboard is imaged and should be below ~3.0 pixels. Based on this also motion blur can be detectd by comparing sharpness in vertical and horizontal direction. All unsharp images should be excluded from calibration as they will corrupt the calibration result. The same is true for overexposued images due to a none-linear sensor response. This can be detected by looking at the average cell brightness of the detected chessboard.
3634b38
to
44560c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you for contribution 👍
@@ -611,37 +703,41 @@ void FastX::detectImpl(const cv::Mat& _gray_image, | |||
CV_CheckTypeEQ(_gray_image.type(), CV_8UC1, "Unsupported image type"); | |||
|
|||
// up-sample if needed | |||
cv::Mat gray_image; | |||
int super_res = int(parameters.super_resolution); | |||
cv::UMat gray_image; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though we want to get rid of all implicit GPU calls in algorithms' internals like we did with CascadeClassifier.
Merge with extra: opencv/opencv_extra#713
Improvements:
The main change is for supporting boards that are larger than the FOV of
the camera and have their origin in the board center. This allows
building OEM calibration targets similar to the one from intel real
sense utilizing corner points as close as possible to the image border.
Furthermore, a method was added to estimate the sharpness of the detected chessboard. This allows to filter out unsharp calibration images or images subject to motion blur, which would otherwise corrupt the calibration result.
The improved detector is the base for the article posted here:
https://medium.com/@hey_duda/the-magic-behind-camera-calibration-8596b7ddcd71