displaying RGB colours using SURF.

8 ビュー (過去 30 日間)
Sian Allerton
Sian Allerton 2020 年 12 月 27 日
コメント済み: Image Analyst 2020 年 12 月 29 日
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 件のコメント
Walter Roberson
Walter Roberson 2020 年 12 月 29 日
I suggest using warp()
Image Analyst
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
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)
  1 件のコメント
Image Analyst
Image Analyst 2020 年 12 月 27 日

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by