首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何填补血管之间的缝隙

如何填补血管之间的缝隙
EN

Stack Overflow用户
提问于 2017-07-11 13:57:39
回答 1查看 272关注 0票数 2

我得把血管间的缝隙填满。我已经尝试过用圆盘和球状结构元素扩张,但它不起作用,它只会扩张血管,仍然会出现间隙。下面的附图是分割结果和相应的基本事实。

请帮助我弥合这些差距。

EN

回答 1

Stack Overflow用户

发布于 2018-05-03 15:05:28

代码语言:javascript
复制
    [imagename, imagepath] = uigetfile({'*.png; *.tif;*.jpg;*.png'},'Select file');
address = fullfile( imagepath,imagename);
a = imread(address);
% figure, imshow(a);
image = imresize(a,  [512 512]);          %Resizing image
tic;
gchanel=image(:,:,2);                         %Green Chanel Extraction
% figure,imshow(gchanel);        
Igchanel = imcomplement(gchanel);             %Inversion
% figure,imshow(Igchanel);
conenhance = adapthisteq(Igchanel);           %Contrast Enhancement
% figure,imshow(conenhance);
g = imgaussfilt(conenhance,2);                %Gaussian filtering
% figure,imshow(g);
se = strel('ball',8,8) ;                     
tophat = imtophat( conenhance,se);             %Tophat transform
% figure,imshow(tophat)
med = medfilt2(tophat);                        %Median filtering
background = imopen(med,strel('disk',15));      
I2 = med - background;                         % Background Removal
% figure,imshow(med);
I3 = imadjust(I2);                             %Intensity Adjustment
level = graythresh(I3);                        % Gray Threshold
bw = im2bw(I3,level);                          % Binarization                                
% figure,imshow(I2);
figure,imshow(bw);

上面的@ Carlos Borau是我在下面给出的示例图像上尝试的代码。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45026479

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档