Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Video sources and sinks

Video Sources

The videosource concept is BIAS follows the idea of a generic handling of different sources of images. Every type of camera which is usable in BIAS is represented by a VideoSource... class which all share a common interface defined in BIAS::VideoSource_Base.

In principle capturing images follows this procedure:

/// assume to have a class for DCAM cams
foo = new VideoSource_DCAM;
// select a colormode with SetColorMode() if required
// the default colormode depends on the used Camera(kind of VideoSource)
// optionally set a image size for grabbing foo->SetSize(width,height)
foo->SetSize(768,576);
/// take the first appropriate device
foo->OpenDevice();
//initialize image bar with parameters of videosource
foo->InitImage(bar);
// do last preparations
foo->PreGrab();
// get one frame
foo->GrabSingle(bar);
// stop enetually running things (isochronous transfers for example)
foo->PostGrab();
// clean up
foo->CloseDevice();

Derived from VideoSource_Base many specializations for VideoSources exist. The most important are:

The VideoSource class are collected in VideoSource classes. In the subdirectory Tools/BIASShowCamWx the application biasShowCamWx can be used to capture all kinds of cameras and save the images to disk.

Video sinks

The video sink concept is used to write images in form of a compressed video to disk. To store a video generate an instance of the BIAS::VideoSink class and add images to it. You can optionally set parameters, otherwise defaults are used. Internally the FFMPEG library is used to compress images. An example is provided to show the usage in ExampleVideoSink.cpp.

The VideoSink class are collected in VideoSink classes.

Author: Ingo Schiller