フィルターのクリア

plot a 3D image

1 回表示 (過去 30 日間)
pemfir
pemfir 2012 年 11 月 5 日
I have a 640*480 image in the form of a 3D matrix (it is a 640*480*6 matrix)
there are total of 6 layers
layers 1-3 represent the colors of pixels layers 4-6 represent the coordinates (x,y,z) of the pixel. for example one pixel has the following information: [red green blue x y z] is there an easy way to plot this ?

採用された回答

Walter Roberson
Walter Roberson 2012 年 11 月 6 日
It is not so bad in the narrow circumstance that the coordinates together fill a planar grid. It is only easy in the even narrower circumstance that the planar grid is along the z plane.
If this condition does not hold, then you are probably not going to be able to form an "image" in the usual sense.
Does the data represent volumetric data over a completely filled cuboid grid? Or volumetric over a sparse grid? Or is it just a set of scattered point-like objects? Or is it sampled data on a surface that should be implicitly smoothly connected to the points closest to it?
  3 件のコメント
Walter Roberson
Walter Roberson 2012 年 11 月 6 日
x = YourData(:,1);
y = YourData(:,2);
z = YourData(:,3);
cols = YourData(:,4:6);
pointsize = 10;
scatter3(x, y, z, pointsize, cols);
pemfir
pemfir 2012 年 11 月 6 日
thank you very much !

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by