| MATLAB File Help: cv.niBlackThreshold | Index |
Applies Niblack thresholding to input image
dst = cv.niBlackThreshold(src, delta)
dst = cv.niBlackThreshold(src, delta, 'OptionName',optionValue, ...)
mean + k * std). Normally, it is taken to be a real
number between 0 and 1.src.Binary and BinaryInv thresholding
types. default 255dst(x,y) = (src(x,y) > thresh) ? maxValue : 0dst(x,y) = (src(x,y) > thresh) ? 0 : maxValueThe function transforms a grayscale image to a binary image according to the formulae:
Binary
| maxValue, if src(x,y) > T(x,y) dst(x,y) = | | 0, otherwise
BinaryInv
| 0, if src(x,y) > T(x,y) dst(x,y) = | | maxValue, otherwise
where T(x,y) is a threshold calculated individually for each pixel.
The threshold value T(x,y) is the mean minus delta times standard
deviation of BlockSize x BlockSize neighborhood of (x,y).