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 に渡すことで、それらに依存するサンプルを無効にできます。 -DUSE_EIGEN3=OFF-DUSE_OPENCV=OFF-DUSE_PCL=OFF-DUSE_HALCON=OFF

オプションの依存関係をインストールし、サンプルがそれらを使用するように構成する方法については オプションの依存関係を使用した C++ サンプルの設定 を参照してください。

サンプルは、例えば以下のように、ビルドディレクトリから実行できます。

./CaptureFromFileCameraVis3D