connect lines after Hough transform
Mostra commenti meno recenti
I am working on a image (first image included here) where I need to automatically draw lines by connecting the objects oriented in particular direction (desired image is the one with red lines). I tried to address this using Hough transform. This helped too some extent, but the lines are disconnected (second figure). This might be due to distance between objects in a row. I need to connect these several small lines appearing in a row (second figure). Can someone help me to solve this problem? I am fairly new to matlab, so I would appreciate if someone can share the excerpt of codes to address this.
Also, one thing we can notice in the bottom of the second image is the multiple lines that are not parallel. Since these are unnecessary lines, I want to ignore those areas while drawing the lines. As in large portion of the image, one row runs parallel to the another (i.e., they are y distance apart from each other), can we use this relation to get rid of those nonparallel lines while drawing the lines? If one can, how can we implement this?
I look forward to your comments. Thanks.



Risposte (1)
Image Analyst
il 26 Ago 2017
0 voti
You can burn the lines into the image (see attached demo program) and then either skeletonize the image or remove spurs (both can be done with bwmorph()).
2 Commenti
Sami
il 28 Ago 2017
Categorie
Scopri di più su Hough Transform in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!