Samples

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

참고

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

List of samples

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

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

    • Advanced

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

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

    • InfoUtilOther

      • AutomaticNetworkConfigurationForCameras - * Automatically configure the IP addresses of connected cameras to match the network of the user’s PC.

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

      • 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 conditions in the scene and output the measured flickering frequency of the ambient light if flickering is detected.

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

      • Warmup - Short example of a basic way to warm up the 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.

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

      • CaptureWithSettingsFromYML - Capture a 2D color image, a 3D point cloud without colour and 2D color image + 3D color point cloud from the camera and use them to generate HALCON ObjectModel3D which is then visualized.

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

    • 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

  • Procedures

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

Some of the samples depend on external libraries, in particular Eigen 3, OpenCV, PCL or HALCON. If you don’t want to install those, you can disable the samples depending on them by passing the following options, respectively, to cmake: -DUSE_EIGEN3=OFF, -DUSE_OPENCV=OFF, -DUSE_PCL=OFF, -DUSE_HALCON=OFF.

See Configure C++ Samples With Optional Dependencies for instructions on how to install the optional dependencies and configure the samples to use them.

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

./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.NumericsSystem.ValueTuple 에 의존합니다. 이러한 라이브러리는 샘플을 빌드할 때 NuGet을 통해 자동으로 설치됩니다.

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

참고

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

  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
  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와 호환됩니다.

참고

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

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

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

  • 19.05 Progress, 20.05 Progress, 21.11 Progress, 24.05 Progress, 24.11 Progress-Steady, 25.05 Progress

우리는 테스트한 HALCON 버전 중 하나를 사용하는 것을 권장합니다.

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

orphan:

nosearch:

Support for MATLAB has been deprecated. Please visit an older version (<= 2.15) for support.

자세한 내용은 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

ConnectToSerialNumberCamera

Advanced

AllocateMemoryForPointCloudData

Capture2DAnd3D

CaptureAndPrintNormals

CaptureHalconViaGenICam

CaptureHalconViaZivid

CaptureViaGenICam

MultiCameraCaptureInParallel

MultiCameraCaptureSequentially

MultiCameraCaptureSequentiallyWithInterleavedProcessing

InfoUtilOther

adapt_settings_for_flickering_ambient_light

AutomaticNetworkConfigurationForCameras

CameraInfo

CameraUserData

CaptureWithDiagnostics

context_manager_with_zivid

FirmwareUpdater

FrameInfo

GetCameraIntrinsics

MeasureSceneConditions

NetworkConfiguration

QuerySettingsAndParameters

SettingsInfo

Warmup

ZividBenchmark

Maintenance

CorrectCameraInField

ResetCameraInField

VerifyCameraInField

VerifyCameraInFieldFromZdf

Applications

Sample

C++

C#

Python

HDevelop

Basic/Visualization

CaptureAndVisualizeNormals

CaptureFromFileCameraVis3D

CaptureVis3D

CaptureWritePclVis3D

ProjectImageStartAndStop

ReadPclVis3D

read_zdf_vis_3d

Basic/FileFormats

convert_zdf

ReadIterateZdf

ReadPly

Zdf2Ply

Advanced

auto_2d_settings

BarcodeDetector

CaptureUndistort2D

color_balance

CreateDepthMap

Downsample

GammaCorrection

get_checkerboard_pose_from_zdf

HandEyeCalibration

MaskPointCloud

MultiCameraCalibration

ProjectAndFindMarker

ReadProjectAndCaptureImage

ReprojectPoints

RoiBoxViaArucoMarker

RoiBoxViaCheckerboard

StitchContinuouslyRotatingObject

StitchUsingRobotMountedCamera

StitchViaLocalPointCloudRegistration

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/HandEyeCalibration/RobodkHandEyeCalibration

robodk_verify_hand_eye_calibration

Advanced/MultiCamera

MultiCameraCalibration

MultiCameraCalibrationFromZdf

StitchByTransformation

StitchByTransformationFromZdf

Advanced/ObjectMatching

SurfaceMatchingCreateModel

SurfaceMatchingCreateModelFromFile

SurfaceMatchingFindModel

SurfaceMatchingFindModelFromFile

Advanced/RobotGuidance

robodk_robot_guidance

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

settings_utils

transformation_matrix

white_balance_calibration

Procedures

Sample

C++

C#

Python

HDevelop

GetFirstAvailableZividDevice

GetZividCameraWidth

GetZividPresetFile

GetZividSampleDataDir