-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Which 4 distortion parameters are needed for a fisheye camera? #1713
Comments
After doing some digging, it turns out OpenCV actually supports 6 radial distortion coefficients, not just 3. Although I can't get OpenCV to generate similar coefficients to what the Meshroom calibration utility generates. The Alicevision source code for calibration will allow you ask for up to 6 coefficients, but the the error message says the max is actually 3, which is very confusing.
In the actual calibration module of the source, the flags for fixing coefficients 4-6 (which I believe forces them to be zero) are overwritten before calling the OpenCV calibration function
Clearly something is not lining up here. Should I submit this as a bug? |
In opencv k4-k6 are not radial distortion coefficients, they refer to other coefficients in the Rational model. That being said, it also depends of what kind of fisheye you are using, fisheye camera are rarely well modeled by a pinhole camera with the radial+tangential distortion unless the distortion is mild. |
This makes sense. Now I think the model I should really be using equidistant_r3 model anyways (the initial pair isn't found when I use this setting but that's a different issue) Thanks for answering my question |
I'm having the same issue with the initial pair using the equidistant_r3 model. Did you manage to find a way around it? |
Related:
alicevision/AliceVision#45
#921
#1484
#1647
#1649
I am attempting to apply the distortion parameters created by the CameraCalibration utility/OpenCV to the CameraInit node for a fisheye camera.
The CameraCalibration utility provides:
Additionally, OpenCV will provide the p1 and p2 tangential distortion coefficients.
The common theme among all the related issues is that the parameters should be applied in this order:
0 - k1
1 - k2
2 - k3
3 - p1
4 - p2
However, as pointed out in #1649, the camera type you select might be what determines which distortion parameters are required. The camera type tooltip states that radial3 contains the 3 radial distortion parameters and that brown uses the additional 2 tangential parameters. This is all coherent with the linked issues related to this topic, but what about fisheye cameras which require 4 parameters?
How do I Identify and acquire the 4 distortion parameters for a fisheye camera?
Thank you
The text was updated successfully, but these errors were encountered: