Home » C++ ProgrammingRSS

Any way to show camera stream and draw something on this video stream?

Here I want to write an interesting application.

In my program, I will capture the video generated by camera and show it to user in real time style. That's mean user will get what camera get.

Then I will draw some computer graphics on this video stream, like 2D text, 3D model etc.

Any good way to do this? How can I show the camera video stream and how can I draw something on it?

Thanks

Water Lin

 

5 Answers Found

 

Answer 1

You can write  your customized directshow camera  application.You can start your DShow Camera application  from this sample
 
Normally in display controller hardware has the support for multiple layers(ex:Base-->Overlay1-->Overlay2-->Cursor)
 
Normally if your device display driver has the support for DirectDraw,then there will be support for hardware rendering in those above surfaces.
 
For DShow camera renderer you can use DDRAW renderer which will use one surface.(Say Overlay1).
 
Using DDRAW apis you can create another surface on top of video  stream(Say Overlay 2).On this surface you can display your custom 2D text.
 
For checking the DDRAW support on your hardware you can run the sample applications which is found on the WM 6.5 DTK install directory.
 
C:\Program Files\Windows Mobile 6.5.3 DTK\Samples\PocketPC\CPP\win32\directx\DDraw\
 
 
 
 

Answer 3

You can write  your customized directshow camera  application.You can start your DShow Camera application  from this sample
 
Normally in display controller hardware has the support for multiple layers(ex:Base-->Overlay1-->Overlay2-->Cursor)
 
Normally if your device display driver has the support for DirectDraw,then there will be support for hardware rendering in those above surfaces.
 
For DShow camera renderer you can use DDRAW renderer which will use one surface.(Say Overlay1).
 
Using DDRAW apis you can create another surface on top of video  stream(Say Overlay 2).On this surface you can display your custom 2D text.
 
For checking the DDRAW support on your hardware you can run the sample applications which is found on the WM 6.5 DTK install directory.
 
C:\Program Files\Windows Mobile 6.5.3 DTK\Samples\PocketPC\CPP\win32\directx\DDraw\
 
 


Thanks for you detail instructions.

Currently I know how to use DDraw for drawing overlay.

I am still wondering how to draw  the camera view on my screen? I want to build a full screen application and I will draw the camera view on this application. Something like camere capture  view on Windows Mobile system.

If I want to do this, do I need to capture camera picture one by one and draw them on my application? Or is there any other API to do it for me?

Thanks

Water Lin

 

Answer 4

you have to use DirectShow Framework to show  the Camera view (preview) on  your screen. Sample applications are available in the Windows SDK as well as the Windows Mobile AKU or Windows CE platform builder.

I have given a sample directshow framework from windows CE 6.0.

\WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\CAMERA

 

 

 

Answer 5

Hello,

I'm write  an application  for Samsung Omnia2 similar to your program. I need capture video  in real  time and overlay shapes and text.

can you help me?

thanks

jpportillob

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter