View Full Version : Text Overlay

June 13, 2002, 12:39:44
Is there a way to add text or static image in your imagecontrol ?

This message was originally posted by JC Pourchet in the old IC Imaging Control Support Forum.

June 20, 2002, 15:41:06
To create a text overlay or some graphics overlay in the ICImagingControl live video,you should use the "ImageAvailable" event and a VisualBasic PictureBox
At first, you have to prepare ICImagingControl. Do the following settings:

ICImagingControl1.MemoryCurrentGrabberColorformat = ICRGB24
ICImagingControl1.ImageRingBufferSize = 5
ICImagingControl1.Visible = False
ICImagingControl1.LiveCaptureLastImage = False

Add the following line, to advise ICImagingControl to capture
every frame automatically:

ICImagingControl1.LiveCaptureContinuous = True

Resize the PictureBox "PictureBox" to the image size:

Picture1.ScaleMode = 3 ' Pixel
Picture1.Width = ICImagingControl1.ImageWidth
Picture1.Height = ICImagingControl1.ImageHeight

To start the video stream, use the following code:

ICImagingControl1.LiveDisplay = False

This prevents ICImagingControl from displaying a live video.

The following sub is called for every frame.
It prints the current time in the upper left corner and paints a
circle in the middle of the image.

Private Sub ICImagingControl1_ImageAvailable(ByVal BufferIndex As Long)

Picture1 = ICImagingControl1.Picture

Picture1.DrawMode = vbInvert
Picture1.Circle (Picture1.Width / 2, Picture1.Height / 2), 20, RGB(255, 255, 255)

Picture1.CurrentY = 0
Picture1.CurrentX = 0
Picture1.Print Time

End Sub

The "Print" statement does not support the vbInvert draw mode. If you
use a text forecolor that is the same as the color in the
image, you can not read the text.

Best regards
IC Support

This message was originally posted by IC Support in the old IC Imaging Control Support Forum.

July 18, 2002, 03:50:15
Hi Tech Support,
Then how about add a static text on a live capture and save it in an avi format, like recorded video with a running clock?

This message was originally posted by Lau Sze Ming in the old IC Imaging Control Support Forum.