Is it possible to find out the x and y coordinates of the line plot in a JPEG photo?

1 回表示 (過去 30 日間)
Kian Azami
Kian Azami 2018 年 2 月 25 日
コメント済み: Kian Azami 2018 年 2 月 27 日
I have a diagram in jpeg and I want to find the x and y coordinates of the plot in the image. I have attached the image to the question. Do you have any idea?

回答 (1 件)

Chandani Madnani
Chandani Madnani 2018 年 2 月 27 日
編集済み: Chandani Madnani 2018 年 2 月 27 日
  1 件のコメント
Kian Azami
Kian Azami 2018 年 2 月 27 日
I have used another method to extract the data.
Image = imread('YourImage.jpeg');
I = imshow(Image);
I.CData = I.CData(Max_Y_Pixel:min_Y_Pixel,min_X_Pixel:Max_X_Pixel,:);
[x,y] = meshgrid([min_X:(Max_X-min_X)/(size(Image.CData,2)-1):Max_X],[min_Y:(Max_Y-min_Y)/(size(I.CData,1)-1):Max_Y]);
z = double(I.CData(:,:,3)); % Or Red (1), Or Green(2), Or Blue(3)
m1 = surf(x,y,z);
ind = find(m1.ZData<'Your Condition')
X1 = m1.XData(ind);
Y1 = m1.YData(ind);
figure
plot(X1,Y1,'marker','.','markersize',10,'linestyle','none')
However,the method you suggested was interesting. Thank you for the link.

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

Community Treasure Hunt

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

Start Hunting!

Translated by