Cv2Threshold Method OpenCvSharp Class Library
Applies a fixed-level threshold to each array element.

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static double Threshold(
	InputArray src,
	OutputArray dst,
	double thresh,
	double maxval,
	ThresholdType type
)

Parameters

src
Type: OpenCvSharp.CPlusPlusInputArray
input array (single-channel, 8-bit or 32-bit floating point).
dst
Type: OpenCvSharp.CPlusPlusOutputArray
output array of the same size and type as src.
thresh
Type: SystemDouble
threshold value.
maxval
Type: SystemDouble
maximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
type
Type: OpenCvSharpThresholdType
thresholding type (see the details below).

Return Value

Type: Double
the computed threshold value when type == OTSU
See Also

Reference