ICImagingControl.OverlayUpdate Event |
||||||||||||||||||||||||||
This event is called after a new frame has been delivered by the video capture device. | ||||||||||||||||||||||||||
Syntax: |
[C#] |
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Remarks: |
The OverlayUpdate event is called after a new frame is available. In the OverlayUpdate event sub, text or graphical elements can be drawn in the new frame. Therefore, it is possible to insert individual information on each individual frame. The sample time is the time that has been passed, since ICImagingControl.LiveStart has been called. The time resolution is seconds. The duration between SampleStartTime and SampleEndTime is equal to the current frame rate. This event is called before the ICImagingControl.ImageAvailable event occurs. Exceptions that occur in the OverlayUpdate event will get lost in the system. Therefore, bugs in the code that cause an exception cannot be recognized. To avoid this, use an On Error Goto ... construct. The On Error Goto ... statement should be put at the beginning of the event handler. If you need to display error messages, do not use a message box. Use a "debug trace" instead (e.g. Debug.Print ... ). This is very important, because otherwise the system may run into a deadlock which will cause the application to hang. Exceptions that occur in the OverlayUpdate event will get lost in the system. Therefore, bugs in the code that cause an exception cannot be recognized. To avoid this, all code in the event handler should be enclosed by a try ... catch block. If you need to display error messages, do not use a message box. Use a "debug trace" instead (e.g. System.Diagnostics.Trace.WriteLine(...) ). This is very important, because otherwise the system may run into a deadlock which will cause the application to hang. |
|||||||||||||||||||||||||
Sample: |
This example demonstrates how to write a frame counter on the live video. FrameCount is a global declared variable in the form. [C#] |
|||||||||||||||||||||||||
See also: | ICImagingControl, OverlayBitmap, ICImagingControl.LiveStart, ICImagingControl.ReferenceTimeStart, ICImagingControl.ReferenceTimeCurrent |
⋯
⋯ ⋯
Established in 1988, The Imaging Source is one of the leading manufacturers of industrial cameras, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.
Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE, MIPI interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.