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 CenterFile Exchange에서 2-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