This document introduces the installation of OrbbecSDK dependencies and the compilation instructions of OrbbecSDK Sample.
The Orbbec SDK is compatible with the standard UVC protocol, and the standard UVC used by Gemini2、Femto 、Femto W、Femto Mega、Astra+、Astra2、Gemini2 L 、Gemini 330 Series device, so no additional drivers are required.
Dabai, Dabai DCW, Dabai DW, Astra mini Pro, Astra Pro Plus, A1 Pro, Gemini E, Gemini E Lite, Gemini These use the private protocol of openni and need to install private drivers. The directory of the openni driver is as follows: double-click the following .exe image directory to install the driver.
Data rendering relies on the third-party library OpenCV. Here we take OpenCV 4.3.0 as an example to demonstrate the installation configuration.
Now due to the Windows system mechanism, for UVC protocol devices, if you need to obtain metadata information such as timestamps, you need to first register in the registry. Using obsensor_metadata_win10.md document guide to complete the registry registration.
Software dependency: VisualStudio2019, cmake 3.10 and above.
Method 1: With cmake, click the “Open Project” button to open the Visual Studio project.
Method 2: In the folder, directly start the Visual Studio project in Examples/build, as shown in the figure below.
Install libudev library:
sudo apt install libudev-dev
Install libusb library:
sudo apt install libusb-dev
By default, direct access to USB devices in Linux systems requires root privileges, which can be resolved through the rules configuration file. After the files released by OrbbecSDK are decompressed, there will be a “99-obsensor-libusb.rules” configuration file and “install_udev_rules.sh” installation script in the Script directory.
Run the “install_udev_rules.sh” script through the sudo command to complete the rules Installation of configuration files.
sudo chmod +x ./install_udev_rules.sh
sudo ./install_udev_rules.sh
By default, the USBFS buffer size is 16 MB. This value is insufficient for high-resolution images or multiple streams and multiple devices usage. User can increase the buffer size to 128 MB.
cat /sys/module/usbcore/parameters/usbfs_memory_mb
sudo sh -c 'echo 128 > /sys/module/usbcore/parameters/usbfs_memory_mb'
To increase the buffer size permanently, add the kernel parameter usbcore.usbfs_memory_mb=128 to the bootloader configuration. How to do this depends on the bootloader on your system.
For GRUB2 (most common):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
(or other contents within the quotation marks depending on your system) with: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=128"
Update grub
sudo update-grub
Other bootloaders: configure additional kernel parameters of other bootloaders, please see the manual of your bootloader.
VID: 2bc5 PID: 0536 (color camera)
VID: 2bc5 PID: 0636 (depth camera)
Create a build directory in the OrbbecSDK directory, as follows:
cd OrbbecSDK
mkdir build
cd build
cmake ..
make
Install Xcode:
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
These steps will set up the fundamental tools needed for C++ development on macOS.
brew install cmake opencv
cd OrbbecSDK
mkdir build
cd build
cmake .. && make -j8
make install
cd install/bin
sudo ./OBHelloOrbbec