Skip to content
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

Uncertainties calculation for omnidir calibration can be incorrect #3406

Closed
3 of 4 tasks
savuor opened this issue Dec 28, 2022 · 0 comments
Closed
3 of 4 tasks

Uncertainties calculation for omnidir calibration can be incorrect #3406

savuor opened this issue Dec 28, 2022 · 0 comments

Comments

@savuor
Copy link
Contributor

savuor commented Dec 28, 2022

System information (version)
  • OpenCV => 3.4
  • Operating System / Platform => all
  • Compiler => all
Detailed description

Related to #19803@main

According to the [MVG], various least squares method explanations (like this) and the standard camera calibration code in OpenCV (here), the parameters uncertainty should be calculated with the "minus k" denominator correction:
$$\sigma^2 = \frac{1}{n - k} \sum^n_{i=1} \left( x_i - \bar{x} \right)^2$$
where k is a number of non-fixed model parameters.

The incorrect calculation appears in two places in omnidir calibration:

  • cv::omnidir::internal::estimateUncertainties(): here
  • cv::omnidir::internal::estimateUncertaintiesStereo(): here

MVG: R. Hartley, A. Zisserman, Multiple View Geometry in Computer Vision, 2004, section 5.1.3, page 134

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants