Running the Orbbec Gemini 335L on Raspberry Pi 5 — From Setup to Validation of an Industrial Stereo Camera

A stereo camera is a device equipped with multiple cameras and functions, using left-right parallax in a way similar to human vision. Its primary purpose is to acquire distance information in real time.
The stereo camera used in this test was the Orbbec Gemini 335L. As shown in the image, it consists of multiple components, including infrared cameras and a laser projector.
We found that this type of setup can be implemented easily using only a stereo camera and a Raspberry Pi.

1. What can a stereo camera do?

The principle behind a stereo camera is simple.
Just as humans use both eyes to perceive distance, a stereo camera calculates how far an object is by comparing the difference, or parallax, between images captured by two cameras.
Because the camera itself includes a chip for data processing, the processing load on the connected host device is relatively low. This makes it suitable even for devices with limited computing power, such as a Raspberry Pi.
Another advantage is that it can be connected with a single USB cable, making it easy to introduce and test.

1) Distance measurement and obstacle detection

In industrial applications, stereo cameras can be used on autonomous mobile robots (AMRs) operating in factories or around robot arms on production lines. Through the stereo camera, the system can grasp information such as “what is in front” and “how many centimeters away it is” in real time. This information can be used for control operations such as detecting obstacles, stopping the equipment, or taking an alternative route. Stereo cameras can also maintain accurate operation in environments where lighting conditions often change.

2) Dimension measurement

By using a stereo camera, the length, width, and height of packages moving on a conveyor belt can be measured automatically and without contact.
This eliminates the need for manual size measurement in warehouses and logistics centers, helping improve work efficiency and reduce measurement errors. The acquired data can also be applied to further automation and analysis.

3) Human detection and flow analysis

Depth information enables quantitative detection that is difficult to achieve with color images alone.
For example, it can be used to understand crowd levels and people-flow patterns by capturing human movement.
Because depth is represented by color rather than identifiable personal images, it is easier to operate the system in a way that takes privacy into consideration.
It can be used not only in factories but also in commercial facilities.

4) Quality inspection

In manufacturing sites, inspection of parts or products can sometimes depend on the skill level of the operator. By using a stereo camera, inspections can be performed using 3D data, helping keep abnormality detection consistent.
When combined with regular camera images, color abnormalities can also be detected at the same time, which may improve inspection accuracy. As a result, faster inspection can also be expected.

5) Quick verification with Raspberry Pi 5

Before moving to full-scale operation, verification can be performed quickly using an affordable device such as Raspberry Pi 5. The camera can be checked simply by installing the dedicated SDK and Viewer software. It also connects with a single USB cable.
For small-scale sites, an industrial Raspberry Pi alone may be sufficient for practical operation.

Other

The Orbbec Gemini series supports ROS 2, so it can also be used directly for robotics development.

2. Test environment and Viewer

We tested the camera in the following environment.

Test environment

  • Raspberry Pi 5
  • Raspberry Pi OS 64-bit (Bookworm)
  • Orbbec Gemini 335L (stereo camera)
  • Firmware 1.4.60
  • SDK v2.2.8
  • OrbbecViewer

OrbbecViewer

OrbbecViewer, which was downloaded separately from the SDK, allowed us to quickly try five main functions from the left pane and the top menu buttons.

  • Color
  • Depth
  • IR Left/Right
  • IMU
  • PointCloud

Color

Color refers to the regular camera image. It is not often used on its own; instead, it is used together with Depth to visually confirm which object is located how many meters away.
It is also useful for checking image quality settings such as exposure, white balance, and resolution. This is the basic camera image.

Depth

Depth displays distance information in pseudo color. In the sample program, distant areas are shown in red, while nearer areas are shown in blue. Areas where measurement was not possible were displayed in black.

IR Left/Right

IR Left/Right shows the images from the left and right infrared cameras used for stereo calculation. These images serve as the source data for Depth.

IMU

IMU stands for Inertial Measurement Unit.
It provides values from the accelerometer and gyroscope, which detect camera tilt and vibration. These values are useful when the camera is mounted on moving objects such as robots or drones.

PointCloud

PointCloud is a 3D representation of Depth as a collection of points in XYZ coordinates. It can be used to understand the shape of a space.

3. SDK and Viewer setup

Before installing the required components, check that the stereo camera is connected.
Once the USB cable is connected, you can confirm that the Gemini 335L is recognized using the lsusb command.
The output clearly shows the Gemini 335L.

lsusb
Bus 002 Device 002: ID 2bc5:0804 Orbbec 3D Technology International, Inc Orbbec Gemini 335L

You should also use the lsusb -t command to confirm that the camera is connected via USB 3.0 (5000M).
Since Bus 002 was the Orbbec Gemini 335L, we can see that Bus 02 is operating at 5000M.

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 1, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 2, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 3, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 4, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 5, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 1: Dev 2, If 6, Class=Human Interface Device, Driver=usbhid, 5000M

After downloading the SDK and Viewer, run the setup script included with the SDK and configure the udev rules. Both are shell scripts.
Once installation and build are complete, you can check operation using the Viewer or the sample programs.

Downloading and setting up SDK v2.2.8

According to our research, the recommended SDK for firmware 1.4.60 is v2.2.8. SDK v1.x supports up to firmware v1.3.25, for which the recommended SDK is v1.10.12.

Since the camera used in this test had firmware 1.4.60, we used the recommended SDK v2.2.8.
At the time of writing, the latest versions were firmware 1.6.0.0 and SDK v2.7.6.

We created a project folder named ~/stereo-cam for this work.
Download and extract OrbbecSDK and Viewer.

# SDK package (libraries, samples, headers)
OrbbecSDK_v2.2.8_202502141816_e0ad10e5_linux_aarch64.zip

# Viewer (standalone GUI)
OrbbecViewer_v2.2.8_202502141834_3a70bf7_linux_aarch64.zip

Extract both files.

mkdir ~/stereo-cam
cd ~/stereo-cam
wget https://github.com/orbbec/OrbbecSDK_v2/releases/download/v2.2.8/OrbbecSDK_v2.2.8_202502141816_e0ad10e5_linux_aarch64.zip
wget https://github.com/orbbec/OrbbecSDK_v2/releases/download/v2.2.8/OrbbecViewer_v2.2.8_202502141834_3a70bf7_linux_aarch64.zip
unzip OrbbecSDK_v2.2.8_*.zip
unzip OrbbecViewer_v2.2.8_*.zip

Run the setup script included in the v2.2.8 SDK folder.
This script also builds the examples and creates the udev rules.

cd ~/stereo-cam/OrbbecSDK_v2.2.8_202502141816_e0ad10e5_linux_aarch64
sudo chmod +x setup.sh
./setup.sh

Questions will appear during the process, but answering yes to both is fine.

4. Commands for launching sample applications

Caution: Because the camera emits laser light, do not look directly into it.

When running the Viewer or sample files on the actual device, you can launch them using the following commands.
The sample programs are located in the /bin directory inside the SDK folder, while Viewer is located directly under the OrbbecViewer folder.

LIBGL_ALWAYS_SOFTWARE=1 ./OrbbecViewer

LIBGL_ALWAYS_SOFTWARE=1
This option runs OpenGL using CPU software rendering instead of GPU hardware rendering.

In the default Raspberry Pi 5 settings, hardware OpenGL is enabled. However, we specified this option because OrbbecViewer did not support the Wayland session properly in our environment.
./OrbbecViewer alone can launch the application, but the main display area appears black.

Display not working correctly

Similarly, when launching the application from another machine via SSH instead of directly from the Raspberry Pi 5 running Wayland, specify the display as well.
This is because the SSH session cannot directly access the GPU.

DISPLAY=:0 LIBGL_ALWAYS_SOFTWARE=1 ./OrbbecViewer

Note:
In an X11 environment, you may also need to add options such as XAUTHORITY=$HOME/.Xauthority QT_QPA_PLATFORM=xcb.

5. Notes

The following are points to keep in mind when testing.

  • Because the camera emits laser light, be careful not to allow it to shine directly into a person’s eyes.
  • Depth streaming may not work on some hardware other than the Raspberry Pi 5 used in this test.
  • Depending on the firmware version, it is necessary to check the compatible SDK version.
  • We were also able to confirm operation with some v1 SDK versions, such as SDK v1.0.27, depending on the camera firmware version.

We checked whether the display server used by the actual device was Wayland or X11.

echo $XDG_SESSION_TYPE
echo $WAYLAND_DISPLAY

# Result
wayland
wayland-0

Compatibility differs depending on the Raspberry Pi model and its default settings.
At the same time, the available files and scripts also differed depending on the combination of the stereo camera firmware and SDK versions.

For detailed information, please refer to the official documentation: https://www.orbbec.com/docs/orbbec-gemini-330-series-documentation/


Contributed by Raspida

Raspida operates raspida.com, a Raspberry Pi information website designed to be enjoyable even for non-engineers. Based on years of hands-on experience with Raspberry Pi, the site publishes many useful articles and topics for both experienced Raspberry Pi users and those who are interested in getting started. Raspida contributes technical blog articles about industrial Raspberry Pi products to the PiLink website.