Borrar filtros
Borrar filtros

create patch with color of image

5 visualizaciones (últimos 30 días)
Gaurav Gupta
Gaurav Gupta el 18 de Jul. de 2011
I have an image and I want to create a patch with color map same as of image i.e. patch should look like image itself. I tried to search and I think it has to do something with cdata but I don't understand how to apply that.
Any suggestions!!
  1 comentario
Sean de Wolski
Sean de Wolski el 18 de Jul. de 2011
Is it an rgb image or grayscale?

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 18 de Jul. de 2011
As posted in your former thread: Anders Brun has created a FEX submission, which uses different methods to display an image in 3D: FEX: image3
Example with SURFACE:
im = imread('football.jpg');
surface([1, 320; 1, 320], [1,1; 256, 256], zeros(2), ...
'FaceColor', 'texturemap', ...
'CData', im, 'CDataMapping', 'direct');

Más respuestas (1)

Walter Roberson
Walter Roberson el 18 de Jul. de 2011

Categorías

Más información sobre Colormaps 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