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.
There are two ways of doing it.
- Use kinect depth map to find the distance of hand from camera.
- 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