C++

示例列表

There are two main categories of samples: Camera and Applications. The samples in the Camera category focus only on how to use the camera. The samples in the Applications category use the output generated by the camera, such as the 3D point cloud, a 2D image or other data from the camera. These samples show how the data from the camera can be used.

操作指南

  1. 安装Zivid软件

  2. 下载Zivid示例数据

Windows

点击键盘上的Win+R键启动命令提示符,然后输入 cmd 并 按 Enter 键。

Navigate to a location where you want to clone the repository, then run the following command:

git clone https://github.com/zivid/zivid-cpp-samples

使用CMake配置示例解决方案,在Visual Studio中打开示例,生成并运行。更多相关信息,更多相关信息,请参阅 使用 CMake 配置 C++ 示例并在 Windows 的 Visual Studio 中构建它们

Ubuntu

点击键盘上的 Ctrl + Alt + T 键打开终端。

Navigate to a location where you want to clone the repository, then run the following command:

git clone https://github.com/zivid/zivid-cpp-samples
cd zivid-cpp-samples

构建项目:

mkdir build
cd build
cmake <options, see below> ../source
cmake --build .

部分示例依赖于外部库,特别是 Eigen 3、OpenCV、PCL 或 HALCON。如果您不想安装这些库,可以通过向 cmake 分别传递以下选项来禁用依赖于它们的示例: cmake: -DUSE_EIGEN3=OFF-DUSE_OPENCV=OFF-DUSE_PCL=OFF-DUSE_HALCON=OFF

有关如何安装可选依赖项并配置示例以使用它们的说明,请参阅 使用可选依赖项配置 C++ 示例

现在可以从构建的目录运行示例,例如:

./CaptureFromFileCameraVis3D