Welcome Guest, you are in: Login

EventIDE Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

Page History: EE Webcam Element

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2014/11/07 08:32


Element Icon Webcam Element
Info
Category: Monitoring AddIn: Video Surveillance
Creator: OkazoLab Team Scope: Global
Owns Snippets: no Usage: Status Screen
The element allows monitoring the output of a video capture device, e.g. webcam, on the status screen in EventIDE.


Description

Webcam element is capable of capturing output of computer video devices, e.g. web-cameras, at the background of running experiment. The captured video can be then rendered on the stimulus or status screen, using a XAML control. On the majority of modern computers a work of the element should not cause an impact on timing accuracy in an experiment, however, you should check timing accuracy on your setup, when the Webcam element is used.

Snapshots

Web camera capture  on the EventIDE status screen

Web camera capture
on the EventIDE status screen


Practical Use

Technique 1

  1. Add new Webcam element to any event in your experiment
  2. Click on the Webcam element and select a video device from the device list in the property grid
  3. Add a proxy variable to the Video Output property of the Webcam element
  4. Create a XAML ContentControl on the status screen and set its binding to the VideoOutput proxy variable:

 // you can place the content control inside of any parent container
<ContentControl Width="640" Height="480" Content='{Binding VideoOutput}'/>
  1. Make sure that camera working and run an experiment. The video output will be rendered scaled to the area of the Content Control on the Status Screen

Element actions aligned with different epochs of the parent event

EpocheActions
InitializedThe camera starts capturing video
Rendered
Activating
Activated
RunningThe camera output is captured and rendered via the Video Output property, if the latter is bound to the status screen
Deactivated
DeinitializedThe camera stops capturing video

Notes

  • You can not share the video device among multiple Webcam elements. However, you may use multiple cameras assigned to different Webcam elements.
  • Be careful in using the Webcam element in experiments that require accurate timing. Video capture is hardware-accelerated on modern computers but a high processor load still can be induced, which, in turn, may potentially disrupt timing in an experiment. We suggest to always double check timing accuracy while the Webcam element is engaged. Alternatively, you may select the lowest settings for the resolution and framerate capture on a video device.
  • If you have the Webcam element, whose Video Output is not bound to the status Screen, there is no performance costs for rendering. However, video capturing is running in the background, when the Webcam element exists in an experiment.

Properties

Generic Properties

NameDescriptionConstraintsValue TypeUpon Runtime Change
Settings
Video DeviceDefines a video device for video capture. A drop-down list shows all devices available in the system.String
Device SettingsOpens a window with OS settings of the selected video device.
Custom Settings
Use Custom SettingsDefine whether custom frame size and framerate of video capture. Using the custom settings is only possible, if the resolution and framerate values are supported by the selected video device. Otherwise, the device's default settings will be are applied.Boolean
ResolutionDefine the resolution of a captured video. The video frames can be scaled to any size in rendering, but choosing a larger resolution improves rendering quality with some cost in performance.clSize
Frame RateDefine the framerate of video capturing, in frames per secondInt32
Runtime Status
Video OutputReturns a live XAML control that renders the captured video output. The control can be used for data binding to the Content property of the XAML ContentControl element, e.g. . The ContentControl can be added to the status screen or to the GUI Layout elemenet.System.Windows.UIElement
Actual SettingsReturns the actual resolution and framerate of the current video capture. The property is updated at the start of every experiment run.String

+=== Properties inherited from clElement === Inherited properties of clElement
NameDescriptionConstraintsValue TypeUpon Change
Control
Is EnabledIf set to false the element is completely omitted when the experiment is run.Boolean
TitleTitle of the element.String

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.