mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
![]() 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 |
||
---|---|---|
.. | ||
calib3d | ||
core | ||
dnn | ||
features2d | ||
flann | ||
gapi | ||
highgui | ||
imgcodecs | ||
imgproc | ||
java | ||
js | ||
ml | ||
objc | ||
objdetect | ||
photo | ||
python | ||
stitching | ||
ts | ||
video | ||
videoio | ||
world |