Skip to content

Uncertainties calculation for fisheye calibration can be incorrect #23057

@savuor

Description

@savuor

System Information

OpenCV version: 3.4+
OS / Platform / Compiler: all

Detailed description

Related to #19803

Similar bug in omnidir calibration: #3406@contrib

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 n is a number of errors and k is a number of non-fixed model parameters.

The bug appears here.

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

Steps to reproduce

This is the low priority issue since the calculated value is not used in latter calculation.
However, we may extend the function's interface in the future by adding stddevs for estimated parameters, the same way we did for standard pinhole calibration. When doing this, we should be aware of this bug at least.

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions