You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/kinect-dk/multi-camera-sync.md
+81-57Lines changed: 81 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,24 +36,44 @@ Before you start, make sure to review [Azure Kinect DK Hardware specification](h
36
36
37
37
You can use two different approaches for your camera configuration:
38
38
39
-
-**Daisychain configuration**. Synchronize one master device and up to eight subordinate devices.
40
-

39
+
-**Daisy-chain configuration**. Synchronize one master device and up to eight subordinate devices.
40
+

41
41
-**Star configuration**. Synchronize one master device with up to two subordinate devices.
42
42

43
43
44
+
#### Using an external sync trigger
45
+
46
+
In both of the configurations described previously, the master device provides the triggering signal for the subordinate devices. However, you can use a custom external source for the synchronization trigger. For example, you can use this option to synchronize image captures with other equipment. In either the daisy-chain configuration or the star configuration, the external trigger source connects to the master device.
47
+
48
+
Your external trigger source must function in the same manner as the master device: it must deliver a sync signal that has the following characteristics:
49
+
50
+
- Active high
51
+
- Pulse width: greater than 8μs
52
+
- 5V TTL/CMOS
53
+
- Maximum driving capacity: no less than 8 milliamps (mA)
54
+
- Frequency support: precisely 30 FPS, 15 FPS, and 5 FPS (the frequency of the color camera master VSYNC signal)
55
+
56
+
The trigger source must deliver the signal to the master device **Sync in** port by using a 3.5-mm audio cable. You can use a stereo or mono cable. The Azure Kinect DK shorts all of the sleeves and rings of the audio cable connector together, and grounds them. As shown in the following diagram, the device receives the sync signal from the connector tip only.
57
+
58
+

59
+
44
60
### Plan your camera settings and software configuration
45
61
46
-
#### Exposure
62
+
For information about how to set up your software to control the cameras and use the image data, see the [Azure Kinect Sensor SDK](about-sensor-sdk.md).
63
+
64
+
When you are working with multiple synchronized devices,
65
+
66
+
#### Exposure considerations
47
67
If you want to control the precise timing of each device, we recommend that you use a manual exposure setting. Under the automatic exposure setting, each color camera can dynamically change the actual exposure. Because the exposure affects the timing, such changes quickly push the cameras out of synch.
48
68
49
69
In the image capture loop, avoid repeatedly setting the same exposure setting. When needed, just call the API once.
50
70
51
-
#### Timestamps
71
+
#### Timestamp considerations
52
72
Cameras that are acting in master or subordinate roles report image timestamps in terms of *Start of Frame* instead of *Center of Frame*.
53
73
54
-
#### Interference between multiple IR cameras
74
+
#### Avoiding interference between multiple depth cameras
55
75
56
-
When multiple IR cameras image overlapping fields of view, each camera must image its own associated laser. To prevent the lasers from interfering with each other, the camera captures should be offset from one another by 160μs or more.
76
+
When multiple depth cameras image overlapping fields of view, each camera must image its own associated laser. To prevent the lasers from interfering with each other, the camera captures should be offset from one another by 160μs or more.
57
77
58
78
For each depth camera capture, the laser turns on nine times and is active for only 125μs each time. The laser is then idle for either 14505μs or 23905μs, depending on the mode of operation. This behavior means that the starting point for the offset calculation is 125μs.
59
79
@@ -65,22 +85,6 @@ When you use an offset of 160μs, you can configure up to nine additional dept
65
85
66
86
In your software, use ```depth_delay_off_color_usec``` or ```subordinate_delay_off_master_usec``` to make sure that each IR laser fires in its own 160μs window or has a different field of view.
67
87
68
-
#### Using an external sync trigger
69
-
70
-
Instead of designating a master Azure Kinect DK device, you can use a custom external source for the synchronization trigger. For example, you can use this option to synchronize image captures with other equipment.
71
-
72
-
Your external trigger source must function in the same manner as the master device: it must deliver a sync signal that has the following characteristics:
73
-
74
-
- Active high
75
-
- Pulse width: greater than 8μs
76
-
- 5V TTL/CMOS
77
-
- Maximum driving capacity: no less than 8 milliamps (mA)
78
-
- Frequency support: precisely 30 FPS, 15 FPS, and 5 FPS (the frequency of the color camera master VSYNC signal)
79
-
80
-
The trigger source must deliver the signal to the master device **Sync in** port by using a 3.5-mm audio cable. You can use a stereo or mono cable. The Azure Kinect DK shorts all of the sleeves and rings of the audio cable connector together, and grounds them. As shown in the following diagram, the device receives the sync signal from the connector tip only.
81
-
82
-

83
-
84
88
## Prepare your devices and other hardware
85
89
86
90
### Azure Kinect DK devices
@@ -93,12 +97,13 @@ For each of the Azure Kinect DK devices that you want to synchronize, do the fol
93
97
94
98
### Host computers
95
99
96
-
- Host PC for each Azure Kinect DK. A dedicated host controller can be used, but it depends on how you're using the device and the amount of data being transferred over USB.
97
-
- Azure Kinect Sensor SDK installed on each host PC. For more info on installing Sensor SDK, go to [Set up Azure Kinect DK]().
100
+
Typically, each Azure Kinect DK uses its own host computer. You can use a dedicated host controller, depending on how you're using the device and the amount of data being transferred over USB.
101
+
102
+
Make sure that the Azure Kinect Sensor SDK is installed on each host computer. For more info on installing Sensor SDK, go to [Set up Azure Kinect DK]().
98
103
99
-
#### Linux computers: USB Memory on Ubuntu
104
+
#### Linux computers: USB memory on Ubuntu
100
105
101
-
If you are setting up multi-camera synchronization on Linux, by default the USB controller is only allocated 16 MB of kernel memory for handling of USB transfers. It is typically enough to support a single Azure Kinect DK, however more memory is needed to support multiple devices. To increase the memory, follow these steps:
106
+
By default, Linux-based host computers allocate the USB controller only 16 MB of kernel memory for handling USB transfers. This amount is typically enough to support a single Azure Kinect DK. However, to support multiple devices, the USB controller has to have more memory. To increase the memory, follow these steps:
102
107
103
108
1. Edit /**etc/default/grub**.
104
109
1. Replace the following line:
@@ -109,70 +114,89 @@ If you are setting up multi-camera synchronization on Linux, by default the USB
In this example, we set the USB memory to 32 MB twice that of the default, however it can be set much larger. Choose a value that is right for your solution.
117
+
These commands set the USB memory to 32 MB. This value is twice the default value. You can set a much larger value. Use a value that is right for your solution.
113
118
1. Run **sudo update-grub**.
114
119
1. Restart the computer.
115
120
116
121
### Cables
117
122
118
123
To connect the cameras to each other and to the host computers, you need 3.5-mm male-to-male cables (also known as 3.5-mm audio cable). The cables should be less than 10 meters long, and may be stereo or mono.
119
124
120
-
The number of cables that you need depends on the number of cameras you are using as well as the specific configuration. The Azure Kinect DK box does not include cables—you must purchase them separately.
125
+
The number of cables that you need depends on the number of cameras that you are using as well as the specific device configuration. The Azure Kinect DK box does not include cables—you must purchase them separately.
121
126
122
-
If you are connecting the cameras in the star configuration, you also need one headphone splitter.
127
+
If you're connecting the cameras in the star configuration, you also need one headphone splitter.
123
128
124
129
## Set up multiple Azure Kinect DK devices
125
130
126
131
### Connect your devices
127
132
128
-
#### Daisy chain configuration
133
+
**To connect Azure Kinect DK devices in a daisy chain configuration**
129
134
130
135
1. Connect each Azure Kinect DK to power.
131
-
1. Connect one device to one host PC.
136
+
1. Connect each device to its host PC.
132
137
1. Select one device to be the master device, and plug a 3.5-mm audio cable into its **Sync out** port.
133
138
1. Plug the other end of the cable into the **Sync in** port of the first subordinate device.
134
139
1. To connect another device, plug another cable into the **Sync out** port of the first subordinate device, and plug the other end of that cable into the **Sync in** port of the next device.
135
140
1. Repeat the previous step until all of the devices are connected. The last device should have one cable plugged into its **Sync in** port, and its **Sync out** port should be empty.
136
141
137
-
#### Star configuration
142
+
**To connect Azure Kinect DK devices in a star configuration**
138
143
139
144
1. Connect each Azure Kinect DK to power.
140
-
1. Connect one device to one host PC.
145
+
1. Connect each device to its host PC.
141
146
1. Select one device to be the master device, and plug the single end of the headphone splitter into its **Sync out** port.
142
147
1. Connect 3.5-mm audio cables to the "split" ends of the headphone splitter.
143
148
1. Plug the other end of each cable into the **Sync in** port of one of the subordinate devices.
144
149
145
-
## Verify that the devices are connected and communicating
146
-
147
-
Use the [Azure Kinect Viewer](azure-kinect-viewer.md) to validate the device setup.
148
-
149
-
1. Get the serial number for each device.
150
-
2. Open two instances of [Azure Kinect Viewer](azure-kinect-viewer.md)
151
-
3. Open subordinate Azure Kinect DK device first. Navigate to Azure Kinect viewer, and in the Open Device section choose subordinate device:
152
-
153
-

154
-
155
-
4. In the section "External Sync", choose option "Sub" and start the device. Images will not be sent to the subordinate after hitting start due to the device waiting for the sync pulse from the master device.
156
-
157
-

158
-
159
-
5. Navigate to another instance of the Azure Kinect viewer and open the master Azure Kinect DK device.
160
-
6. In the section "External Sync", choose option "Master" and start the device.
150
+
### Calibrate the devices as a synchronized set
161
151
162
-
> [!NOTE]
163
-
> The master device must always be started last the get precise image capture alignment between all devices.
152
+
In a single device, the depth and RGB cameras are factory calibrated to work together. However, when multiple devices have to work together, they need to be calibrated in order to determine how to transform an image from the domain of the camera that captured it to the domain of the camera you want to use to process images.
164
153
165
-
When the master Azure Kinect Device is started, the synchronized image from both of the Azure Kinect devices should appear.
154
+
There are multiple options for cross-calibrating devices. Microsoft provides the [GitHub green screen code sample](https://github.com/microsoft/Azure-Kinect-Sensor-SDK/tree/develop/examples/green_screen), which uses the OpenCV method. The Readme file for this code sample provides more details and instructions for calibrating the devices.
166
155
167
-
### Configure the software control settings
156
+
##Verify that the devices are connected and communicating
168
157
169
-
Once you've set up your hardware for synchronized triggering, you'll need to set up the software. For more info on setting this up, go to the [Azure Kinect developer documentation]() (English only).
158
+
To verify that the devices are connected correctly, use [Azure Kinect Viewer](azure-kinect-viewer.md).
170
159
171
-
### Calibrate the devices as a synchronized set
160
+
> [!IMPORTANT]
161
+
> For this procedure, you need the serial number of each Azure Kinect DK.
172
162
173
-
In a single device depth and RGB cameras are factory calibrated. However, when multiple devices are used, new calibration requirements need to be considered to determine how to transform an image from the domain of the camera it was captured in, to the domain of the camera you want to process images in.
163
+
**To verify a daisy-chain configuration**
174
164
175
-
There are multiple options for cross-calibrating devices, but in the [GitHub green screen code sample](https://github.com/microsoft/Azure-Kinect-Sensor-SDK/tree/develop/examples/green_screen) we are using OpenCV method. The Readme file for this code sample provides more details and instructions for calibrating the devices.
165
+
1. For each subordinate device in the chain, follow these steps. Start with the device furthest from the master device, and work back toward the master device.
166
+
> [!IMPORTANT]
167
+
> To get precise image capture alignment between all devices, you have to start the master device last.
168
+
1. Open an instance of [Azure Kinect Viewer](azure-kinect-viewer.md).
169
+
1. Under **Open Device**, select the serial number of the device that you want to open.
170
+

171
+
1. Under **External Sync**, select **Sub**.
172
+

173
+
1. Select **Start**.
174
+
> [!NOTE]
175
+
> Because this is a subordinate device, Azure Kinect Viewer does not display an image after the device starts. No image is displayed until the subordinate device receives a sync signal from the master device.
176
+
1. After you have started all of the subordinate devices, open an instance of Azure Kinect Viewer and then open the master device.
177
+
1. Under **External Sync**, select **Master**.
178
+
1. Select **Start**.
179
+
180
+
When the master Azure Kinect Device starts, the synchronized image from each of the Azure Kinect devices should appear.
181
+
182
+
**To verify a star configuration**
183
+
184
+
1. For each of the subordinate devices, follow these steps.
185
+
> [!IMPORTANT]
186
+
> To get precise image capture alignment between all devices, you have to start the master device last.
187
+
1. Open an instance of [Azure Kinect Viewer](azure-kinect-viewer.md).
188
+
1. Under **Open Device**, select the serial number of the device that you want to open.
189
+

190
+
1. Under **External Sync**, select **Sub**.
191
+

192
+
1. Select **Start**.
193
+
> [!NOTE]
194
+
> Because this is a subordinate device, Azure Kinect Viewer does not display an image after the device starts. No image is displayed until the subordinate device receives a sync signal from the master device.
195
+
1. After you have started both subordinate devices, open an instance of Azure Kinect Viewer and then open the master device.
196
+
1. Under **External Sync**, select **Master**.
197
+
1. Select **Start**.
198
+
199
+
When the master Azure Kinect Device starts, the synchronized image from all of the Azure Kinect DK devices should appear.
0 commit comments