opencv/modules/calib3d
Maxim Smolskiy b1b59c87b9
Merge pull request #24605 from MaximSmolskiy:speed-up-ChessBoardDetector-findQuadNeighbors
Speed up ChessBoardDetector::findQuadNeighbors #24605

### Pull Request Readiness Checklist

Replaced brute-force algorithm with O(N^2) time complexity with kd-tree with something like O(N * log N) time complexity (maybe only in average case).

For example, on image from #23558 without quads filtering (by using `CALIB_CB_FILTER_QUADS` flag) finding chessboards corners took ~770 seconds on my laptop, of which finding quads neighbors took ~620 seconds.

Now finding chessboards corners takes ~155-160 seconds, of which finding quads neighbors takes only ~5-10 seconds.

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
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-12-11 19:11:58 +03:00
..
doc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
include/opencv2 typo fix 2023-12-02 13:30:01 +09:00
misc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-12-27 08:58:28 +00:00
perf Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
src Merge pull request #24605 from MaximSmolskiy:speed-up-ChessBoardDetector-findQuadNeighbors 2023-12-11 19:11:58 +03:00
test Fix time measurement in test Calib3d_ChessboardDetector.timing 2023-11-27 23:44:24 +03:00
CMakeLists.txt Revert "suppress warning on GCC 7 and later" 2022-08-07 15:43:10 +03:00