函数 > 图像处理 > 图像操作 > 阈值化
  
阈值化
threshold(M, thresh) - 返回矩阵 M,其中每个低于 thresh 的元素将被设置为 thresh。如果 thresh 为负数,则每个高于 −thresh 的元素将被设置为 −thresh
阈值化可用来移除图像中的背景特征 (或噪声),或偏移其强度谱。
* 
可通过以下三种方法之一来使用此函数:
当 thresh 为零时,所有元素均设置为零。
当 thresh 为正值时,若 M 中的元素小于 thresh,则设置为零;否则保留原始值。
当 thresh 为负值时,若 M 中的元素大于 thresh 的绝对值,则设置为零;否则保留原始值。
自变量
M 为图像矩阵。
thresh 为实数。