Displaying live video from framegrabber?

Hello Rooters,

Using Root 5.28 on a Win7 platform, I want to display live video from a special framegrabber card.
I’ve always gotten good info here, so I’m asking for any pointers on what to use for this.

I have drivers and a sample windows C++ program that uses CreateCompatibleDC() and CreateDIBSection() and BitBlt’ing of the data from the framegrabber to display the live video. The signal is b/w EIA NTSC.

Is this a TImage thing? or TASImage, or libAfterImage?
I see that Win32Splash.cxx does a simlar thing, so that might give me enough info.

thanks,
buddy

It is not very clear what you want to achieve as soon as ROOT is concern. Do you want to show the live video as the TCanvas background with the histograms on top of the video?

I hope this is clearer. I don’t want to display the video as the canvas background, but as the contents of a frame.

I have an existing compiled C++ Root Gui program, using Root 5.28b on Win7, using the various TG… widgets, and it collects data and periodically (via TTimer) updates some histograms and graphs.

I wish to add a new TGFrame (or other widget, window) to this gui to display images from a framegrabber. Periodically I will get a new array of image data in b/w Y8 format that I would convert if needed, and then display this new frame of image into the TGFrame.

I have working vendor-supplied C++ code that does this as a win32 application, by using CreateCompatibleDC(), CreateDIBSection() and a bitblt(). I think if I can get the HWND for a TGFrame I could use their code.

Can I get the windows HWND handle for TGFrame-derived objects? Or is there a strictly Root way to update a frame with this image data?

buddy

Hi buddy,

There is no simple way of direct rendering inside a Root widget. I would suggest instead to use a TImage and draw it inside a canvas (e.g. a TRootEmbeddedCanvas). You should try to play a bit with the several SetImage() methods from TImage to see if you can import the frames…

Cheers, Bertrand.

[quote=“mrsoft99”]… I don’t want to display the video as the canvas background, but as the contents of a frame. …[/quote]I think it simpler to achieve what you want with Qt layer. Just combine your GUI from doc.trolltech.com/4.7/phonon-module.html
There are the other options as well. The nice thing about this approach is that your application will be useful for Win32 as well for Linux/MacOS env as well. Check root.bnl.gov/QtRoot/How2Install4Unix.html for the installation details

[quote=“mrsoft99”]… Can I get the windows HWND handle for TGFrame-derived objects? Or is there a strictly Root way to update a frame with this image data? … …[/quote]and … yes, you can get HWND for Qt QWidget object if you know what you are doing ( See doc.trolltech.com/4.7/qwidget.html#winId )