cv::threshold()
threshold(InputArray src, OutputArray dst,double thresh, double maxVal, int thresholdType)
参数
src - 输入矩阵对矩阵src中的每个元素应用固定阈值分割
dst - 输出矩阵
thresh - 阈值
maxVal - 设置的最大值
thresholdType - 阈值类型
阈值类型
THRESH_BINARY:过门限的值设置为maxVal,其它值置零
THRESH_BINARY_INV:过门限的值置零,其它值设置为maxVal
THRESH_TRUNC:过门限的值设置为门限值,其它值置不变
THRESH_TOZERO:过门限的值不变,其它值置零
THRESH_TOZERO_INV:过门限的值置零,其它值不变
cv::minMaxLoc
(InputArray src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
在给定的矩阵中寻找最大和最小值(包括它们的位置).
Parameters: |
|
---|