Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The documentation (http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#threshold) states that the function cv::threshold() returns the computed threshold value.

So you can simply retrieve the value with something like: threshold_value = cv::threshold(img1, img2, 0, 255, CV_THRESH_OTSU);