How to plot grey level variation along horizontal cross-section of any image according to position of the mouse?
3 次查看(过去 30 天)
显示 更早的评论
How to plot grey level variation along horizontal cross-section of any image according to position of the mouse?
0 个评论
采纳的回答
Dishant Arora
2014-12-5
I = imread('cameraman.tif');
[row , column] = size(I);
imshow(I)
[x , ~] = ginput(1);
plot(1:column , I(x , :))
更多回答(1 个)
Image Analyst
2014-12-5
There is a function specifically built for that. It's called improfile(). It can handle profiles at any angle, though if you know that you want exactly a perfect row or column, the code Dishant gave is the way to go.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Map Display 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!