how to get a 3D view of grey image?

2 次查看(过去 30 天)
Hi every one,
so i have a gray image and i want to have a view of the different regions in the image (steep/flat regions)
how can i display a 3D view so the x,y will represent the pixel location and z will represent the value of the pixel?
thank you!

采纳的回答

Ameer Hamza
Ameer Hamza 2020-6-15
You can use surf()
img = im2double(imread('pears.png'));
img_gray = rgb2gray(img);
surf(img_gray)
shading interp
img_gray:
surf():

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by