How do I create a 3-D plot of the pixel intensity of an image in MATLAB?
25 次查看(过去 30 天)
显示 更早的评论
How do I create a 3-D plot of the pixel intensity of an image in MATLAB?
采纳的回答
MathWorks Support Team
2009-6-27
Here is a simple example with a grayscale image that we ship (moon.tif):
I=imread('moon.tif');
[x,y]=size(I);
X=1:x;
Y=1:y;
[xx,yy]=meshgrid(Y,X);
i=im2double(I);
figure;mesh(xx,yy,i);
colorbar
figure;imshow(i)
The above code will create a 3-D plot of the pixel intensity of the image moon.tif, found in:
$MATLAB\toolbox\images\imdemos\ (where $MATLAB is the root MATLAB directory)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Red 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!