displaying RGB colours using SURF.
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!