Samples

선호하는 프로그래밍 언어로 Zivid 카메라를 프로그래밍하는 방법에 대해 알아보십시오.

참고

일부 Zivid Samples에는 Sample Data 가 필요합니다.

List of samples

  • Camera

  • Applications

    • Basic

      • Visualization

        • CaptureFromFileCameraVis3D - Capture point clouds, with color, with the Zivid file camera and visualize them.

        • CaptureHDRVisNormals - Capture Zivid point clouds, with color and normals, and visualize it in 3D and as a normal map.

        • CaptureVis3D - Capture point clouds, with color, from the Zivid camera, and visualize it.

        • CaptureWritePCLVis3D - Capture point clouds, with color, from the Zivid camera, save it to PCD file format, and visualize it.

        • ProjectImageStartAndStop - Start the Image Projection and Stop it.

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

        • ReadPCLVis3D - Read point cloud from PCL file and visualize it.

      • FileFormats

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

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

      • ReprojectPoints - Illuminate checkerboard (Zivid Calibration Board) corners by getting checkerboard pose

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

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

  • Camera

    • Basic

      • Capture - Capture point clouds, with color, from the Zivid camera.

      • Capture2D - Capture 2D images from the Zivid camera.

      • CaptureAssistant - Use Capture Assistant to capture point clouds, with color, from the Zivid camera.

      • CaptureFromFileCamera - Capture point clouds, with color, with the Zivid file camera.

      • CaptureHDR - Capture point clouds, with color, from the Zivid camera.

      • CaptureHDRCompleteSettings - Capture point clouds, with color, from the Zivid camera with fully configured settings.

      • CaptureWithSettingsFromYML - Capture point clouds, with color, from the Zivid camera, with settings from YML file.

    • Advanced

      • CaptureHalconViaGenICam - Capture and save a point cloud, with colors, using GenICam interface and Halcon C++ SDK.

      • CaptureHalconViaZivid - Capture a point cloud, with colors, using Zivid SDK, transform it to a Halcon point cloud and save it using Halcon C++ SDK.

      • CaptureHDRLoop - Cover the same dynamic range in a scene with different acquisition settings to optimize for quality, speed, or to find a compromise.

      • CaptureHDRPrintNormals - Capture Zivid point clouds, compute normals and print a subset.

    • InfoUtilOther

      • AutomaticNetworkConfigurationForCameras - Automatically set the IP addresses of any number of cameras to be in the same subnet as the provided IP address of the network interface.

      • CameraInfo - List connected cameras and print camera version and state information for each connected camera.

      • CameraUserData - Store user data on the Zivid camera.

      • CaptureWithDiagnostics - Capture point clouds, with color, from the Zivid camera, with settings from YML file and diagnostics enabled.

      • FirmwareUpdater - Update firmware on the Zivid camera.

      • GetCameraIntrinsics - Read intrinsic parameters from the Zivid camera (OpenCV model) or estimate them from the point cloud.

      • NetworkConfiguration - Uses Zivid API to change the IP address of the Zivid camera.

      • Warmup - A basic warm-up method for a Zivid camera with specified time and capture cycle.

    • Maintenance

  • Applications

    • Basic

      • Visualization

      • FileFormats

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

        • ZDF2PLY - Convert point cloud from a ZDF file to a PLY file.

    • Advanced

  • Camera

    • Basic

      • Capture - Capture a 3D color point cloud from the camera and use it to generate a HALCON ObjectModel3D which is then visualized.

      • CaptureHDR - Capture an HDR image from the camera and use it to generate a HALCON ObjectModel3D which is then visualized.

      • CaptureHDRCompleteSettings - Capture an HDR image from the Zivid camera with fully configured settings for each frame.

      • CaptureSavePLY - Capture a 3D color point cloud from the camera and save it to a PLY file format.

      • CaptureWithSettingsFromJSON - Capture a 3D color point cloud from the camera and use it to generate a HALCON ObjectModel3D which is then visualized.

      • ConnectToSerialNumberCamera - Connect to a specific Zivid 3D camera based on its serial number.

    • Advanced

      • CaptureHDRLoop - Capture HDR images from the camera in a loop (while actively changing some HDR settings).

    • InfoUtilOther

      • QuerySettingsAndParameters - Query information about the image acquisition interface and selected specific parameters of Zivid camera.

      • Warmup - A basic warm-up method for a Zivid camera with specified time and capture cycle.

  • Applications

  • Camera

    • Basic

      • Capture - Capture point clouds, with color, from the Zivid camera.

      • Capture2D - Capture 2D images from the Zivid camera.

      • CaptureAssistant - Capture Assistant to capture point clouds, with color, from the Zivid camera.

      • CaptureFromFileCamera - Capture point clouds, with color, from the Zivid file camera. Currently supported by Zivid One.

      • CaptureHDR - Capture HDR point clouds, with color, from the Zivid camera.

      • zividApplication - application = zividApplication(folder)

    • InfoUtilOther

  • Applications

    • Basic

      • Visualization

        • CaptureFromFileCameraVis3D - Capture point clouds, with color, from the virtual Zivid camera, and visualize it. Currently supported by Zivid One.

        • CaptureVis3D - Capture point clouds, with color, from the Zivid camera, and visualize it.

      • FileFormats

        • convertZDF - convertZDF(inputFileName,outputFileFormat)

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

        • readZDF - [xyz,rgba,snr] = readZDF(dataFile)

    • Advanced

      • Downsample - Downsample point cloud from ZDF file.

Go to the zivid-ros Github repository.

Installation

  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.

사용하려는 경우:

  • Eigen 3: Eigen3 설치 루트 경로인 <path> 를 활용하여 -DEIGEN3_INCLUDE_DIR=<path> 설정합니다. (Eigen/Core, Eigen/Dense 등이 포함된 폴더).

  • PCLOpenCV: 시스템에 최신 버전이 설치되어 있으면 제대로 작동합니다. 그렇지 않은 경우 각각의 PCLConfig.cmakeOpenCVConfig.cmake 을 포함하는 경로 <path>-DPCL_DIR=<path> / -DOpenCV_DIR=<path> 에 설정합니다.

  • HALCON: 시스템에 최신 버전이 설치되어 있으면 제대로 작동합니다.

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

./CaptureFromFileCameraVis3D

자세한 내용은 GitHub를 방문하세요. zivid-cpp-samples 저장소.

  1. Install Zivid Software

  2. Download Zivid Sample Data

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

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

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

Visual Studio에서 ZividNETSamples.sln을 열고 빌드하고 실행합니다. 이 작업을 수행하기 전에 Build C# Samples using Visual Studio 을 참조하십시오.

Some of the samples depend on external libraries, in particular MathNet.Numerics and System.ValueTuple. These libraries will be installed automatically through NuGet when building the sample.

자세한 내용은 GitHub zivid-csharp-samples Repository를 확인하십시오.

참고

The recommended Python version for these samples is 3.7 - 3.9.

  1. Install Zivid Software.

  2. Download Zivid Sample Data.

  3. Check out the Zivid Python samples repository:

    git clone http://github.com/zivid/zivid-python-samples.git
    
  4. IDE 또는 명령줄을 사용하여 런타임 요구 사항을 설치합니다.

cd zivid-python-samples
pip install -r requirements.txt
  1. 샘플 중 하나를 열고 실행합니다.

    참고

    Running GUI samples on Windows should be done via pythonw.

자세한 내용은 GitHub zivid-python-samples Repository를 확인하십시오.

HALCON에서 Zivid를 사용하기위해 Zivid Software 와 함께 GenICam GenTL 프로듀서를 제공합니다.

Zivid and HALCON are compatible with Windows 10 and 11, and Ubuntu 20.04, 22.04, 24.04.

참고

SDK 2.10부터 Ubuntu 18.04에 대한 지원이 종료되었습니다.

이러한 운영 체제 중 하나에서 Zivid를 설정하고 사용하려면 다음 페이지의 해당 지침을 따르십시오.

다음 HALCON 버전은 테스트를 거쳐 Zivid 카메라에서 작동하는 것으로 확인되었습니다.

  • 19.05 Progress, 20.05 Progress, 21.11 Progress

테스트한 HALCON 버전 중 하나를 사용하는 것이 좋습니다.

자세한 내용은 GitHub zivid-halcon-samples Repository를 확인하십시오.

  1. Install Zivid Software

  2. Download Zivid Sample Data

  3. Install MATLAB Software. Note: Zivid 카메라로 테스트한 버전은 2019a 입니다.

Create a MATLAB “Hello World” Application With Reference to Zivid .NET API 을 확인하십시오.

자세한 내용은 GitHub zivid-matlab-samples Repository를 확인하십시오.

Check out the zivid-ros GitHub repository for installation instructions, code samples and how to get started with the Zivid ROS 2 driver. If you are using ROS 1, see the zivid-ros-1 branch.

Sample parity

Camera

Sample

C++

C#

Python

HDevelop

MATLAB

Basic

Capture

Capture2D

capture_2d_with_settings_from_yml

CaptureAssistant

CaptureFromFileCamera

CaptureHdr

CaptureHdrCompleteSettings

CaptureSavePly

CaptureWithSettingsFromJson

CaptureWithSettingsFromYml

ConnectToSerialNumberCamera

ZividApplication

Advanced

AllocateMemoryForPointCloudData

Capture2DAnd3D

CaptureHalconViaGenICam

CaptureHalconViaZivid

CaptureHdrLoop

CaptureHdrPrintNormals

MultiCameraCaptureInParallel

MultiCameraCaptureSequentially

MultiCameraCaptureSequentiallyWithInterleavedProcessing

InfoUtilOther

AutomaticNetworkConfigurationForCameras

CameraInfo

CameraUserData

CaptureWithDiagnostics

FirmwareUpdater

FrameInfo

GetCameraIntrinsics

NetworkConfiguration

QuerySettingsAndParameters

SettingsInfo

Warmup

ZividBenchmark

Maintenance

CorrectCameraInField

ResetCameraInField

VerifyCameraInField

VerifyCameraInFieldFromZdf

Applications

Sample

C++

C#

Python

HDevelop

MATLAB

Basic/Visualization

CaptureFromFileCameraVis3D

CaptureHdrVisNormals

CaptureVis3D

CaptureWritePclVis3D

ProjectImageStartAndStop

ReadAndProjectImage

ReadPclVis3D

read_zdf_vis_3d

Basic/FileFormats

convert_zdf

ReadIterateZdf

ReadPly

ReadZdf

Zdf2Ply

Advanced

auto_2d_settings

CaptureUndistort2D

color_balance

CreateDepthMap

Downsample

GammaCorrection

get_checkerboard_pose_from_zdf

HandEyeCalibration

MaskPointCloud

MultiCameraCalibration

ProjectAndFindMarker

ReprojectPoints

RoiBoxViaArucoMarker

RoiBoxViaCheckerboard

TransformPointCloudFromMillimetersToMeters

TransformPointCloudViaArucoMarker

TransformPointCloudViaCheckerboard

Advanced/HandEyeCalibration

hand_eye_gui

pose_conversion_gui

PoseConversions

robodk_hand_eye_calibration

UtilizeHandEyeCalibration

verify_hand_eye_with_visualization

Advanced/HandEyeCalibration/UrHandEyeCalibration

universal_robots_perform_hand_eye_calibration

Advanced/MultiCamera

MultiCameraCalibration

MultiCameraCalibrationFromZdf

StitchByTransformation

StitchByTransformationFromZdf

Advanced/ObjectMatching

SurfaceMatchingCreateModel

SurfaceMatchingCreateModelFromFile

SurfaceMatchingFindModel

SurfaceMatchingFindModelFromFile

Advanced/RobotGuidance

robodk_robot_guidance

Advanced/VerifyHandEyeCalibration

robodk_verify_hand_eye_calibration

Modules

Sample

C++

C#

Python

HDevelop

MATLAB

Zividsamples

calibration_board_utils

display

paths

robodk_tools

save_load_matrix

transformation_matrix

white_balance_calibration