Plot 2D images in 3D scatter plot

조회 수: 17 (최근 30일)
Gregor
Gregor 2018년 10월 25일
댓글: ACHAMMA JACOB 2019년 1월 30일
Hello,
I recorded someone moving in front of a camera and now I have a 3D scatter plot of points that track that person's eyes (red and green in the picture below) over x, y and time. I want to insert single frames at specific time locations to show the current status of the input frame. How do I insert (transparent) 2D images into 3D plots?
Now I know how to create surfaces of images, and I also tried playing with hgtransform. However I'm not able to place both scatter3 and image in the same plot. They always end up on separate axes. I think those 2 links are related:
Thanks for your help

채택된 답변

Oliver Woodford
Oliver Woodford 2018년 10월 26일
h = surface(X, Y, Z, im, 'facecolor', 'texturemap', 'edgecolor', 'none');
alpha(h, 0.5);
X, Y, and Z are each 2x2 matrices containing the x, y and z coordinates of the 4 corners of your image, im.
  댓글 수: 5
Oliver Woodford
Oliver Woodford 2018년 12월 9일
The vol3d method can do what you want, so it is possible. The relevant lines are:
opts = {'cdatamapping',[],'alphadatamapping',[],'facecolor','texturemap','edgealpha',0,'facealpha','texturemap'};
surface(x,y,z,cslice,'alphadata',aslice,opts{:});
From that code it doesn't look like AlphaData does need to be 2x2.
ACHAMMA JACOB
ACHAMMA JACOB 2019년 1월 30일
how to convert a jpg binarized image into scatter plot if we doesnot have the data points?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by