improfile(), How can I use a .fig format with improfile?
古いコメントを表示
Hello all,
I have a .fig file that I want to make multiple profiles for, but improfile doesn't like when I try to pass it as an input.
[x,y,I] = improfile; works when I have a figure already open, but I want to take the initial x that I draw and make additional profiles the next pixel over. So my code looks like this:
figure(5)
imagesc(X,Y,Q,[0 1])
colormap(TSPcolormap);
colorbar;
[Px,Py,I] = improfile; % draw initial profile
for k=1:5
[Qprof(:,k)] = improfile(figure(5), Px+k ,Py);
end
The .fig file is a matrix 600x800 and has a color map so if I try to save it as anything else it loses the scaling and shows up as intensity or RGB instead. So is there a way to tell improfile to read in the current figure?
Also I have tried replacing figure(5) with gcf, gca, etc. To use improfile with initial x and y would have to pass an image through and cannot leave it blank.
Thanks
採用された回答
その他の回答 (2 件)
Image Analyst
2014 年 7 月 15 日
0 投票
Pass Q into improfile() instead of figure(5).
カテゴリ
ヘルプ センター および File Exchange で Region and Image Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!