| Cv2AdaptiveThreshold Method |
Applies an adaptive threshold to an array.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void AdaptiveThreshold(
InputArray src,
OutputArray dst,
double maxValue,
AdaptiveThresholdTypes adaptiveMethod,
ThresholdTypes thresholdType,
int blockSize,
double c
)
Public Shared Sub AdaptiveThreshold (
src As InputArray,
dst As OutputArray,
maxValue As Double,
adaptiveMethod As AdaptiveThresholdTypes,
thresholdType As ThresholdTypes,
blockSize As Integer,
c As Double
)
public:
static void AdaptiveThreshold(
InputArray^ src,
OutputArray^ dst,
double maxValue,
AdaptiveThresholdTypes adaptiveMethod,
ThresholdTypes thresholdType,
int blockSize,
double c
)
static member AdaptiveThreshold :
src : InputArray *
dst : OutputArray *
maxValue : float *
adaptiveMethod : AdaptiveThresholdTypes *
thresholdType : ThresholdTypes *
blockSize : int *
c : float -> unit
Parameters
- src
- Type: OpenCvSharpInputArray
Source 8-bit single-channel image. - dst
- Type: OpenCvSharpOutputArray
Destination image of the same size and the same type as src . - maxValue
- Type: SystemDouble
Non-zero value assigned to the pixels for which the condition is satisfied. See the details below. - adaptiveMethod
- Type: OpenCvSharpAdaptiveThresholdTypes
Adaptive thresholding algorithm to use, ADAPTIVE_THRESH_MEAN_C or ADAPTIVE_THRESH_GAUSSIAN_C . - thresholdType
- Type: OpenCvSharpThresholdTypes
Thresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV . - blockSize
- Type: SystemInt32
Size of a pixel neighborhood that is used to calculate a threshold value for the pixel: 3, 5, 7, and so on. - c
- Type: SystemDouble
Constant subtracted from the mean or weighted mean (see the details below).
Normally, it is positive but may be zero or negative as well.
See Also