Files
opencv/modules/calib
Prasad Ayush Kumar 30bc85814e Merge pull request #29743 from Prasadayus:test_cleanup_calib
calib: re-enable & triage DISABLED_ tests - #29743

**co-authored by: @varun-jaiswal17**

### PR Changes:

### calib test cleanup

  ### Removed
  - `cameraCalibrationTiltTest.projectPoints` / `.undistortPoints` (`test_cameracalibration_tilt.cpp`, 217 lines
  removed): byte-identical duplicates of the copies in `geometry/test/test_cameras.cpp`, left behind when
  `99fc573913` moved them out of calib. The geometry copies remain.
  - `test_modelest.cpp` (231 lines, removed entirely): includes `_modelest.h` and subclasses `CvModelEstimator2`,
  both of which are gone from the tree, so it cannot compile. A byte-identical copy under
  `modules/geometry/test/` is removed in a companion PR.

### Re-enabled
  - `Calib3d_CalibrateCamera_CPP.accuracy_on_artificial_data` (`test_cameracalibration_artificial.cpp:430`):
  restored `CALIB_FIX_K3`, commented out since at least 2011 with no reason given. With `k1`, `k2` and `k3` all
  free, radial distortion imitates focal length and LM settles in a local minimum on exact synthetic data,
  putting `fx` about 20% off; with the flag it converges correctly.

    Three further fixes in the same test:
    - `reprojectErrorWithoutIntrinsics` indexed `uv_exp[i]` inside a loop over `j`, so it summed one corner's
  error repeatedly instead of averaging over all of them.
    - The `rep_error` check was unreachable: `calibrateCamera` already returns a per-point RMS, and the test
  divided it by the point count again before comparing, so a 1.57 px RMS passed silently. The extra division is
  removed.
    - The board-generation retry loop was an unbounded `for(;;)`; it now fails the test after 100 attempts
  instead of looping forever.

### 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
2026-08-21 16:19:16 +03:00
..