Skip to content

Commit b886849

Browse files
committed
Revisions
1 parent eeecb23 commit b886849

File tree

1 file changed

+81
-57
lines changed

1 file changed

+81
-57
lines changed

articles/kinect-dk/multi-camera-sync.md

Lines changed: 81 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,44 @@ Before you start, make sure to review [Azure Kinect DK Hardware specification](h
3636

3737
You can use two different approaches for your camera configuration:
3838

39-
- **Daisy chain configuration**. Synchronize one master device and up to eight subordinate devices.
40-
![Diagram that shows how to connect Azure Kinect DK devices in a daisy chain configuration.](./media/multicam-sync-daisychain.png)
39+
- **Daisy-chain configuration**. Synchronize one master device and up to eight subordinate devices.
40+
![Diagram that shows how to connect Azure Kinect DK devices in a daisy-chain configuration.](./media/multicam-sync-daisychain.png)
4141
- **Star configuration**. Synchronize one master device with up to two subordinate devices.
4242
![Diagram that shows how to set up multiple Azure DK devices in a star configuration.](./media/multicam-sync-star.png)
4343

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+
![Cable configurations for an external trigger signal](./media/resources/camera-trigger-signal.jpg)
59+
4460
### Plan your camera settings and software configuration
4561

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
4767
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.
4868

4969
In the image capture loop, avoid repeatedly setting the same exposure setting. When needed, just call the API once.
5070

51-
#### Timestamps
71+
#### Timestamp considerations
5272
Cameras that are acting in master or subordinate roles report image timestamps in terms of *Start of Frame* instead of *Center of Frame*.
5373

54-
#### Interference between multiple IR cameras
74+
#### Avoiding interference between multiple depth cameras
5575

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.
5777

5878
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.
5979

@@ -65,22 +85,6 @@ When you use an offset of 160μs, you can configure up to nine additional dept
6585

6686
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.
6787

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-
![Cable configurations for an external trigger signal](./media/resources/camera-trigger-signal.jpg)
83-
8488
## Prepare your devices and other hardware
8589

8690
### Azure Kinect DK devices
@@ -93,12 +97,13 @@ For each of the Azure Kinect DK devices that you want to synchronize, do the fol
9397

9498
### Host computers
9599

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]().
98103

99-
#### Linux computers: USB Memory on Ubuntu
104+
#### Linux computers: USB memory on Ubuntu
100105

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:
102107

103108
1. Edit /**etc/default/grub**.
104109
1. Replace the following line:
@@ -109,70 +114,89 @@ If you are setting up multi-camera synchronization on Linux, by default the USB
109114
```cmd
110115
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=32"
111116
```
112-
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.
113118
1. Run **sudo update-grub**.
114119
1. Restart the computer.
115120

116121
### Cables
117122

118123
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.
119124

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.
121126

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.
123128

124129
## Set up multiple Azure Kinect DK devices
125130

126131
### Connect your devices
127132

128-
#### Daisy chain configuration
133+
**To connect Azure Kinect DK devices in a daisy chain configuration**
129134

130135
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.
132137
1. Select one device to be the master device, and plug a 3.5-mm audio cable into its **Sync out** port.
133138
1. Plug the other end of the cable into the **Sync in** port of the first subordinate device.
134139
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.
135140
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.
136141

137-
#### Star configuration
142+
**To connect Azure Kinect DK devices in a star configuration**
138143

139144
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.
141146
1. Select one device to be the master device, and plug the single end of the headphone splitter into its **Sync out** port.
142147
1. Connect 3.5-mm audio cables to the "split" ends of the headphone splitter.
143148
1. Plug the other end of each cable into the **Sync in** port of one of the subordinate devices.
144149

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-
![Open device](./media/open-devices.png)
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-
![Subordinate camera start](./media/sub-device-start.png)
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
161151

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.
164153

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.
166155

167-
### Configure the software control settings
156+
## Verify that the devices are connected and communicating
168157

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).
170159

171-
### Calibrate the devices as a synchronized set
160+
> [!IMPORTANT]
161+
> For this procedure, you need the serial number of each Azure Kinect DK.
172162
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**
174164

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+
![Open device](./media/open-devices.png)
171+
1. Under **External Sync**, select **Sub**.
172+
![Subordinate camera start](./media/sub-device-start.png)
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+
![Open device](./media/open-devices.png)
190+
1. Under **External Sync**, select **Sub**.
191+
![Subordinate camera start](./media/sub-device-start.png)
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.
176200

177201
## Next steps
178202

0 commit comments

Comments
 (0)