Files
opencv-MIRROR/modules/objdetect/include
Varun Jaiswal fb00e3875f Merge pull request #30208 from varun-jaiswal17:calib-document-fix
calib document fix - #30208

Documentation changes - three doxygen blocks in `modules/objdetect`.

- **`findChessboardCorners`** (PR#22083): whether the returned order pins down a unique
  physical corner depends on the **parity** of the two `patternSize` dimensions, not on
  whether they differ. Quads are built from the dark squares only (`calibinit.cpp:755`
  `THRESH_BINARY`, `:796` white frame, `:1919` holes-only), so a rotation is admissible
  only if it maps dark squares onto dark squares. For `patternSize` of w x h interior
  corners the squares form a (w+1) x (h+1) grid, so 180° preserves the colouring exactly
  when w and h share parity:

  | `patternSize`                  | distinct origins | ambiguity     |
  |--------------------------------|------------------|---------------|
  | different parity (9x6, 8x5)    | 1                | none          |
  | same parity, w != h (8x6, 7x5) | 2                | 180°          |
  | w == h (7x7, 8x8)              | 4                | 90°           |

  The square case is not colour: the transpose at `calibinit.cpp:1745` is a no-op when
  `width == pattern_size.width`, so the detector cannot tell rows from columns. Verified
  over 24 in-plane rotations and 60 perspective views per board, zero detection failures;
  inverting the square colouring moves the origin but not the count.

  Practical consequence is the reverse of what was documented: the common 9x6 board is
  unambiguous, while this docstring's own sample `Size patternsize(8,6)` is not. The note
  now recommends a board whose dimensions differ in parity first, then
  #findChessboardCornersSB + `CALIB_CB_MARKER`, then ChArUco. Still harmless for
  intrinsics (each view absorbs the rotation into its own pose); still breaks hand-eye.

- **`findCirclesGrid`** (PR#7312): the returned points are the keypoint locations reported
  by `blobDetector` as-is, without refinement - the parameter is a `FeatureDetector` and
  `SimpleBlobDetector` is only the default, so the points are not necessarily moment
  centroids. Under perspective the apparent centre of a projected circle can be displaced
  from the projection of the physical centre; the displacement vanishes when the board is
  parallel to the image plane and is not removed by fitting an ellipse. Points at the
  `blobDetector = NULL` path for supplying corrected centres. Describes the bias
  qualitatively rather than quoting a fixed estimate.

- **`setLegacyPattern` / `detectBoard`** (PR#23152, PR#29636): the flag is a no-op on
  odd-row boards, and a wrong setting fails silently - markers detected, zero corners,
  only a `CV_LOG_DEBUG` line; notes that calib.io boards use the legacy layout and aligns
  the 4.6.0 version wording across both headers.


### 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
- [ ] There is a reference to the original bug report and related work
- [ ] 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-10-12 10:25:33 +03:00
..