Live video feed information display

Hi, I am working on making an arduino project that takes information from a webcam, a temperature/humidity sensor, and a few other things. What I am hoping to accomplish is to display all the information being taken from those sensors and display it in real time over top of the webcam feed. How would I do this and where can I go to learn about this?
Any feedback you have would greatly help!
Last edited on
You could take the data provided from each of these sources and combine them in a program that either is standalone and receives/displays the webcam feed itself, or runs alongside the webcam display and provides the additional elements.

If you wanted to display the data in textual form, you would need a window with some static controls that get updated values for each of the variables every designated amount of time (refresh time). If you wanted graphics, you could use GDI+ or even add a viewport for DirectX or OpenGL to render the data in a visual form, based on the real-time data.

and display it in real time over top of the webcam feed


I'm not sure if by "over top" you mean "above" (as in side-by-side, etc) or you mean "overlaying". If you mean the second one, and you wanted a new/custom/combined feed generated that includes the data in it (like a framerate counter seen in real-time graphics applications, etc), you would definitely need to use DirectX or OpenGL in a viewport, and use the data and the camera feed as input, combine them, and export a new custom output that has the camera video frame and incorporates the data in textual form.

In either case, the data from each of your other sensors would have to be input in your application using the means that are particular to each, I guess. So you would have to fashion a way for each of the data sources to provide their data in a common pool of variables, which your application will then use to construct and then provide the output you want.

Hope these thoughts help somewhat,

Ogoyant
Last edited on
What I am hoping to do is to overlay the information onto of the live video feed onto the display. Would you have any idea on where to go on how to find out how to do this?
Well, one idea would be to look into DirectShow and Media Foundation -- see:

http://code.msdn.microsoft.com/windowsapps/Media-Capture-Sample-adf87622#content

This is a code sample about capturing video from a capture device (like a webcam, etc) using MediaCapture. However I do not know how easy it would be to overlay information on that captured video using that API, because I'm not familiar with it. Certainly, in terms of DirectX, I know that if you were able to convert your captured frames into an updatable ID3D11Texture2D, you could perform all sorts of processing on it since you can render directly onto the texture (and not the framebuffer) See:

http://www.rastertek.com/dx11tut22.html

However I'm not sure of the best way to go for outputting the feed. If you used DirectX and got down to the level of converting your frame into a ID3D11Texture2D and overlaying the data by rendering to texture, probably from there on you would simply have to create a window with a DirectX viewport and render the resultant frames in there. There may be quite simpler ways to go about this though, and I'm not familiar with MediaCapture to say if overlaying is a functionality offered in it (and thus not requiring the use of DirectX to do it). If it is, it would probably be a lot simpler than using DirectX.

I was actually recently asked about writing a program that will automatically perform some overlaying on an input video file and will have to output the result in an output video file (not real-time, like your case) so I was intending to look into techniques for video overlaying myself, but didn't find the time to do it so far. I'd be interested in what you find out about this, sounds like an interesting project.

Some additional links I found while looking around:

http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread/fe1e915b-f57b-49ea-8390-3b5c2d5953f7/

http://www.codeproject.com/Articles/2303/WIA-Scripting-and-NET

http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesnative/thread/53f5847b-7540-4222-aa56-5f20c6ef46cf/

Last edited on
Topic archived. No new replies allowed.