create patch with color of image

조회 수: 4 (최근 30일)
Gaurav Gupta
Gaurav Gupta 2011년 7월 18일
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
Sean de Wolski
Sean de Wolski 2011년 7월 18일
Is it an rgb image or grayscale?

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2011년 7월 18일
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');
  댓글 수: 1
Gaurav Gupta
Gaurav Gupta 2011년 7월 19일
Thank you very much!!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 7월 18일

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by