5 types of thresholding

来源:互联网 发布:mac的cmd在哪里 编辑:程序博客网 时间:2024/05/17 22:21
  • Threshold Binary
    高于阈值的被设定为最大值,低于阈值的设定为0
    高于阈值的被设定为最大值,低于阈值的设定为0

  • Threshold Binary, Inverted
    这里写图片描述
    高于阈值的被设定为0,低于阈值的被设定为最大值。

  • Truncate
    这里写图片描述

  • 高于阈值的被设定为等于阈值,低于阈值的不变。相当于截断。

  • Threshold to Zero
    这里写图片描述
    高于阈值的不变,低于阈值的归零。

  • Threshold to Zero, Inverted
    这里写图片描述
    高于阈值的归零,低于阈值的不变。

threshold(src_gray, dst, threshold_value, max_BINARY_value, threshold_type);

threshold type
0: Binary
1: Binary Inverted
2: Threshold Truncated
3: Threshold To Zero
4: Threshold to Zero Inverted

0 0