3D【14】librealsense 安装

在ubuntu16.04下为creative F200深度摄像机安装librealsense。
首先电脑需要有usb3.0的接口。
先安装依赖包:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install libusb-1.0-0-dev pkg-config
sudo apt-get install libglfw3-dev

安装librealsense

git clone https://github.com/IntelRealSense/librealsense
cd librealsense
git checkout legacy
mkdir build && cd build
cmake -DBUILD_EXAMPLES=true ..
make && sudo make install

安装Video4Linux补丁:

sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
sudo apt-get install libssl-dev
./scripts/patch-realsense-ubuntu-xenial.sh
在运行过程中,一开始一直选择y,只有中间一部分只有m/n选项的直接安enter键。

执行./scripts/patch-realsense-ubuntu-xenial.sh这个命令可能会出现/bin/bash: ./scripts/ubuntu-retpoline-extract-one: 没有那个文件或目录错误

只需要在./scripts/patch-realsense-ubuntu-xenial.sh的第72行:

echo -e “\e[32mPrepare kernel modules configuration\e[0m”这句下面加入:

cp debian/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one

然后再运行./scripts/patch-realsense-ubuntu-xenial.sh

安装完后,插入摄像机,运行:./examples/cpp-pointcloud
如果正确的话,会有:

3D【14】librealsense 安装_第1张图片

你可能感兴趣的:(3d)