How to compute the angle of the lines of an image in matlab?

6 views (last 30 days)
Hi guys
I need to find all the angles of the line of an image. I found a Standard Hough Transform (SHT) function in matlab,
[H, theta, rho] = hough(BW, ParameterName, ParameterValue)
Will theta be the angles of the lines? I need to represent all the angles in a histogram. I appreciate if someone could help me with this. Thanks in advance.
Marcus

Accepted Answer

Walter Roberson
Walter Roberson on 24 Jan 2013
No, theta and rho will correspond to the range of angles used to generate H. See the example http://www.mathworks.com/help/images/ref/hough.html and note that T (theta) and R (rho) are used as XData and YData for imshow() and so correspond to the range of values rather than individual line angles.
  1 Comment
Marcus
Marcus on 24 Jan 2013
Hi
thanks for the quick reply. If that is the case, could you provide a way to measure the angle of the lines in the image? I really appreciate your help as I am still new to Matlab
Marcus

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!