01.02.06.环境搭建篇(CentOS9系统下 Orbbec-SDK_V2安装配置)
2026/5/7 22:21:51 网站建设 项目流程

本页目录

  • 1、安装
  • 2、配置
  • 3、测试

https://orbbec.github.io/OrbbecSDK/

  • 官网: https://developer.orbbec.com.cn/module.html?id=4
  • 奥比中光-开发者中心: https://vcp.developer.orbbec.com.cn/resourceCenter/
  • orbbec-sdk: https://www.orbbec.com/developers/orbbec-sdk/

安装

  • 注意事项:https://docs.opencv.org/4.x/d1/d33/tutorial_orbbec_uvc.html

注意:OpenCV 编译时使用cmake命令补充行:-DORBBEC_SDK_VERSION=1 -DOBSENSOR_USE_ORBBEC_SDK=ON

  • 安装依赖
yuminstall-y libopencv* libudev* libusb*
  • OrbbecSDK_V2
# OrbbecSDK_v2cd/usr/local/softwarewgethttps://github.com/orbbec/OrbbecSDK_v2/releases/download/v2.5.5/OrbbecSDK_v2.5.5_202510101039_1a38b95_linux_x86_64.zipunzipOrbbecSDK_v2*.ziprm-rf OrbbecSDK_v2*.zipmvOrbbecSDK_v2* OrbbecSDK_V2chmod0777 -R /usr/local/software/OrbbecSDK_V2chowndkli:dkli -R /usr/local/software/OrbbecSDK_V2cd/usr/local/software/OrbbecSDK_V2 ./build_examples.sh ./setup.sh/usr/local/software/OrbbecSDK_V2/sharedcd/usr/local/software/OrbbecSDK_V2/shared ./install_udev_rules.shmkdir-p /usr/local/software/OrbbecSDK_V2/examples/buildchmod0777 -R /usr/local/software/OrbbecSDK_V2chowndkli:dkli -R /usr/local/software/OrbbecSDK_V2cd/usr/local/software/OrbbecSDK_V2/examples/build cmake..&&make-j$(nproc)&&makeinstall-j$(nproc)chmod0777 -R /usr/local/software/OrbbecSDK_V2chowndkli:dkli -R /usr/local/software/OrbbecSDK_V2
  • OrbbecViewer_V2
cd/usr/local/softwarewgethttps://github.com/orbbec/OrbbecSDK_v2/releases/download/v2.5.5/OrbbecViewer_v2.5.5_202510101040_8d01fa0_linux_x86_64.zipunzipOrbbecViewer_v2*.ziprm-rf OrbbecViewer_v2*.zipmvOrbbecViewer_v2* OrbbecViewer_V2chmod0777 -R /usr/local/software/OrbbecViewer_V2chowndkli:dkli -R /usr/local/software/OrbbecViewer_V2

配置

# OrbbecSDK_V2cat>>/etc/profile<<"EOF" #set OrbbecSDK_V2 environment ORBBECSDK_V2_HOME=/usr/local/software/OrbbecSDK_V2 ORBBECSDK_V2_LIB=/usr/local/software/OrbbecSDK_V2/SDK/lib ORBBECSDK_V2_INCLUDE=/usr/local/software/OrbbecSDK_V2/SDK/include ORBBECSDK_V2_REDIST=/usr/local/software/OrbbecSDK_V2/bin PATH=$ORBBECSDK_V2_HOME:$ORBBECSDK_V2_LIB:$ORBBECSDK_V2_INCLUDE:$ORBBECSDK_V2_REDIST:$PATH: export ORBBECSDK_V2_HOME ORBBECSDK_V2_LIB ORBBECSDK_V2_INCLUDE ORBBECSDK_V2_REDIST PATH EOFsource/etc/profilecd/usr/local/softwarecat>getPath.sh<<'EOF' #!/bin/bash var1=$(find /usr/local/software/OrbbecSDK_V2 -name "*.so*" -type f) var2=$(dirname $var1) var3=$(echo $var2 | tr ' ' '\n' | sort | uniq | tr '\n' ' ') echo $var3 | tr ' ' '\n' | tee -a /etc/ld.so.conf.d/local.conf EOFchmod0777 getPath.sh&&chowndkli:dkli getPath.sh&&./getPath.shcat/etc/ld.so.conf.d/local.conf ldconfigrm-rf /usr/local/software/getPath.sh# OrbbecViewer_V2cat>>/etc/profile<<"EOF" #set OrbbecViewer_V2 environment ORBBECVIEWER_V2_HOME=/usr/local/software/OrbbecViewer_V2 ORBBECVIEWER_V2_LIB=$ORBBECVIEWER_V2_HOME/lib PATH=$ORBBECVIEWER_V2_HOME:$ORBBECVIEWER_V2_LIB:$PATH: export ORBBECVIEWER_V2_HOME ORBBECVIEWER_V2_LIB PATH EOFsource/etc/profilecd/usr/local/softwarecat>getPath.sh<<'EOF' #!/bin/bash var1=$(find /usr/local/software/OrbbecViewer_V2 -name "*.so*" -type f) var2=$(dirname $var1) var3=$(echo $var2 | tr ' ' '\n' | sort | uniq | tr '\n' ' ') echo $var3 | tr ' ' '\n' | tee -a /etc/ld.so.conf.d/local.conf EOFchmod0777 getPath.sh&&chowndkli:dkli getPath.sh&&./getPath.shcat/etc/ld.so.conf.d/local.conf ldconfigrm-rf /usr/local/software/getPath.sh

测试

  • 运行一个例子
# 硬件连接电脑后lsusb# OrbbecSDK_V2cd/usr/local/software/OrbbecSDK_V2/examples/build/bin ./ob_quick_start# OrbbecViewer_V2cd/usr/local/software/OrbbecViewer_V2 ./OrbbecViewer

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询