C++

Sample list

샘플에는 CameraApplications 의 두 가지 주요 범주가 있습니다. Camera 카테고리의 샘플은 카메라 사용 방법에 초점을 맞춥니다. Applications 카테고리의 샘플은 3D 포인트 클라우드, 2D 이미지 또는 카메라의 기타 데이터와 같이 카메라에서 생성된 데이터를 사용합니다. 이 샘플은 카메라의 데이터를 사용하는 방법을 보여줍니다.

  • Camera

  • Applications

    • Basic

      • Visualization

      • FileFormats

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

    • Advanced

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

      • 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.

      • HandEyeCalibration - Perform Hand-Eye calibration.

      • MaskPointCloud - Mask point cloud from a ZDF file and convert to PCL format, extract depth map and visualize it.

      • 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

      • 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.

      • StitchContinuouslyRotatingObject - Stitch point clouds from a continuously rotating object without pre-alignment using Local Point Cloud Registration and apply Voxel Downsample.

      • StitchUsingRobotMountedCamera - Stitch multiple point clouds captured with a robot mounted camera.

      • StitchViaLocalPointCloudRegistration - Stitch two point clouds using a transformation estimated by Local Point Cloud Registration and apply Voxel Downsample.

      • TransformPointCloudFromMillimetersToMeters - Transform point cloud data from millimeters to meters.

      • TransformPointCloudViaArucoMarker - Transform a point cloud from camera to ArUco marker coordinate frame by estimating the marker’s pose from the point cloud.

      • TransformPointCloudViaCheckerboard - Transform a point cloud from camera to checkerboard (Zivid Calibration Board) coordinate frame by getting checkerboard pose from the API.

      • HandEyeCalibration

        • 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 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.

Instructions

  1. Install Zivid Software

  2. Download Zivid Sample Data

Windows

키보드에서 Win + R 키를 눌러 명령 프롬프트를 시작한 다음 cmd 을 입력하고 Enter 를 누르세요.

리포지토리를 복제할 위치로 이동한 후 다음 명령을 실행합니다.

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 키를 눌러 터미널을 엽니다.

리포지토리를 복제할 위치로 이동한 후 다음 명령을 실행합니다.

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

프로젝트 빌드:

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

일부 샘플은 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