Basler Vision Connector Messaging: Image Format#
This message format is prepared to support the streaming of multiple cameras.
Message Envelope for ZMQ Messages on the Pub/Sub Channel#
Frame | Field | Description | Type |
---|---|---|---|
1 | topic | Device identification | Binary string (UTF-8) to identify the device in the following syntax: {DeviceID}/stream |
2 | metadata | Metadata | Binary metadata JSON (UTF-8) |
3 | image | Image 1 | Binary |
4 … n | image | Image n - For multi-stream camera | Binary |
Metadata JSON#
Field | Optional | Type | Default | Description |
---|---|---|---|---|
version | No | String | 1 | Metadata format version |
count | No | Integer (32-bit unsigned) | 1 | Number of images on message |
timestamp | No | String | - | Date and time string UTF-8 ISO8601. Application host datetime |
detail | No | Image Detail Object Array | - | Images details |
Image Detail Object#
Field | Optional | Type | Default | Description |
---|---|---|---|---|
id | No | String | - | Unique image identifier. Suggested mnemonic format: {camid}_{camstream}_{datetime} |
seq | No | Integer (64-bit unsigned) | - | Sequential number for the camera image. Starting at 1, incremented by 1 on each frame grabbed |
height | No / Yes (encoded formats) | Integer (32-bit unsigned) | - | Image height |
width | No / Yes (encoded formats) | Integer (32-bit unsigned) | - | Image width |
formatns | Yes | String | Genicam | Image format namespace. For GenICam pixel format use Genicam and Compressed for compressed formats.a |
format | No | String | - | Image format ab |
linepadding | Yes | Integer (32-bit unsigned) | 0 | Number of bytes added to the end of a byte stream to reach a multiple of 4 bytes. E.g. an image with 61 pixels, Mono 8 format, will have a line padding of 3, filling the stream to reach 64 bytes. |
timestamp | Yes | Stringc | - | Timestamp sent by the camerad |
-
The Basler Vision Connector only supports GenICam, no compressed formats.
-
For cameras using a standardized GenICam pixel format, it's recommended to use the GenICam naming convention as described in section 4.35 of GenICam_PFNC_2_4.pdf.
-
A string is used since, in the PTP standard, the tick count is expected to be an 80-bit number. However, the current GenICam protocol returns a 64-bit integer.
-
Timestamps provided by the cameras are tick counts. Ticks are defined by the camera and therefore vary from camera to camera. This can be either referencing the Unix epoch, or the number of ticks since the camera is on, or count of ticks informed/in sync with the PTP server.