フィルターのクリア

Finding the coordinates of a line drawn by line function

12 ビュー (過去 30 日間)
prashanth A
prashanth A 2018 年 3 月 17 日
コメント済み: prashanth A 2018 年 3 月 17 日
I have a set of coordinate points set_pts = [ 239 1486 239 1531 239 1567 243 1607 255 1651 279 1615 299 1579 319 1551 351 1527];
Using line function, I could connect them easily on an image.
line(set_pts(:,1),set_pts(:,2));
Now I want to know the coordinates of each point on the line drawn by 'line' function.
How do I get it?

回答 (1 件)

Matt J
Matt J 2018 年 3 月 17 日
編集済み: Matt J 2018 年 3 月 17 日
h=line(set_pts(:,1),set_pts(:,2));
h.XData,
h.YData,
  8 件のコメント
Matt J
Matt J 2018 年 3 月 17 日
編集済み: Matt J 2018 年 3 月 17 日
The pixel coordinates on your computer monitor or would it be enough to analyze an image file? If you want to obtain the figure as a pixelated image, you can use the Save menu option in the figure window or you can use the saveas() command. However, the pixelation of the line will depend on how much you zoom.
In either case, you will need a criterion to decide which image pixels belong to the line and which do not. Matlab's graphics rendering will shade the pixels differently depending on how close they lie to the border of the line.
prashanth A
prashanth A 2018 年 3 月 17 日
I think I have not conveyed the problem correctly.

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

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by