Synchronize multiple GigE cameras in Real time with Basler precision time protocol (PTP) feature

21 April, 2020.

Basler white paper explains how multi-camera applications can take advantage of the functions inherent to the GigE Vision 2.0 standard to achieve synchronous image capture.

A variety of applications require images from multiple cameras to be captured in synchronicity. These can range from 3D triangulation tasks to sports and movement analyses to monitoring applications for conveyor belts. When photographing a shot on goal in soccer, for example, the images must be captured without delays and at precisely defined times – namely, in real time. Other real time applications include robotics and Automatic Optical Inspection (AOI) tasks for quality assurance systems.

The latest version of the GigE Vision, which is GigE Vision 2.0 allows multi-camera systems to be synchronized in real time.

Precision time protocol

Synchronize multiple GigE cameras in Real time with Basler precision time protocol (PTP) feature
Source: Basler White Paper – Synchronous and in Real Time: Operation of Multiple Cameras in a GigE Network

Functional method of PTP

PTP works with two types of clocks: master and slave. One clock in a terminal device is referred to as an ordinary clock, while a clock in a transfer component such as an Ethernet switch is designated as a boundary clock. One master, ideally controlled by wireless signal or GPS receiver, synchronizes all slave clocks connected to it.

functional-method-ptp
Source: Basler White Paper – Synchronous and in Real Time: Operation of Multiple Cameras in a GigE Network

The synchronization process works in two steps. The first is a correction of the time difference between master and slave, known as the offset correction. The master sends a cyclical synchronization message – SYNC – with its best estimation of the time (as a time stamp) to the connected slave clocks. At the same time, the system is also measuring the time at which the message was sent to the greatest level of precision available. The master then sends the slave clocks a second follow-up message containing information about the actual, exact send time for the corresponding sync message. The slaves then measure the precise interval between receipt of the first message and the follow-up, using the result to define a corrective ‘offset’ from the master. The slave clock then adjusts itself to account for the offset.

The second phase of the synchronization, known as delay measurement, determines the transit time between slave and master. Using a method similar to the first step, a delay request and a delay response message are sent to the slaves. The results are calculated and then used to adjust the clocks.

functional-method-ptp
Source: Basler White Paper – Synchronous and in Real Time: Operation of Multiple Cameras in a GigE Network
functional-method-of-ptp
Synchronized multiple GigE cameras to capture image in Pylon viewer 6 software

Basler Precision Time Protocol (PTP) Feature

– The Precision Time Protocol (PTP, IEEE 1588) is a protocol used to synchronize clocks throughout a computer network.

– Synchronization and management of a PTP system is achieved through the exchange of messages across the communications medium.

basler-imagecapture-sodavision-withptp
Source: Basler White Paper – Synchronous and in Real Time: Operation of Multiple Cameras in a GigE Network
basler-imagecapture-sodavision-withoutptp
Source: Basler White Paper – Synchronous and in Real Time: Operation of Multiple Cameras in a GigE Network