displaying RGB colours using SURF.
이전 댓글 표시
I am trying to display a rgb colour map on a gridded surface using surf.
I have grids of each rgb colour. How do I combine to give the surf(x,y,z,C)?
thanks
댓글 수: 6
Sian Allerton
2020년 12월 28일
Image Analyst
2020년 12월 28일
For the benefit of others, could you provide a small demo?
I'm attaching mine (which is based Bruno's method below).

Ameer Hamza
2020년 12월 29일
It should be "based on Ameer's method" :P
Sian Allerton
2020년 12월 29일
Walter Roberson
2020년 12월 29일
I suggest using warp()
Image Analyst
2020년 12월 29일
Sorry Ameer, you're absolutely right. Sometimes I work on too many problems too close together. I must have gotten confused.
답변 (1개)
Ameer Hamza
2020년 12월 27일
You can use texture mapping to display an RGB image on a surface(). See here: https://www.mathworks.com/matlabcentral/answers/91858-is-it-possible-to-perform-texture-mapping-within-matlab. For example
img = imread('pears.png');
z = peaks(100);
surf(z, ...
'FaceColor','texturemap',...
'EdgeColor','none',...
'Cdata',img)
view(3)
카테고리
도움말 센터 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

