Plotting a 2D plot from the image

11 ビュー (過去 30 日間)
Avinash Srinivasa
Avinash Srinivasa 2018 年 5 月 8 日
コメント済み: Avinash Srinivasa 2018 年 5 月 8 日
Hello there, I need help regarding how to extract the 2d data and plot it from a image. The data file was excel worksheet and was plotted using matlab. Now suppose if I intend to plot a 2 dimensional line plot for example Distance vs intensity along the line shown, how do I do that. Please not that I am not looking for slice, I am just looking for a line plot to check the intensity fluctuation with distance.
Thank you
  3 件のコメント
Avinash Srinivasa
Avinash Srinivasa 2018 年 5 月 8 日
編集済み: Avinash Srinivasa 2018 年 5 月 8 日
I have the original file. Its an excel worksheet. See the comment below
Avinash Srinivasa
Avinash Srinivasa 2018 年 5 月 8 日
Please find the .fig file attached

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

回答 (2 件)

Image Analyst
Image Analyst 2018 年 5 月 8 日
Load your workbook data into a 2-D array. Then you can use improfile() to get the intensity profile along any poly-line you want.
  1 件のコメント
Avinash Srinivasa
Avinash Srinivasa 2018 年 5 月 8 日
Thank you

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


Avinash Srinivasa
Avinash Srinivasa 2018 年 5 月 8 日
編集済み: Avinash Srinivasa 2018 年 5 月 8 日
I used the following code. I am unable to attach the file as its a.xlxs extension not supported by this portal
data=xlsread('file name .xlsx');
data_pos=-data;
pixmax=20;
x=pixmax/85:pixmax/85:pixmax;
y=x;
[X,Y]=meshgrid(x,y);
figure
s = surf(X,Y,data_pos);
s.EdgeColor = 'none';
daspect([1 1 0.01])
xlabel('Distance \mum', 'FontSize',20)
ylabel('Distance \mum','FontSize',20)
set(gca, 'FontSize', 20)
xticks([0 5 10 15 20 25 30])
hcb=colorbar;
title(hcb,'Intensity')
view(2)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by