[使用自适应阈值函数的MATLAB图像分割

问题描述 投票:0回答:1

我使用以下功能编写了一些代码行:

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)

原始图像和结果显示为:enter image description hereenter image description here

它似乎并没有为我的图像蒙上阴影。有什么方法可以从结果中提取出那些黄色的部分?

matlab function image-processing image-segmentation image-thresholding
1个回答
0
投票

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

bw=adaptivethreshold(bb,50,128);
BW = imbinarize(bb,bw);
imaa=double(bw).*double(BW);
figure(2)
image(imaa)
© www.soinside.com 2019 - 2024. All rights reserved.