程序设计师——问题阈值图像
2视图(30天)
显示旧的评论
嗨,伙计们,
我有附加的应用程序,我遇到两个问题。首先,在阈值图像显示阈值的图像,似乎我的函数调用不做显示的图像不是阈值。(
ResinThreshold
函数在现场编辑工作,但当应用程序设计师)。下面的阈值函数。
谢谢
函数ResinThreshold(应用)
imgGrey = rgb2gray (app.img);
(重要,~)= imhist (imgGrey, 255);
T = otsuthresh(重要);
BW = imbinarize (imgGrey T);
BW = bwareaopen (BW, 3000);
BW = imfill (BW,“黑洞”);
BW = bwperim (BW);
BW = imdilate (BW, (5));
BW = imerode (BW, (3));
BW = imfill (BW,“黑洞”);
app.img = app.img。* repmat (uint8 (BW), [1 1 3]);
结束