| Cv2Threshold Method |
Applies a fixed-level threshold to each array element.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static double Threshold(
InputArray src,
OutputArray dst,
double thresh,
double maxval,
ThresholdTypes type
)
Public Shared Function Threshold (
src As InputArray,
dst As OutputArray,
thresh As Double,
maxval As Double,
type As ThresholdTypes
) As Double
public:
static double Threshold(
InputArray^ src,
OutputArray^ dst,
double thresh,
double maxval,
ThresholdTypes type
)
static member Threshold :
src : InputArray *
dst : OutputArray *
thresh : float *
maxval : float *
type : ThresholdTypes -> float
Parameters
- src
- Type: OpenCvSharpInputArray
input array (single-channel, 8-bit or 32-bit floating point). - dst
- Type: OpenCvSharpOutputArray
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: OpenCvSharpThresholdTypes
thresholding type (see the details below).
Return Value
Type:
Doublethe computed threshold value when type == OTSU
See Also