Polybench® Reference
Allows to control a video device, such as a camera

Video Stream Input

Overview

This operator functions as a video source operator. It allows to control a camera or other video device.
This operator provides a number of camera controls, if the camera supports them.

Since the Polybench video library works directly on the graphics adapter of your computer, there are some limitation compared to measurement configurations you can generaly make in Polybench. Please read the section below carefully.

Operator ports

Output video: Video frames

Properties

Find more information about changing properties here: link

StreamName
type: See description
The name of the video input device.

DeviceInfo
type: Undefined [this value cannot be changed]
Information of the connected video device.


UseExternalSettings
type: True or False
Set to true if the camera or video device determines the resolution itself. Polybench will then not attempt to change the resolution. After changing this setting you need to reload the application for this to work!
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


Width x Height
type: Undefined
Select one of the possible camera image resolutions. You have to restart this operator for the settings to have effect.

Note that this list may contain double entries, because they may be listed for multiple frame rates. The frame rate however is set separately. The resolutions are listed by the camera driver.

FrameRate
type: Real value
Requested frame rate for the camera. The camera may refuse or change this value. You have to restart this operator for the settings to have effect.

Which frame rate is accepted by the camera, depends on the image resolution chosen. Very large images may lead to lower frame rates. Standard values for frame rates of camcorders are 25 fps or 30 fps. But also 10 fps or 5 fps are commonly accepted values.

SyncID
type: See description
If this device should start and stop synchronously with other objects, then they should all have an equal SyncID. This is a word or number you can think out yourself.

For more information about the behavior of the START, STOP and RESET actions in relation to the SyncID setting, please read more here: link.

Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

VideoInputList
type: Parameter list (see link)
A list of video devices that can be selected.

You may use a Drop-Down list (link) to display the contents of this variable. This allows your user to select one video input device to run if there were more similar devices.

StreamName
type: See description
Use this variable to store and restore (using the Application Settings operator) the stream name of this video device. If you set a new stream name, then this must be one that is available in the VideoInputList parameter list (or the StreamName drop down list of the properties).


CameraControls
type: Parameter list (see link)
List of properties of the camera that can be controled by Polybench.

Functions

Find more information about Functions here: link

ShowProperties
Opens the camera's own property pages, which is a separate dialog

Details

Polybench tries to keep video capture from cameras or other video devices as efficient as possible. This means that for a large part all video functions are executed on the graphics hardware of your computer. This saves processing time on the main processor of your computer, so that it is generally well possible to capture multiple video sources as well as signal sources from front-ends.

However, this video processing also has limitations. During real-time video capture you cannot really do any video image analysis, because that would cost too much processing power. As a result, you should only connect Video Viewers (link) and maybe a Video Storage (link) to the output of this operator. Any other operators in between will either not function at all, or will not function as expected.
The image below shows some configurations that do work and that do not work: Note that you always need a Video Viewer - without a viewer no video source can be run!



If you use a Video Replay (link) as source, many more things are possible, because the replay is performed off-line. Please refer to the Video Replay for allowed configurations.

Changing video device properties

Note that if you change the camera stream, or any property of the camera, that you have to re-start the video input operator for the settings to take effect.