Plot 2D images in 3D scatter plot
11 次查看(过去 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
0 个评论
采纳的回答
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
2018-12-9
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
2019-1-30
how to convert a jpg binarized image into scatter plot if we doesnot have the data points?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!