View Full Version : Video capturing and image processing at same time

March 7, 2006, 10:38:31
i am using the "ImageAvailable" event to processing every frame. Now I want to capture a video clip at same time. the video clip is about 10seconds (i useing timer to control it).

The problem encountered is that the live image looks like freezing during the video capturing.

Is a way to do the video capturing and image processing at same time with a same channel? If so, how?


Here is my vb.net code:

ICControl = IcImagingControl1

Private Sub IcImagingControl1_ImageAvailable(ByVal sender As Object, ByVal e As TIS.Imaging.ICImagingControl.ImageAvailableEventAr gs) Handles IcImagingControl1.ImageAvailable
CurrentBuffer = IcImagingControl1.ImageBuffers(e.bufferIndex)
Catch ex As Exception
End Try
End Sub

Private Sub tmrEvent_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEvent.Tick
tmrEvent.Enabled = False
tmrEvent.Interval = 10000
ICControl.AviStartCapture(CurDir() & "\temp.avi", cboVideoCodec.SelectedItem)
tmrEvent.Enabled = True
End Sub

Stefan Geissler
March 7, 2006, 15:30:01

Image processing and video capture can not be done the way you want to do this. The only way to combine both is using a frame filter for image processing.
Please refer to:

and for the frame filter wizard:

March 8, 2006, 08:20:05
Hi Stefan,

Thank you for your prompt reply. Do you have any vb.net sample code of doing this way?



Stefan Geissler
March 8, 2006, 08:29:28
Hello Zihui,

I am sorry, but there is no sample. I suggest to use the "Capturing an AVI File" and simply add a frame filter directly after the device. You may use one of the standard filter modules for testing, e.g. the ROI filter. Then you can write your own filter module or filter class and insert it instead of the ROI filter.
If you have problem with this, please let me know, so i could do this for you.

March 9, 2006, 15:31:43
hi stefan,

thank you so much for your kind reply.

i can capture the video clip using the sample code "capturing an avi file". but i don't know how to add the filter module in?

Could you write a peice of vb.net sample code for my reference.

Best Regards


Stefan Geissler
March 9, 2006, 16:24:05
Hello Zihui,

Please take the "Capturing an AVI File" sample. Please enhance the Form_Load sub as follows:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IcImagingControl1.DeviceValid Then

If Not IcImagingControl1.DeviceValid Then
MessageBox.Show("No device was selected.", "Capturing an AVI File")
Exit Sub
End If
Dim Filter As TIS.Imaging.FrameFilter
Filter = IcImagingControl1.FrameFilterCreate("ROI", "")
Filter.SetIntParameter("Width", 100)
Filter.SetIntParameter("Height", 100)
End If
End Sub

This sample loads the ROI filter module. The width and height is set to 100 pixel. Now you can capture an AVI file. The picture size of the AVI file has 100 * 100 pixels. If you want to acces the filter later, then you should move the line

Dim Filter As TIS.Imaging.FrameFilter

on top of the form, so it is global. If you have tested this, you can use the FrameFilter wizard (available for C++ and C#) to create your own frame filter. In this frame filter your image processing is done. If you need help for the frame filter itself and you do not want to do this in public, please send a request to support@imagingcontrol.com

March 10, 2006, 04:01:41
Hi Stefan,

Thank you very much. I have tried your sample code. There is an error to add "Dim Filter As TIS.Imaging.FrameFilterut". In my TIS.Imaging component, no "FrameDilterut" class at all. What should i do? Any components i missed out? I am using IC Imaging Control 2.1.

When i add "ICFilterContainer.dll" in vb.net. an error bos is shown.

The error is:

"A reference to "C:\Program files\The Imaging Source Europe GmbH\IC Imaging Control 2.1\Bin\ICFilterContainer.dll" could not be added. This is not a valid assembly or COM component. .........

Again, Thanks for your reply.


Stefan Geissler
March 10, 2006, 08:59:05
Hello Zihui

The FramFilter class is available in IC Imaging Control 3.0. With 2.1 you can not do what you want. You may write a request to support@imagingcontrol.com, so i can send you a free update.