如何在图像的特定区域应用阈值?

时间:2012-06-13 06:11:29

标签: image-processing matlab

我有240x20像素的图像。 我已经计算了一个最小阈值来找到图像中的噪声。在观察到图像的特定区域包含x方向上的20到70之类的噪声之后。

现在我想在该特定区域应用阈值。有任何简单的方法。

1 个答案:

答案 0 :(得分:2)

如果我理解你的问题,这可能就行了(只在八度音中测试):

bw = im2bw(I(y1:y2, x1:x2, :), threshold);
% y1 = start row
% y2 = end row
% x1 = start column
% x2 = end row
% the last column is for color images, so you address all color channels
% bw is an extract from the image I with the threshold applied
相关问题