开发者

How to render 3d scene over webcam frame in DirectX?

I'm capturing webcam using AForge so I've every frame as 开发者_运维知识库a bitmap. I would like to render some scene over it. Currently I am rendering DirectX (SlimDX) scene over C# Panel control.

Is there a possibility to put bitmap to ZBuffer or maybe some other way to achieve it?


To do this you need to insert a transform filter into the DirectShow graph. Basically You take in the video frame you convert it to a texture, render the video texture to the back of the frame buffer and then do whatever 3D rendering you wish to do over the top.

Its, by no means, a simple process. Directshow can get quite involved. The helper classes in the windows SDK help a lot, however. Alas though I'm not sure how you would then insert your filter into the graph in AForge ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜