How to extract point from a group of plot graph?

2 ビュー (過去 30 日間)
SUSHMA MB
SUSHMA MB 2018 年 3 月 8 日
コメント済み: SUSHMA MB 2018 年 3 月 8 日
I have a folder with some .png files. Please check the attachment of the folder. How can i exrtact the coordinates of the line from the figure. I have tried with the following code:
h = findobj(gca,'Type','line');
x=get(h,'Xdata');
y=get(h,'Ydata');
But with this code im getting all the coodinates from the plot. How can i extract only the coordinates of the line that is plotted in the figure i.e., the coordinates of the blue dots in the figure.

回答 (1 件)

KSSV
KSSV 2018 年 3 月 8 日
I = imread('fig500.png') ;
I1 = rgb2gray(I) ;
[y,x] = find(I1==29) ;
imshow(I)
hold on
plot(x,y,'.m')
  1 件のコメント
SUSHMA MB
SUSHMA MB 2018 年 3 月 8 日
It didn't work....Im not getting any coordinates with it.

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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by