InputVideoQT
Module used for grabbing images from a video source using QuickTime such as iSight or a DV camera with FireWire. The module only works with OS X. If sizes are are set the module requests that the image be scaled to that size. The module operates in asynchronous mode, which means that the image retreived is the previous one. Ikaros continues to run while the next image is transferred from the camera and the module gets it at the next tick. This can appear confusing when Ikaros is single steped from the viewer. The mode parameter is used to determine whether to use preview mode or not. The lag may be lower in preview but the image quiality can become lower. See the QTKit documentation for details. By setting the device_id parameter. The module will receive input from that particular device. If the device_id is not set, the module will connect to the default device. The device id has the form " 0xa27000413a443-video" (note that it starts with a space). The space may be a bug in OX X and it is recommended that the space is not included in the string since Ikaros will add it if it cannot open the device with the supplied name. The device_id for the found default device is printed when Ikaros is starting up. It can also be found in the System Information application by looking up the GUID for the device and adding "-video" to it.
Example XML definition
A simple example
<module class = "InputVideoQT" name = "VideoSource" size_x = "640" size_y = "480" />
Parameters
Name | Description | Type | Default |
---|---|---|---|
class | The class name for the module; must be "InputVideoQT". | string | |
name | The name of this instance of the module. | string | |
size_x | Size of the grabbed frame | int | 160 |
size_y | Size of the grabbed frame | int | 120 |
flip | Should the image be flipped | bool | no |
mode | Capture mode. Preview may reduce lag but may also reduce image quality. | choices: standard preview | standard |
device_id | Use a camera with a particular ID | string | |
list_devices | List the device ids of available devices on start-up | bool | no |
Module Connections
Outputs
Name | Description |
---|---|
INTENSITY | The intensity of the image |
RED | The red channel of the image |
GREEN | The green channel of the image |
BLUE | The blue channel of the image |
Limitations
It should be possible to run the module also in synchronous mode, where the module would wait for each new frame before continuing.
Bugs
The code uses a temporary solution to work around that TIFFRepresentation is not thread safe. This is actually a bug in Cocoa.
Author
Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science
Files
InputVideoQT.h
InputVideoQT.cc
InputVideoQT.ikc