How to connect two objects based on least distance between them?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
peyush
am 1 Jul. 2015
Kommentiert: peyush
am 4 Jul. 2015
I have a binary image containing two separate objects...I want to connect them such that they are connected on basis where the distance between them is the least?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 1 Jul. 2015
Call bwboundaries. Then have some for loops where you check all the boundary coordinates to see which distance is least. Then you can use imline() to burn a connecting line into the image, like in the attached demo.
7 Kommentare
Weitere Antworten (1)
Image Analyst
am 3 Jul. 2015
peyush, your code didn't even seem to attempt to modify my code at all. It looks like I need to do it for you. See the attached demo which makes the connection.
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!