Method AdaptiveThreshold
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
AdaptiveThreshold(InputArray, OutputArray, double, AdaptiveThresholdTypes, ThresholdTypes, int, double)
Applies an adaptive threshold to an array.
public static void AdaptiveThreshold(InputArray src, OutputArray dst, double maxValue, AdaptiveThresholdTypes adaptiveMethod, ThresholdTypes thresholdType, int blockSize, double c)
Parameters
srcInputArraySource 8-bit single-channel image.
dstOutputArrayDestination image of the same size and the same type as src .
maxValuedoubleNon-zero value assigned to the pixels for which the condition is satisfied. See the details below.
adaptiveMethodAdaptiveThresholdTypesAdaptive thresholding algorithm to use, ADAPTIVE_THRESH_MEAN_C or ADAPTIVE_THRESH_GAUSSIAN_C .
thresholdTypeThresholdTypesThresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV .
blockSizeintSize of a pixel neighborhood that is used to calculate a threshold value for the pixel: 3, 5, 7, and so on.
cdoubleConstant subtracted from the mean or weighted mean (see the details below). Normally, it is positive but may be zero or negative as well.