Implementing Hough transform for points with X and Y coordinates.

8 ビュー (過去 30 日間)
Mary
Mary 2013 年 10 月 2 日
コメント済み: Brent F 2021 年 7 月 3 日
Hi all
I have the x-y coordinates of 10 points in two rows, each 5 points in one row. I want to plot these points and implement Hough transform to fit line along the points in each row. I also want to estimate the centerline line between these two rows. Could someone please help me with the matlab codes to solve this problem. Your help is highly appreciated. the x, y coordinates of the points are:
x=[2,2,2,2,2,4,4,4,4,4],
y=[2,4,6,8,10,2,4,6,8,10]

採用された回答

Matt J
Matt J 2013 年 10 月 2 日
You can use
BW=full(sparse(x,y,true));
to obtain a binary image of the points. Then you can use HOUGHLINES to fit lines.
  2 件のコメント
Mary
Mary 2013 年 10 月 2 日
Thank you very much Matt for your answer.
Brent F
Brent F 2021 年 7 月 3 日
What a great idea. But getting the x index of the start/end of the lines isn't straightforward.
How did you do it?

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by