C++

サンプルリスト

サンプルには、カメラアプリケーション という 2 つの主なカテゴリがあります。 カメラ カテゴリのサンプルは、カメラの使用方法のみに焦点を当てています。 アプリケーション カテゴリのサンプルは、3D 点群、2D 画像、カメラからのその他のデータなど、カメラによって生成された出力を使用します。これらのサンプルは、カメラからのデータがどのように使用されるかを示しています。

  • Camera

  • Applications

    • Basic

      • Visualization

      • FileFormats

        • ConvertZDF - Convert point cloud data from a ZDF file to your preferred format

        • ReadIterateZDF - Read point cloud data from a ZDF file, iterate through it, and extract individual points.

    • Advanced

      • CaptureUndistort2D - Use camera intrinsics to undistort a 2D image.

      • CreateDepthMap - Convert point cloud from a ZDF file to OpenCV format, extract depth map and visualize it.

      • Downsample - Downsample point cloud from a ZDF file.

      • GammaCorrection - Capture 2D image with gamma correction.

      • MaskPointCloud - Mask point cloud from a ZDF file using the Mask API and visualize it with Zivid::Visualizer.

      • Visualization

      • Cuda

      • Transform

      • Roi

        • ROIBoxViaArucoMarker - Filter the point cloud based on a ROI box given relative to the ArUco marker on a Zivid Calibration Board.

        • ROIBoxViaCheckerboard - Filter the point cloud based on a ROI box given relative to the Zivid Calibration Board.

      • Stitching

      • Barcode

        • BarcodeDetector - Detect and decode linear and matrix barcodes from a 2D capture.

      • HandEyeCalibration

        • HandEyeCalibration - Perform Hand-Eye calibration.

        • PoseConversions - Convert to/from Transformation Matrix (Rotation Matrix + Translation Vector)

        • UtilizeHandEyeCalibration - Transform single data point or entire point cloud from camera to robot base reference frame using Hand-Eye calibration

      • MultiCamera

        • MultiCameraCalibration - Use captures of a calibration object to generate transformation matrices to a single coordinate frame, from multiple connected cameras.

        • MultiCameraCalibrationFromZDF - Use captures of a calibration object to generate transformation matrices to a single coordinate frame, from a ZDF files.

        • StitchByTransformation - Use transformation matrices from Multi-Camera calibration to transform point clouds into single coordinate frame, from connected cameras.

        • StitchByTransformationFromZDF - Use transformation matrices from Multi-Camera calibration to transform point clouds into single coordinate frame, from a ZDF files.

      • Projector

        • ProjectAndFindMarker - Show a marker using the projector, capture a set of 2D images to find the marker coordinates (2D and 3D).

        • ReadProjectAndCaptureImage - Read a 2D image from file and project it using the camera projector.

        • ReprojectPoints - Illuminate checkerboard (Zivid Calibration Board) centers by getting the checkerboard feature points

手順

  1. Zivid ソフトウェアをインストールします

  2. Zivid サンプルデータをダウンロードする

Windows

キーボードの Win + R キーを押してコマンドプロンプトを起動し、 cmd と入力して Enter を押します。

リポジトリのクローンを作成する場所に移動し、次のコマンドを実行します。

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

CMake でサンプルソリューションを構成し、Visual Studio で開き、ビルドして実行します。詳細については CMake を使用して C++ サンプルを構成し、Windows の Visual Studio でビルドする を参照してください。

Ubuntu

キーボードの Ctrl + Alt + T キーを押してターミナルを開きます。

リポジトリのクローンを作成する場所に移動し、次のコマンドを実行します。

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