【问题标题】:Image Segmentation in MATLAB using adaptive threshold function使用自适应阈值函数在 MATLAB 中进行图像分割
【发布时间】:2020-02-28 00:58:06
【问题描述】:

我使用以下函数编写了几行代码:

adaptivethreshold(IM,ws,c)

它给了我一个面具bw。我将此蒙版与我的原始图像bb 相乘并显示结果。

clear
clc
bb=dicomread('30421573');
figure(1)
imagesc(bb)
bw=adaptivethreshold(bb,50,128);
imaa=double(bw).*double(bb);
figure(2)
image(imaa)

显示原始图像和结果:

它似乎没有为我的图像提供任何遮罩。有什么方法可以从结果中提取那些黄色部分?

【问题讨论】:

标签: matlab function image-processing image-segmentation image-thresholding


【解决方案1】:

尝试在应用到图像之前创建蒙版,即

bw=adaptivethreshold(bb,50,128);
BW = imbinarize(bb,bw);
imaa=double(bw).*double(BW);
figure(2)
image(imaa)

【讨论】:

  • 如果 OP 使用图像处理工具箱中的 adaptthresh,这将是正确的。但不清楚 OP 实际使用的是哪个函数,见my other comment
猜你喜欢
  • 1970-01-01
  • 2015-07-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-08-28
  • 2018-02-21
  • 2012-11-03
相关资源
最近更新 更多