Resolves https://github.com/opencv/opencv/issues/23304
Fixes the incorrect pixel grid
Switches type to double to avoid precision loss as all callers use doubles
### Pull Request Readiness Checklist
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
- [X] There is a reference to the original bug report and related work
- [X] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [X] The feature is well documented and sample code can be built with the project CMake
Backport of #22992 to 3.4
### Pull Request Readiness Checklist
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
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
Add `estimateSE2(...)`, `estimateSE3(...)`, `estimateSIM2(...)`, `estimateSIM3(...)` for estimating an geometric transformation with rotation and translation (with scaling for SIM) using USAC: as alternative for `estimateAffinePartial2D` and `estimateAffine3D`.
Modified test module.
Remove unused variables.
Remove initializer of unused variable.
Add interfaces to accept UsacParams() and corresponding test codes.
Revise test code.
PartialNd removed
Umeyama rewritten for code quality & speed
comments & minors
rise number of points
fix, and +30% faster!
only one number should be that big
remove USAC code, leave fix only
big number
Usage of imread(): magic number 0, unchecked result
* docs: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()
* samples, apps: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()
* tests: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()
* doc/py_tutorials: check imread() result
The current implementation overwrites the result rotation and translation in every iteration.
If SOLVEPNP_ITERATIVE was run as a refinement it will start from the incorrect initial
transformation thus degrading the final outcome.
[GSoC] New universal intrinsic backend for RVV
* Add new rvv backend (partially implemented).
* Modify the framework of Universal Intrinsic.
* Add CV_SIMD macro guards to current UI code.
* Use vlanes() instead of nlanes.
* Modify the UI test.
* Enable the new RVV (scalable) backend.
* Remove whitespace.
* Rename and some others modify.
* Update intrin.hpp but still not work on AVX/SSE
* Update conditional compilation macros.
* Use static variable for vlanes.
* Use max_nlanes for array defining.
Fixes and optimizations for the SQPnP solver
* Fixes and optimizations
- optimized the calculation of qa_sum by moving equal elements outside the loop
- unrolled copying of the lower triangle of omega
- substituted SVD with eigendecomposition in the factorization of omega (2-3 times faster)
- fixed the initialization of lambda in FOAM
- added a cheirality test that checks a solution on all 3D points rather than on their mean. The old test rejected valid poses in some cases
- fixed some typos & errors in comments
* reverted to SVD
Eigen decomposition seems to yield larger errors in certain tests, reverted to SVD
* nearestRotationMatrixSVD
Added nearestRotationMatrixSVD()
Previous nearestRotationMatrix() renamed to nearestRotationMatrixFOAM() and reverts to nearestRotationMatrixSVD() for singular matrices
* fixed checks order
Fixed the order of checks in PoseSolver::solveInternal()
Add undistortImagePoints function
* Add undistortImagePoints function
undistortPoints has unclear interface and additional functionality. New function computes only undistorted image points position
* Add undistortImagePoints test
* Add TermCriteria
* Fix layout
Add distort/undistort test for fisheye::undistortPoints()
* Add distort/undistort test for fisheye::undistortPoints()
Lack of test has allowed error described in 19138 to be unnoticed.
In addition to random points, four corners and principal center
added to point set
* Add random distortion coefficients set
* Move undistortPoints test to google test, refactor
* Add fisheye::undistortPoints() perf test
* Add negative distortion coefficients to undistortPoints test, increase value
* Move to theRNG()
* Change test check from cvtest::norm(L2) to EXPECT_MAT_NEAR()
* Layout fix
* Add points number parameters, comments
Recover pose from different cameras (version 2)
* add recoverPose for two different cameras
* Address review comments from original PR
* Address new review comments
* Rename private api
Co-authored-by: tompollok <tom.pollok@gmail.com>
Co-authored-by: Zane <zane.huang@mail.utoronto.ca>