Table of Contents

Method Threshold

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Threshold(InputArray, OutputArray, double, double, ThresholdTypes)

Applies a fixed-level threshold to each array element.

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

Parameters

src InputArray

input array (single-channel, 8-bit or 32-bit floating point).

dst OutputArray

output array of the same size and type as src.

thresh double

threshold value.

maxval double

maximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.

type ThresholdTypes

thresholding type (see the details below).

Returns

double

the computed threshold value when type == OTSU