There is an input image of a metal surface with lots of curves on it. I have used ' bwlabel ' function of MATLAB to identify all the curves of the image. Hence, each curve has its unique ID. Now my task is to connect two cruves which have gap between them. That is, there are two disjoint curves i.e. there is no connectivity between them, but I need to connect them and make them into a single curve.
E.g. In the above image, in the marked region, there are two disjoint curves which I would like to join.
Basically, I want a curve to be drawn joining those two curves.

댓글 수: 4

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 6월 19일
Can you attach little more larger image?
KSSV
KSSV 2020년 6월 19일
편집: KSSV 2020년 6월 19일
Make the x-values continuous, give y-valyes as NaN's and use fillmissing.
Or you can try some interpolation schemes.
Muskan Agrawal
Muskan Agrawal 2020년 6월 19일
@Kalyan Acharjya
Here is a larger image.
Muskan Agrawal
Muskan Agrawal 2020년 6월 19일
@KSSV
Can we use fillmissing to join two curves?

댓글을 달려면 로그인하십시오.

답변 (1개)

Divya Gaddipati
Divya Gaddipati 2020년 6월 25일

0 개 추천

You can use imdilate to make the lines come closer to each other. This will increase the width of the lines as well. To reduce them back to their original, you can then use bwskel.
For more information of imdilate and bwskel, you can refer to the following links:

카테고리

도움말 센터File Exchange에서 Smoothing에 대해 자세히 알아보기

태그

질문:

2020년 6월 19일

답변:

2020년 6월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by