Samples

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

참고

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

List of samples

  • Camera

    • Basic

      • Capture - Capture colored point cloud, save 2D image, save 3D ZDF, and export PLY, using the Zivid camera.

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

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

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

      • Connect - Connect to a Zivid camera using the different available methods.

      • CreateFileCameraFromZDFWithDiagnostics - Capture a frame with diagnostics enabled and create a file camera from it.

    • Advanced

    • InfoUtilOther

      • 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 a 2D+3D frame and a 2D frame from the Zivid camera with diagnostics enabled.

      • CheckHealth - Poll the camera health check from a separate thread while capturing, printing statuses and values each second.

      • FirmwareUpdater - Update firmware on the Zivid camera.

      • FrameInfo - Read frame info from the Zivid camera.

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

      • MeasureSceneConditions - Measure ambient light in the scene and report the flickering frequency when flickering is detected.

      • Warmup - Short example of a basic way to warm up the camera with specified time and capture cycle.

      • Network

    • Maintenance

  • Applications

zivid-ros Github 저장소로 이동합니다.

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

자세한 내용은 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 을 참조하십시오.

일부 샘플은 외부 라이브러리, 특히 MathNet.Numerics 및 System.ValueTuple 에 의존합니다. 이러한 라이브러리는 샘플을 빌드할 때 NuGet을 통해 자동으로 설치됩니다.

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

참고

이 샘플에 권장되는 Python 버전은 3.7 - 3.9 입니다.

참고로 Open3D는 Python 3.13 이상 버전에서는 사용할 수 없습니다.

  1. Install Zivid Software.

  2. Download Zivid Sample Data.

  3. Zivid Python 샘플 저장소를 확인하세요.

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

cd zivid-python-samples
pip install -r requirements.txt

참고

Open3D 설치에 실패하는 경우, Open3D에서 지원하는 Python 버전을 사용하고 있는지 확인하십시오. 또는 다음 명령을 실행하여 Open3D를 사용하지 않는 샘플에 필요한 종속성만 설치할 수 있습니다.

pip install ./modules
  1. 샘플 중 하나를 열고 실행합니다.

    참고

    Windows에서 GUI 샘플을 실행하려면 pythonw 사용해야 합니다.

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

Zivid는 HALCON과의 인터페이싱을 위한 두 가지 방법을 제공합니다.

  1. Zivid SDK를 통해 HALCON에서 사용 가능한 C++/C# 라이브러리를 활용합니다. C++ 및 C# . (권장)

  2. Zivid Software 와 함께 제공되는 GenICam GenTL 제작자를 통해 직접 설치합니다.

Zivid와 HALCON은 Windows 10 및 11, Ubuntu 20.04, 22.04, 24.04, 26.04와 호환됩니다.

참고

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

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

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

MATLAB 지원이 중단되었습니다. 지원을 받으려면 이전 버전(2.15 이하)을 방문하세요.

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

설치 지침, 코드 샘플, 그리고 Zivid ROS 2 드라이버 사용 방법은 zivid-ros GitHub 저장소에서 확인하세요. ROS 1을 사용하는 경우 zivid-ros-1 브랜치를 참조하세요.

Sample parity

Camera

Sample

C++

C#

Python

HDevelop

Basic

Capture

✓

✓

✓

✓

CaptureFromFileCamera

✓

✓

✓

CaptureHdrCompleteSettings

✓

✓

✓

✓

CaptureSavePly

✓

CaptureWithSettingsFromYml

✓

✓

✓

✓

Connect

✓

✓

✓

ConnectToSerialNumberCamera

✓

CreateFileCameraFromZdfWithDiagnostics

✓

✓

✓

Advanced

AllocateMemoryForPointCloudData

✓

Capture2DAnd3D

✓

✓

CaptureAndPrintNormals

✓

✓

✓

CaptureHalconViaGenICam

✓

✓

CaptureHalconViaZivid

✓

✓

CaptureViaGenICam

✓

Advanced/MultiCamera

MultiCameraCaptureInParallel

✓

MultiCameraCaptureSequentially

✓

MultiCameraCaptureSequentiallyWithInterleavedProcessing

✓

InfoUtilOther

adapt_settings_for_flickering_ambient_light

✓

CameraInfo

✓

✓

✓

CameraUserData

✓

✓

✓

CaptureWithDiagnostics

✓

✓

✓

CheckHealth

✓

✓

✓

context_manager_with_zivid

✓

ExploreSettingsMetaData

✓

FirmwareUpdater

✓

✓

✓

FrameInfo

✓

✓

✓

GetCameraIntrinsics

✓

✓

✓

MeasureSceneConditions

✓

✓

✓

QuerySettingsAndParameters

✓

SettingsInfo

✓

Warmup

✓

✓

✓

✓

ZividBenchmark

✓

InfoUtilOther/Network

AutomaticNetworkConfigurationForCameras

✓

✓

✓

NetworkConfiguration

✓

✓

✓

Maintenance

CorrectCameraInField

✓

✓

✓

ResetCameraInField

✓

✓

✓

VerifyCameraInField

✓

✓

✓

VerifyCameraInFieldFromZdf

✓

✓

✓

visualize_benchmark_results

✓

Applications

Sample

C++

C#

Python

HDevelop

Basic/Visualization

CaptureAndVisualizeNormals

✓

✓

CaptureFromFileCameraVis3D

✓

✓

✓

CaptureVis3D

✓

✓

✓

CaptureWritePclVis3D

✓

ProjectImageStartAndStop

✓

✓

✓

ReadPclVis3D

✓

read_zdf_vis_3d

✓

Basic/FileFormats

ConvertZdf

✓

✓

ReadIterateZdf

✓

✓

✓

ReadPly

✓

Zdf2Ply

✓

Advanced

auto_2d_settings

✓

CaptureUndistort2D

✓

✓

color_balance

✓

CreateDepthMap

✓

✓

Downsample

✓

✓

✓

GammaCorrection

✓

✓

MaskPointCloud

✓

✓

✓

Advanced/Visualization

CaptureVis3DInLoop

✓

✓

✓

CaptureVis3DInLoopWithKeypressExit

✓

✓

✓

Advanced/Cuda

CaptureAndConvertImageWithOpenCvOnCuda

✓

CaptureAndConvertToDlpackTensorOnCuda

✓

✓

capture_and_process_image_with_cupy_on_cuda

✓

capture_and_render_point_cloud_with_opengl_on_cuda

✓

capture_and_segment_image_with_pytorch_on_cuda

✓

Advanced/Transform

get_checkerboard_pose_from_zdf

✓

TransformPointCloudFromMillimetersToMeters

✓

✓

✓

TransformPointCloudViaArucoMarker

✓

✓

✓

TransformPointCloudViaCheckerboard

✓

✓

✓

Advanced/Roi

RoiBoxViaArucoMarker

✓

✓

✓

RoiBoxViaCheckerboard

✓

✓

✓

Advanced/Stitching

StitchContinuouslyRotatingObject

✓

✓

✓

StitchUsingRobotMountedCamera

✓

✓

✓

StitchViaLocalPointCloudRegistration

✓

✓

✓

Advanced/Barcode

BarcodeDetector

✓

✓

Advanced/HandEyeCalibration

EyeInHandCalibration3DObject

✓

EyeInHandCalibrationMvTecPlate

✓

HandEyeCalibration

✓

✓

✓

hand_eye_gui

✓

JsonHomogeneousMatrixToHalconPose

✓

pose_conversion_gui

✓

PoseConversions

✓

✓

✓

UtilizeHandEyeCalibration

✓

✓

✓

verify_hand_eye_with_visualization

✓

Advanced/HandEyeCalibration/UrHandEyeCalibration

universal_robots_perform_hand_eye_calibration

✓

Advanced/HandEyeCalibration/RobodkHandEyeCalibration

robodk_hand_eye_calibration

✓

robodk_verify_hand_eye_calibration

✓

Advanced/MultiCamera

MultiCameraCalibration

✓

✓

✓

MultiCameraCalibrationFromZdf

✓

✓

StitchByTransformation

✓

✓

StitchByTransformationFromZdf

✓

✓

Advanced/Projector

ProjectAndFindMarker

✓

✓

ReadProjectAndCaptureImage

✓

✓

✓

ReprojectPoints

✓

✓

Advanced/RobotGuidance

robodk_robot_guidance

✓

Advanced/ObjectMatching

SurfaceMatchingCreateModel

✓

SurfaceMatchingCreateModelFromFile

✓

SurfaceMatchingFindModel

✓

SurfaceMatchingFindModelFromFile

✓

Procedures

Sample

C++

C#

Python

HDevelop

CalcCalplatePoseEyeInHand

✓

CalcCalplatePoseEyeToHand

✓

GenerateRGBAndRgbImages

✓

GetFirstAvailableZividDevice

✓

GetSettingsForZividCameraModel

✓

GetZividCameraWidth

✓

GetZividPresetFile

✓

GetZividSampleDataDir

✓

Modules

Sample

C++

C#

Python

HDevelop

Zividsamples

calibration_board_utils

✓

camera_verification

✓

color_to_grayscale

✓

display

✓

paths

✓

robodk_tools

✓

save_load_matrix

✓

save_load_transformation_matrix

✓

save_residuals

✓

settings_utils

✓

transformation_matrix

✓

white_balance_calibration

✓