opencv/modules
Maxim Smolskiy ff9aeaceb0
Merge pull request #25177 from MaximSmolskiy:speed-up-adaptive-image-binary-threshold-in-findChessboardCorners
Speed up adaptive threshold in findChessboardCorners #25177

### Pull Request Readiness Checklist

If `block_size` hasn't been changed between iterations for same `k`, then all `adaptiveThreshold` arguments will be same and we can reuse result from previous iteration.

I tested this PR with benchmark
```
python3 objdetect_benchmark.py --configuration=generate_run --board_x=7 --path=res_chessboard --synthetic_object=chessboard
```
PR speed up chessboards detection by `7.5/17%` without any changes in detected chessboards number:
```
cell_img_size = 100 (default)

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.904167                      13020             14400                           0.600512
Total detected time:  107.27875600000003 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.904167                      13020             14400                           0.600512
Total detected time:  99.0223499999999 sec

----------------------------------------------------------------------------------------------------------------------------------------------

cell_img_size = 10

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.539792                       7773             14400                           4.209964
Total detected time:  2.989205999999999 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.539792                       7773             14400                           4.209964
Total detected time:  2.4802350000000013 sec
```


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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-03-27 15:34:54 +03:00
..
calib3d Merge pull request #25177 from MaximSmolskiy:speed-up-adaptive-image-binary-threshold-in-findChessboardCorners 2024-03-27 15:34:54 +03:00
core Merge pull request #24893 from chacha21:cart_polar_inplace 2024-03-26 15:38:17 +03:00
dnn Merge pull request #25238 from fengyuentau:optimized_const 2024-03-26 15:09:51 +03:00
features2d Merge pull request #25042 from mshabunin:doc-upgrade 2024-03-05 16:19:45 +03:00
flann Merge pull request #25024 from vrabaud:neon 2024-02-20 11:29:23 +03:00
gapi core: Rename cv::float16_t to cv::hfloat (#25217) 2024-03-21 23:44:19 +03:00
highgui Backport some highgui changes from #22754 2024-03-05 17:49:01 +03:00
imgcodecs Fix: 6 typos 2024-03-26 02:32:54 +01:00
imgproc Fix bug in maskBoundingRect 2024-03-08 03:25:40 +03:00
java doc: fix formulas in JavaDoc broken after Doxygen upgrade 2024-03-11 23:47:23 +03:00
js Merge pull request #25084 from EDVTAZ:emscripten-3.1.54-compat 2024-02-26 10:30:56 +03:00
ml Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
objc Merge pull request #24136 from komakai:visionos_support 2023-12-20 15:35:10 +03:00
objdetect Merge pull request #25042 from mshabunin:doc-upgrade 2024-03-05 16:19:45 +03:00
photo Merge pull request #25042 from mshabunin:doc-upgrade 2024-03-05 16:19:45 +03:00
python fix [use hasattr("cv2", "name") ,but first param is 'character string', 2024-02-23 22:02:43 +08:00
stitching Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
ts Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
video Merge pull request #25042 from mshabunin:doc-upgrade 2024-03-05 16:19:45 +03:00
videoio Merge pull request #25189 from klatism:ios-build-fixes 2024-03-27 10:05:32 +03:00
world cmake: use /INCREMENTAL:NO with MSVS 2015 2023-12-07 19:46:27 +00:00