在原始图像上绘制骨架端点 - Matlab

时间:2018-04-18 20:44:47

标签: matlab

我根据下面的代码对图像进行框架化。如何在原始图像上绘制端点?

代码:

clc;
clear;
close all;
bw = imread('circles.png');
imshow(bw);
bw2 = bwmorph(bw,'remove');
figure
imshow(bw2)
bw3 = bwmorph(bw,'skel',Inf);
figure
imshow(bw3)

bw4 = bwmorph(bw3,'thin',Inf);
figure
imshow(bw4)

bw_endpoints = bwmorph(bw4, 'endpoints');
imshow(bw_endpoints)

[i_end,j_end] = find(bw_endpoints);
imshow(bw); hold on; 
plot(i_end,j_end,'o')

0 个答案:

没有答案