简体   繁体   中英

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 ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM