フィルターのクリア

Plotting an image with its coordinates and RGB values

3 ビュー (過去 30 日間)
bami95
bami95 2019 年 1 月 31 日
回答済み: Jan 2019 年 1 月 31 日
I have a question about plotting images in Matlab. I have a 3D array which includes the X-Y-Z coordinates of each point and their RGB values as below:
surface=zeros(2000,2000,6); %%after filling the matrices, surface(:,:,1:3) represents RGB values for each point and surface(:,:,4:6) represents the X-Y-Z coordinates of each point and Z is zero so it's a 2D image
Is it possible to retrieve the image based on this array? I have taken a look at plot(),interp2() and ... non of them do what I want.
Thank you very much

回答 (3 件)

Davide Frey
Davide Frey 2019 年 1 月 31 日
I think that
imshow(surface(:,:,1:3))
should do the trick...

bami95
bami95 2019 年 1 月 31 日
Thank you for your answer. Actually I want to plot the image of a colorful wall taken by a camera so the coordinates of all the points should be interpolated . The above code only returns the initial image of wall without considering the relative position of reference frames.(camera reference frame and the wall reference frame)
  1 件のコメント
bami95
bami95 2019 年 1 月 31 日
My question is how to plot an image with (x,y,r,g,b) ?

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


Jan
Jan 2019 年 1 月 31 日
"X-Y-Z" does not sound like a 2D image, but like 3D voxels.

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by