Namespace: Stemmer.Cvb.Async
Assembly: Stemmer.Cvb (in Stemmer.Cvb.dll) Version: 14.0.0.0
public static Task<StreamImage> GetTimedSnapshotAsync( this IAcquisition acq, UsTimeSpan timeSpan )
Parameters
- acq
- Type: Stemmer.Cvb.DriverIAcquisition
Stream to work on. - timeSpan
- Type: Stemmer.Cvb.UtilitiesUsTimeSpan
Time span to wait for (millisecond granularity).
Return Value
Type: TaskStreamImageTask to contain the grabbed image.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IAcquisition. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Waits for the given timeSpan for the image to be taken.
Attention: it is generally not possible to call this method while the acquisition has been started by Start.
Dispose the returned Image when not needed anymore!
By default the returned image content is only guaranteed to stay unchanged until the next call to this method; afterwards the returned image is normally disposed. Thus it is normally not save to use this image in a display.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling GetTimedSnapshot(UsTimeSpan) directly.