2017-07-07 73 views
2

我有兩個骨架圖像,我提取的分支點。不幸的是,分支似乎並不正確。有沒有人有關於如何提取有效分支點(即「y」形狀點)的建議?matlab:檢測從骨架更好的分支點

reg1 = imread('region1.tif'); 
[i,j] = ind2sub(size(reg1), find(bwmorph(reg1,'branchpoint') == 1)); 
h=figure; imshow(reg1); hold on; plot(j,i,'rx');print(h,'reg1overlay','-dtiff'); 

在第一示例下面只應有一個分支點:

Region 1 original image Region 1 overlay

reg2 = imread('region2.tif'); 
[i,j] = ind2sub(size(reg2), find(bwmorph(reg2,'branchpoint') == 1)); 
h=figure; imshow(reg2); hold on; plot(j,i,'rx');print(h,'reg2overlay','-dtiff'); 

在第二個例子下面只應有沒有分支點:

Region 2 original image Region 2 overlay

回答

0

嘗試:

branchskel = bwmorph(BW,'skel',Inf); %BW is your binarized image 
branchskel = bwmorph(branchskel,'thin'); %this should remove those pixel piles that are giving you problems 
B = bwmorph(branchskel, 'branchpoints'); 
[yb,xb] = find(B);