How can I connect my connected-components?

QQ浏览器截图20190319105427.png
This is a part of my binary image, and I got it by command "skel= bwmorph(BW,'skel',Inf)" .
I want to connect these white connected components, mergeing them into one connected component.
How can I do it?
THANKS! :)

Answers (1)

I = imread('QQ20190319105427.png') ;
I1 = rgb2gray(I) ;
imshow(I)
hold on
[c,h] = contour(I1) ;

3 Comments

Thanks, KSSV.
I am sorry, I cannot figure out your code.
My connected components were not merged into one component.
untitled.jpg
DRawing the contours....you will get your coordinates.....you want to join all the white lines?
Yes! I want to join all the white lines.

Sign in to comment.

Asked:

on 19 Mar 2019

Commented:

on 19 Mar 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!