The BaslerCamera transport handler allows receiving videos and images from Basler cameras using the Basler Pylon SDK. The operator can both operate in pull and push mode and can be used with the Command operator.
Options
serialnumber:
The serial number of the camera to use. If no serial number is specified, the first free camera will be used. (optional)
Operation Modes
pull:
Odysseus polls the camera repeatedly to grab images as fast as possible.push:
The camera pushes images into Odysseus. This is required if the camera is set to send images automatically or if a Command operator is used. (see below)
Commands
- trigger
- Triggers the camera to grab an image. Requires push operation mode.
- No parameters required
Schema
The output of the handler provides the following attributes as a schema. Attributes can be in arbitrary order and will be identified by the type.
Name | Type | Description |
---|---|---|
image | IMAGEJCV | The current frame of the video stream |
starttimestamp | STARTTIMESTAMP | The start time stamp of the frame |
Example
This example shows how to grab a video from a basler camera and display it in a window:
PQL
VideoStream Protocol Handler
video = ACCESS({source='Video', wrapper='GenericPull', transport='BaslerCamera', protocol='none', datahandler='Tuple', options=[ ['serialnumber', '21448278'], ], schema= [ ['image', 'IMAGEJCV'], ['timestamp', 'STARTTIMESTAMP'] ]}) /// or shorter, as a source operator: video = BASLERCAMERA({source='Video', options=[['serialnumber', '21448378']]}) output = UDO({class='ShowImageJCV', init='0,Video'}, video)