PDA

View Full Version : graphic overlay on live video



burakaydin
December 2, 2005, 16:00:49
Hi,
I try to develop an application which puts a graphic (bmp, jpg..) on live video.
Can I use key color ( i.e. white) to make transparent some areas of overlay image? Or can I put a png ( with transparency info) on live video?

best regards..

Stefan Geissler
December 2, 2005, 16:29:21
Hello,

Please have a look at
http://www.imagingcontrol.com/ic/docs/html/activex/GraphicOverlay.htm

in the subchapter: "GDI Functions in Visual Basic 6".

To make the bitmap transparent, you may use magenta (RGB(255,0,255)) as transparent color. You only need to set the dropout color of the Overlaybitmap to magenta:
http://www.imagingcontrol.com/ic/docs/html/activex/prop_descOverlayBitmap_DropOutColor.htm

You may also have a look on the "Creating an Overlay" sample in the "samples\vb6" directory of your IC Imaging Control installation path.

burakaydin
December 2, 2005, 17:01:04
Hello,
links are very helpfull. thanks..
Do I need a frame grabber to run this application?
with a webcam or firewire camera?

best regards..

Stefan Geissler
December 2, 2005, 17:23:30
Hello,

at least you would need something that creates a video stream, so you can see the graphic overlay. With no live video stream, nothing is visible, because the graphics are directly copied on the incoming frames.

Freddy
March 3, 2006, 12:58:12
I would appreciate any help on overlaying bitmap over live video. I am being able to overlay text and lines, but NOT BITMAP.

Thanks in advance for your help

Stefan Geissler
March 3, 2006, 14:03:46
Freddy,

Did you read the chapter "GDI Functions in Visual Basic 6" at http://www.imagingcontrol.com/ic/docs/html/activex/GraphicOverlay.htm ?
This shows exactly, what you want to do (if you work with Visual Basic 6).

burakaydin
March 3, 2006, 14:10:18
I developed an application using matrox Imaging library (MILLITE) but it requires an expensive frame grabber. I try to simplify the process by attaching my camera by bnc to my pc via a simple frame grabber and develop similar application with IC Imaging Control Activex.
Can you recommend me a simple frame grabber to use with yhis activex?
thanks..

Best regards

Burak AYDIN

Stefan Geissler
March 3, 2006, 15:03:26
Hello Burak,

you may try the DFG/SV1:
http://www.1394imaging.com/en/products/grabbers/dfgsv1/overview/

or the external FireWire grabber DFG/1394-1:
http://www.1394imaging.com/en/products/converters/dfg13941e/overview/

burakaydin
March 9, 2006, 14:31:29
Hi Stefan,
I want to ask a question about saving images.
I put an overlay on my live video display. And I successfully saved grabbed image with overlay. Can I see my live video display with graphic overlay and save it without any overlay ?
tahnks..

Burak AYDIN

Stefan Geissler
March 9, 2006, 15:21:57
Hello Burak,

Yes, you can. The trick is to enable the overlay only in the display path. In your Form_load sub set the position of your Overlaybitmap:



ICImagingControl1.OverlayBitmapPosition = PATHPOSITION_DISPLAY


Then you can enable the Overlaybitmap:


ICImagingControl1.OverlayBitmapAtPath(PATHPOSITION _DISPLAY).Enable = True


After you have called "LiveStart" you can draw on the Overlaybitmap:



Dim OV As OverlayBitmap

ICImagingControl1.LiveStart
Set OV = ICImagingControl1.OverlayBitmapAtPath(PATHPOSITION _DISPLAY)

OV.DrawText RGB(255, 0, 0), 10, 10, "Hello World!"


The "Hello World!" is now drawn on the display path, but not in the sink. If an image is snapped and saved as follows,


ICImagingControl1.MemorySnapImage
ICImagingControl1.MemorySaveImage "Test.bmp"

then there are no graphics in the file "Test.bmp"