From e813326c17260a778d8adec77d58a7e74f2c831d Mon Sep 17 00:00:00 2001 From: Pierre Chatelier Date: Mon, 10 Mar 2025 17:40:45 +0100 Subject: [PATCH] Merge pull request #27039 from chacha21:threshold_otsu_doc_update Threshold otsu doc update #27039 PR for #27038 (I had already done that, but encounters git madness after branch renaming) - [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 --- modules/imgproc/include/opencv2/imgproc.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/include/opencv2/imgproc.hpp b/modules/imgproc/include/opencv2/imgproc.hpp index b3551f3496..4bc9d6a11c 100644 --- a/modules/imgproc/include/opencv2/imgproc.hpp +++ b/modules/imgproc/include/opencv2/imgproc.hpp @@ -3070,9 +3070,10 @@ Also, the special values #THRESH_OTSU or #THRESH_TRIANGLE may be combined with o above values. In these cases, the function determines the optimal threshold value using the Otsu's or Triangle algorithm and uses it instead of the specified thresh. -@note Currently, the Otsu's and Triangle methods are implemented only for 8-bit single-channel images. +@note Currently, the Otsu's method is implemented only for CV_8UC1 and CV_16UC1 images, +and the Triangle's method is implemented only for CV_8UC1 images. -@param src input array (multiple-channel, 8-bit or 32-bit floating point). +@param src input array (multiple-channel, CV_8U, CV_16S, CV_16U, CV_32F or CV_64F). @param dst output array of the same size and type and the same number of channels as src. @param thresh threshold value. @param maxval maximum value to use with the #THRESH_BINARY and #THRESH_BINARY_INV thresholding