Python: cv2.adaptiveThreshold(src, maxValue, adaptiveMethod, thresholdType, blockSize, C[, dst]) → dst
Options:
src – Source 8-bit single-channel image. dst – Destination image of the same size and the same type as src . maxValue – Non-zero value assigned to the pixels for which the condition is satisfied. See the details below. adaptiveMethod – Adaptive thresholding algorithm to use, ADAPTIVE_THRESH_MEAN_C or ADAPTIVE_THRESH_GAUSSIAN_C . See the details below. thresholdType – Thresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV . blockSize – Size of a pixel neighborhood that is used to calculate a threshold value for the pixel: 3, 5, 7, and so on. C – Constant subtracted from the mean or weighted mean (see the details below). Normally, it is positive but may be zero or negative as well.
Taken from here: and also explains this method in more detail.
source share