Ordering 2d/3d object behind other element

帅比萌擦擦* 提交于 2019-12-02 13:50:24

问题


As you can see in the link, I have two elements: first is image element which is taken from camera (using EmguCV) and the other one is viewport3d which renders 3d object. I also include 2d object (see the rectangle).

When I run my program I see this.

Yes indeed, the object (hand) will be ordered in front of the image.

The question is how to order 2d/3d object behind the hand object? Is it possible to do it using single camera? Just like this one.

Thanks in advance for your answers.


回答1:


There are two ways of doing it.

  1. Use kinect depth map to find the distance of hand from camera.
  2. Do image processing to detect hand and it's distance.

I think it will be difficult to directly blend WPF UI with camera image. Try RenderTargetBitmap http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.rendertargetbitmap.aspx



来源:https://stackoverflow.com/questions/11159740/ordering-2d-3d-object-behind-other-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!