C++

Sample list

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.

Instructions

  1. Install Zivid Software

  2. Download Zivid Sample Data

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에서 열어 빌드를 실행합니다. 자세한 내용은 Configure C++ Samples With CMake and Build Them in Visual Studio in Windows 를 참조하십시오.

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 에 다음 옵션을 각각 전달하여 의존하는 샘플을 비활성화할 수 있습니다.

선택적 종속성을 설치하고 이를 사용하도록 샘플을 구성하는 방법에 대한 지침은 Configure C++ Samples With Optional Dependencies 을 참조하세요.

이제 샘플을 다음과 같이 빌드 디렉토리에서 실행할 수 있습니다.

./CaptureFromFileCameraVis3D