Laying image over 3-D surface

4 visualizaciones (últimos 30 días)
ohmstead
ohmstead el 21 de Mzo. de 2018
Comentada: Walter Roberson el 22 de Mzo. de 2018

I have a 3-D on which surface I'd like to lay an image "on top." The specific surface I have is created from the variable new, which is a 960 x 1280 matrix:

ax = mesh(new);
ax.XLim = [0 1280]; 
ax.YLim = [0 960]; 
box on
view(-37.5,-30);

This plot is viewed from an elevation of -30 degrees. I want to overlay a 2-D image so that when the image is viewed in regular 2-D Cartesian space, its warp gives the effect that the image is "falling in" to the sharp minimum on the surface. What's the best way to do this? Thank you!

Respuestas (1)

Walter Roberson
Walter Roberson el 21 de Mzo. de 2018
  6 comentarios
ohmstead
ohmstead el 22 de Mzo. de 2018
Thanks for the tip! Changed the variable name.
No luck with pcolor.
Walter Roberson
Walter Roberson el 22 de Mzo. de 2018
Could you post your complete code (in particular how you create new) so I can do some testing? I know what the basic problem is, but I need some test data to try out ideas.
The basic problem is that you are using rectangular pixels in a uniform rectangular grid, and the default lighting model is that the brightness and color of a pixel does not depend upon the depth from the viewer. You either need to move to using X Y that are not uniform rectangular, or else to make changes so that the brightness chances according to depth.

Iniciar sesión para comentar.

Categorías

Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by