Line detection //contour tracing/plot...pls help needed in matlab

For the given image the lines are detected using hough transform.What should be done to connect these lines?? Pls help me with tha matlab coding..

Answers (1)

What does "connect" mean to you? Do you want every single endpoint connected to every other endpoint with a line drawn in the overlay? Or what? Maybe you want edgelinking http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/#edgelink?

5 Comments

linking the edges..One end point of the line with the next beginning point of another line...Linking the edges..so that we have traced all the detected edges
So try the link. Basically you have to examine all endpoints and if another endpoint is nearby by not yet connected, you have to check the angle that would be formed by the connecting link and the two existing segments. If the angle is small enough, then make the connection.
Ho thank you! I will try that
Can you mark it as Accepted? You can still come back with questions though.
Hello Image Analyst
With regards to line detection for a square, using hough transform, I have detected the lines of the square but I need your help with something. How do I say in matlab code that the 2 lines on the rows is perpedicular and the lines on the columns also are and also to say the angles are 90 degrees at the edges to make it a square.
please advice thanks

Sign in to comment.

Asked:

on 5 Feb 2014

Commented:

on 3 Jun 2014

Community Treasure Hunt

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

Start Hunting!