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
srcInputArrayinput array (single-channel, 8-bit or 32-bit floating point).
dstOutputArrayoutput array of the same size and type as src.
threshdoublethreshold value.
maxvaldoublemaximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
typeThresholdTypesthresholding type (see the details below).
Returns
- double
the computed threshold value when type == OTSU