2d image to 3d surface

a = imread('Sample.jpeg');
surfc(rgb2gray (a), 'EdgeColor','none')
grid on
colormap (jet(50))
shading interp
Im using this code to make a 3d surface, but i got the surface upsite down. Can any one help me please?

Respuestas (1)

Star Strider
Star Strider el 22 de Abr. de 2020

0 votos

Try this:
a = imread('Sample.jpeg');
surfc(rgb2gray (a), 'EdgeColor','none')
grid on
colormap (jet(50))
shading interp
set(gca, 'ZDir','reverse')
.

5 comentarios

agung pratama
agung pratama el 22 de Abr. de 2020
The Z-direction may be reversed, but the color bar still says the table is taller than a hammer.
Star Strider
Star Strider el 22 de Abr. de 2020
What result do you want?
agung pratama
agung pratama el 28 de Abr. de 2020
Editada: agung pratama el 28 de Abr. de 2020
A 3D graphic, something like this
Star Strider
Star Strider el 28 de Abr. de 2020
That is likely not possible from a planar image. You would need to do some sort of scan (laser, CT, MRI) or something similar (stereoscopy) to extract the shape of the object. A single image itself will not provide that information.
Priscila de Araújo
Priscila de Araújo el 29 de Ag. de 2021
Hi, Star Strider. I have four images of an object (superior view, lateral view, anterior view, posterior view). Can you help me, please?

Iniciar sesión para comentar.

Categorías

Etiquetas

Preguntada:

el 21 de Abr. de 2020

Comentada:

el 29 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by