Set Color of Point Cloud to the values of a vector

2 ビュー (過去 30 日間)
Diego Hens
Diego Hens 2020 年 8 月 14 日
コメント済み: Diego Hens 2020 年 8 月 14 日
Hello,
I have a good feeling about this question being answered. I don't think it is that difficult.
I have a matrix [x y z]. It describes a point cloud of a 3D object. I want to make a projection of this object to describe it in 2 dimensions. My idea is to plot the values of x and y and asign a grayscale value z' (from 0 to 255) proportional to z. For this I just do Z' = Z *(255/Zmax) (mathematically speaking, in Matlab it's written differently).
How can I tell Matlab now that each point(x,y) has the grayvalue of z'?
Thank you :)

採用された回答

KSSV
KSSV 2020 年 8 月 14 日
scatter(x,y,25,z,'filled') ;
colormap(gray)
  1 件のコメント
Diego Hens
Diego Hens 2020 年 8 月 14 日
Nice! Thank you so much <3

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by