Skip to main content
This documentation is still being improved and under construction!
Both electrical and software synchronization are required. See below for detailed instructions.

Electrical Wiring Guide

Overview

This mode is designed for configurations not using an External Clock Signal.You will utilize one camera in leader mode (outputting a synchronization signal) and all remaining cameras in follower mode.

Leader/Follower Firmware Guide

Click here to see our guide on updating your camera between Leader and Follower modes.

Wiring

Example


Synchronized Video Python Library (Linux)

In addition to our upcoming SDK, we currently provide a simple Python process to grab synchronized frames from your camera setups. (Note: This may be phased out in favor of the fully featured SDK in the future.)

Synchronized Video Python Library

Follow our GitHub guide to install and use our custom Linux, python library.

Synchronized Stitched Video

This will go over using GStreamer to synchronize and stitch two video feeds. Then, creating a virtual device to use in other programs.
1

Install Required Packages

Install the necessary dependencies using the following command:
sudo apt install -y libx264-dev libjpeg-dev \
libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-libav libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-ugly gstreamer1.0-gl \
v4l-utils
2

List Current Camera Devices

Run the following command to find your connected cameras:
v4l2-ctl --list-devices
Example output:
stellarHD Leader: stellarHD Lea (usb-0000:00:14.0-8.3):
    /dev/video0
    /dev/video1
    /dev/media0

stellarHD Follower: stellarHD F (usb-0000:00:14.0-8.4):
    /dev/video2
    /dev/video3
    /dev/media1
3

Create a Virtual Device

Identify the device IDs of the two cameras you wish to use, then select a device ID number that is not currently listed.In this example, we will use 9 (as it is unused above) to create a virtual device named stellarHD_stitched. Update the 9 in the command below to match your chosen unused ID:
sudo modprobe v4l2loopback video_nr=9 \
card_label=stellarHD_stitched exclusive_caps=1
4

Launch the GStreamer Pipeline

Launch the pipeline to create the stitched video and output the stream to your new virtual device:
gst-launch-1.0 -v \
compositor name=mix \
    sink_0::xpos=0    sink_0::ypos=0   sink_0::alpha=1 \
    sink_1::xpos=1600 sink_1::ypos=0   sink_1::alpha=1 \
! jpegenc ! jpegdec ! videoconvert ! v4l2sink device=/dev/video9 \
v4l2src device=/dev/video0 ! image/jpeg,width=1600,framerate=60/1 ! jpegdec ! videorate ! mix.sink_0 \
v4l2src device=/dev/video2 ! image/jpeg,width=1600,framerate=60/1 ! jpegdec ! videorate ! mix.sink_1
You must keep this command running while using the synchronized, stitched videos. You can modify this command to add more cameras, change resolutions/framerates, or alter the layout.
5

Use the Virtual Device in OpenCV

OpenCV Starter Code

Follow our sample code to use /dev/video9 in OpenCV.
6

Remove the Loopback Device

To safely remove the loopback device, you can either restart your computer or run the following sequence of commands:1. Identify programs currently using the loopback device:
sudo lsof /dev/video*
2. Kill the processes using their PID (Process ID) numbers:
sudo kill <INSERT_PID_NUMBER>
3. Remove the loopback device:
sudo modprobe -r v4l2loopback