サンプル
お好みのプログラミング言語を使用して、Zivid カメラのプログラミングに直接取り組んでください。
注釈
一部の Zivid サンプルには サンプルデータ が必要です。
サンプル一覧
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
AllocateMemoryForPointCloudData - Two methods to copy point cloud data from GPU memory to CPU memory, to be consumed by OpenCV.
Capture2DAnd3D - Capture 2D and 3D with the Zivid camera.
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 colored point cloud with the Zivid SDK, convert it to a HALCON point cloud and save it.
CaptureViaGenICam - Capture using the GenICam interface.
MultiCamera
MultiCameraCaptureInParallel - Capture point clouds with multiple cameras in parallel.
MultiCameraCaptureSequentially - Capture point clouds with multiple cameras sequentially.
MultiCameraCaptureSequentiallyWithInterleavedProcessing - Capture point clouds with multiple cameras sequentially with interleaved processing.
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.
ExploreSettingsMetaData - Recursively iterates through all leaf parameters in a Zivid camera’s settings.
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.
SettingsInfo - Read settings info from the Zivid camera.
Warmup - Short example of a basic way to warm up the camera with specified time and capture cycle.
ZividBenchmark - Zividbenchmark is a sample that will test the average speed of different operations on your computer.
Network
AutomaticNetworkConfigurationForCameras - Automatically configure the IP addresses of connected cameras to match the network of the user's PC.
NetworkConfiguration - Uses Zivid API to change the IP address of the Zivid camera.
Maintenance
CorrectCameraInField - Correct the dimension trueness of a Zivid camera.
ResetCameraInField - Reset infield correction on a camera.
VerifyCameraInField - Check the dimension trueness of a Zivid camera.
VerifyCameraInFieldFromZDF - Check the dimension trueness of a Zivid camera from a ZDF file.
Applications
Basic
Visualization
CaptureAndVisualizeNormals - Capture Zivid point clouds, with color and normals, and visualize it in 3D and as a normal map.
CaptureFromFileCameraVis3D - Capture point clouds, with color, with the Zivid file camera and visualize them.
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.
ReadPCLVis3D - Read point cloud from PCL file and visualize it.
FileFormats
ConvertZDF - Convert point cloud data from a ZDF file to your preferred format.
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.
MaskPointCloud - Mask point cloud from a ZDF file using the Mask API and visualize it with Zivid::Visualizer.
Visualization
CaptureVis3DInLoop - Capture point clouds, with color, from the Zivid camera, and visualize them in a loop.
CaptureVis3DInLoopWithKeypressExit - Capture point clouds, with color, from the Zivid camera, and visualize them in a loop. Press 'q' to exit.
Cuda
CaptureAndConvertImageWithOpenCVOnCuda - Capture a 2D image with the Zivid SDK and perform RGBA to grayscale conversion on a CUDA device using OpenCV.
CaptureAndConvertToDlpackTensorOnCuda - Capture a 2D+3D frame and build DLPack tensors directly from the Zivid DeviceArrays on the CUDA device.
Transform
TransformPointCloudFromMillimetersToMeters - Transform point cloud data from millimeters to meters.
TransformPointCloudViaArucoMarker - Transform a point cloud from camera to ArUco marker coordinate frame using the marker's estimated pose.
TransformPointCloudViaCheckerboard - Transform a point cloud from camera to checkerboard coordinate frame using the pose from the API.
Roi
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.
Stitching
StitchContinuouslyRotatingObject - Stitch point clouds from a continuously rotating object using Local Point Cloud Registration, then 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.
Barcode
BarcodeDetector - Detect and decode linear and matrix barcodes from a 2D capture.
HandEyeCalibration
HandEyeCalibration - Perform Hand-Eye calibration.
PoseConversions - Convert to/from Transformation Matrix (Rotation Matrix + Translation Vector).
UtilizeHandEyeCalibration - Transform a data point or entire point cloud from camera to robot base frame using the Hand-Eye calibration matrix.
MultiCamera
MultiCameraCalibration - Generate transformation matrices to a single coordinate frame from captures by multiple connected cameras.
MultiCameraCalibrationFromZDF - Use captures of a calibration object to generate transformation matrices to a single coordinate frame, from a ZDF files.
StitchByTransformation - Transform point clouds from connected cameras into one coordinate frame using Multi-Camera calibration.
StitchByTransformationFromZDF - Transform point clouds from ZDF files into one coordinate frame using Multi-Camera calibration.
Projector
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.
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
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 colored point cloud with the Zivid SDK, convert it to a HALCON point cloud and save it.
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
AutomaticNetworkConfigurationForCameras - Automatically configure the IP addresses of connected cameras to match the network of the user's PC.
NetworkConfiguration - Uses Zivid API to change the IP address of the Zivid camera.
Maintenance
CorrectCameraInField - Correct the dimension trueness of a Zivid camera.
ResetCameraInField - Reset infield correction on a camera.
VerifyCameraInField - Check the dimension trueness of a Zivid camera.
VerifyCameraInFieldFromZDF - Check the dimension trueness of a Zivid camera from a ZDF file.
Applications
Basic
Visualization
CaptureFromFileCameraVis3D - Capture point clouds, with color, with the Zivid file camera and visualize them.
CaptureVis3D - Capture point clouds, with color, from the Zivid camera, and visualize them.
ProjectImageStartAndStop - Start the Image Projection and Stop it.
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
Downsample - Downsample point cloud from a ZDF file.
MaskPointCloud - Mask point cloud from a ZDF file using the Mask API and visualize it with Zivid.NET Visualizer.
Visualization
CaptureVis3DInLoop - Capture point clouds, with color, from the Zivid camera, and visualize them in a loop.
CaptureVis3DInLoopWithKeypressExit - Capture point clouds, with color, from the Zivid camera, and visualize them in a loop. Press 'q' to exit.
Transform
TransformPointCloudFromMillimetersToMeters - Transform point cloud data from millimeters to meters.
TransformPointCloudViaArucoMarker - Transform a point cloud from camera to ArUco marker coordinate frame using the marker's estimated pose.
TransformPointCloudViaCheckerboard - Transform a point cloud from camera to checkerboard coordinate frame using the pose from the API.
Roi
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.
Stitching
StitchContinuouslyRotatingObject - Stitch point clouds from a continuously rotating object using Local Point Cloud Registration, then 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.
HandEyeCalibration
HandEyeCalibration - Perform Hand-Eye calibration.
PoseConversions - Convert to/from Transformation Matrix (Rotation Matrix + Translation Vector).
UtilizeHandEyeCalibration - Transform a data point or entire point cloud from camera to robot base frame using the Hand-Eye calibration matrix.
MultiCamera
MultiCameraCalibration - Use captures of a calibration object to generate transformation matrices to a single coordinate frame.
Projector
ReadProjectAndCaptureImage - Read a 2D image from file and project it using the camera projector.
camera
basic
capture - Capture colored point cloud, save 2D image, save 3D ZDF, and export PLY, using the Zivid camera.
capture_from_file_camera - Capture point clouds, with color, with the Zivid file camera.
capture_hdr_complete_settings - Capture point clouds, with color, from the Zivid camera with fully configured settings.
capture_with_settings_from_yml - 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.
create_file_camera_from_zdf_with_diagnostics - Capture a frame with diagnostics enabled and create a file camera from it.
advanced
capture_2d_and_3d - Capture 2D and 3D with the Zivid camera.
capture_and_print_normals - Capture Zivid point clouds, compute normals and print a subset.
info_util_other
adapt_settings_for_flickering_ambient_light - Adapt camera acquisition settings based on known ambient light conditions.
camera_info - Print Python, zivid-python and Zivid SDK versions, then list each connected camera with info and state.
camera_user_data - Store user data on the Zivid camera.
capture_with_diagnostics - Capture a 2D+3D frame and a 2D frame from the Zivid camera with diagnostics enabled.
check_health - Poll the camera health check from a separate thread while capturing, printing statuses and values each second.
context_manager_with_zivid - Sample showing how to use a context manager with Zivid Application and safely return processed data.
firmware_updater - Update firmware on the Zivid camera.
frame_info - Read frame info from the Zivid camera.
get_camera_intrinsics - Read intrinsic parameters from the Zivid camera (OpenCV model) or estimate them from the point cloud.
measure_scene_conditions - 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
automatic_network_configuration_for_cameras - Automatically configure the IP addresses of connected cameras to match the network of the user's PC.
network_configuration - Uses Zivid API to change the IP address of the Zivid camera.
maintenance
correct_camera_in_field - Correct the dimension trueness of a Zivid camera.
reset_camera_in_field - Reset infield correction on a camera.
verify_camera_in_field - Check the dimension trueness of a Zivid camera.
verify_camera_in_field_from_zdf - Check the dimension trueness of a Zivid camera from a ZDF file.
visualize_benchmark_results - Visualize the CSV results produced by the ZividBenchmark sample.
applications
basic
visualization
capture_and_visualize_normals - Capture Zivid point clouds, compute normals and convert to color map and display.
capture_from_file_camera_vis_3d - Capture point clouds, with color, with the Zivid file camera.
capture_vis_3d - Capture point clouds, with color, from the Zivid camera, and visualize it.
project_image_start_and_stop - Start the Image Projection and Stop it.
read_zdf_vis_3d - Read point cloud data from a ZDF file and visualize it.
file_formats
convert_zdf - Convert point cloud data from a ZDF file to your preferred format.
read_iterate_zdf - Read point cloud data from a ZDF file, iterate through it, and extract individual points.
advanced
auto_2d_settings - Automatically find 2D settings for a 2D capture by using a Zivid calibration board.
capture_undistort_2d - Use camera intrinsics to undistort a 2D image.
color_balance - Balance color of a 2D image by using a Zivid calibration board.
create_depth_map - Read point cloud data from a ZDF file, convert it to OpenCV format, then extract and visualize depth map.
downsample - Downsample point cloud from a ZDF file.
gamma_correction - Capture 2D image with gamma correction.
mask_point_cloud - Read point cloud data from a ZDF file, apply a binary mask, and visualize it.
visualization
capture_vis_3d_in_loop - Capture point clouds, with color, from the Zivid camera, and visualize them in a loop.
capture_vis_3d_in_loop_with_keypress_exit - Capture point clouds, with color, from the Zivid camera, and visualize them in a loop. Press 'q' to exit.
cuda
capture_and_convert_to_dlpack_tensor_on_cuda - Demonstrate zero-copy GPU interop by handing a Zivid DeviceArray to PyTorch on the GPU, showing two paths.
capture_and_process_image_with_cupy_on_cuda - Demonstrate GPU interop with CuPy: wrap a Zivid GPU image buffer as a CuPy array without copying it through CPU memory.
capture_and_render_point_cloud_with_opengl_on_cuda - Render a Zivid point cloud interactively by copying it device-to-device into OpenGL buffers with CUDA interop.
capture_and_segment_image_with_pytorch_on_cuda - Feed a Zivid 2D image into a third-party segmentation model on the GPU without a CPU round-trip.
transform
get_checkerboard_pose_from_zdf - Estimate the checkerboard pose from a ZDF file of a Zivid calibration board and save it to YAML.
transform_point_cloud_from_millimeters_to_meters - Transform point cloud data from millimeters to meters.
transform_point_cloud_via_aruco_marker - Transform a point cloud from camera to ArUco marker coordinate frame using the marker's estimated pose.
transform_point_cloud_via_checkerboard - Transform a point cloud from camera to checkerboard coordinate frame using the pose from the API.
roi
roi_box_via_aruco_marker - Filter the point cloud based on a ROI box given relative to the ArUco marker on a Zivid Calibration Board.
roi_box_via_checkerboard - Filter the point cloud based on a ROI box given relative to the Zivid Calibration Board.
stitching
stitch_continuously_rotating_object - Stitch point clouds from a continuously rotating object using Local Point Cloud Registration, then downsample.
stitch_using_robot_mounted_camera - Stitch multiple point clouds captured with a robot mounted camera.
stitch_via_local_point_cloud_registration - Stitch two point clouds using a transformation estimated by Local Point Cloud Registration and apply Voxel Downsample.
barcode
barcode_detector - Detect and decode linear and matrix barcodes from a 2D capture.
hand_eye_calibration
hand_eye_calibration - Perform Hand-Eye calibration.
hand_eye_gui - Hand-Eye Calibration GUI.
pose_conversion_gui - Convert between different rotation formats with a GUI.
pose_conversions - Convert to/from Transformation Matrix (Rotation Matrix + Translation Vector).
utilize_hand_eye_calibration - Transform a data point or entire point cloud from camera to robot base frame using the Hand-Eye calibration matrix.
verify_hand_eye_with_visualization - Verify hand-eye calibration by transforming all dataset point clouds and visualizing them overlapped.
ur_hand_eye_calibration
universal_robots_perform_hand_eye_calibration - Script to generate a dataset and perform hand-eye calibration using a Universal Robot UR5e robot.
robodk_hand_eye_calibration
robodk_hand_eye_calibration - Generate a dataset and perform hand-eye calibration using the Robodk interface.
robodk_verify_hand_eye_calibration - Perform a touch test with a robot to verify Hand-Eye Calibration using the RoboDK interface.
multi_camera
multi_camera_calibration - Generate transformation matrices to a single coordinate frame from captures by multiple connected cameras.
multi_camera_calibration_from_zdf - Generate transformation matrices to a single coordinate frame from multi-camera ZDF captures.
stitch_by_transformation - Transform point clouds from connected cameras into one coordinate frame using Multi-Camera calibration.
stitch_by_transformation_from_zdf - Transform point clouds from ZDF files into one coordinate frame using Multi-Camera calibration.
projector
project_and_find_marker - Show a marker using the projector, capture a set of 2D images to find the marker coordinates (2D and 3D).
read_project_and_capture_image - Read a 2D image from file and project it using the camera projector.
reproject_points - Illuminate checkerboard (Zivid Calibration Board) centers by getting the checkerboard feature points.
robot_guidance
robodk_robot_guidance - Guide the robot to follow a path on the Zivid Calibration Board.
modules
zividsamples
calibration_board_utils - Utility functions for the Zivid calibration board.
camera_verification - Capture and measure the infield verification state of a Zivid camera.
color_to_grayscale - Convert Zivid RGBA color images to grayscale.
display - Display relevant data for Zivid Samples.
paths - Get relevant paths for Zivid Samples.
robodk_tools - Connect to a robot through RoboDK, list its targets and set its speeds.
save_load_matrix - Save and load Zivid 4x4 transformation matrices from and to YAML files.
save_load_transformation_matrix - Save and load Zivid transformation matrices to and from YAML files.
save_residuals - Save per-pose hand-eye calibration residuals to a YAML file.
settings_utils - Pick and adjust Zivid capture settings for the samples.
transformation_matrix - Convenience functions and a class for 4x4 transformation matrices.
white_balance_calibration - Balance color for 2D capture using white surface as reference.
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 2D and 3D data with settings from YML, then generate and visualize a HALCON ObjectModel3D.
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
Basic
FileFormats
ReadPLY - Import and display a Zivid point cloud from a PLY file.
Advanced
HandEyeCalibration
EyeInHandCalibration3DObject - Hand-eye calibration with a Zivid camera and a 3D calibration object.
EyeInHandCalibrationMVTecPlate - Hand-eye calibration with a Zivid camera and MVTec calibration plate.
JSONHomogeneousMatrixToHalconPose - Transform homogenous matrixes to halcon pose.
ObjectMatching
SurfaceMatchingCreateModel - Create a model for HALCON surface-based 3D matching algorithm from a Zivid point cloud captured by a camera.
SurfaceMatchingCreateModelFromFile - Create a model for HALCON surface-based 3D matching algorithm from a Zivid point cloud loaded from a ZDF file.
SurfaceMatchingFindModel - Utilize surface-based 3D matching on data taken with a Zivid camera.
SurfaceMatchingFindModelFromFile - Utilize surface-based 3D matching on data taken with a Zivid camera.
Procedures
calc_calplate_pose_eye_in_hand - Calculate the pose of the calibration object in the camera frame for Eye-In-Hand.
calc_calplate_pose_eye_to_hand - Calculate the pose of the calibration object in the camera frame for Eye-To-Hand.
generate_R_G_B_and_RGB_images - Create separate images for each color channel and a combined RGB image.
get_first_available_zivid_device - Get the first Zivid device from the input tuple of devices.
get_settings_for_zivid_camera_model - Get settings depending on the camera model.
get_zivid_camera_width - Get width for given camera and sampling pixel setting.
get_zivid_preset_file - Get preset file for given camera.
get_zivid_sample_data_dir - Get the path of ZIVID DATA depending on your operating system.
zivid-ros GitHub リポジトリにアクセスしてください。
インストール
Windows
キーボードの Win + R キーを押してコマンド プロンプトを起動し、次に cmd と入力して Enter を押します。
リポジトリのクローンを作成する場所に移動し、次のコマンドを実行します。
git clone https://github.com/zivid/zivid-cpp-samples
CMake でサンプル ソリューションを構成し、Visual Studio で開き、ビルドして実行します。詳細については CMake を使用して C++ サンプルを構成し、Windows の Visual Studio でビルドする を参照してください。
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 。
オプションの依存関係をインストールし、サンプルがそれらを使用するように構成する方法については オプションの依存関係を使用した C++ サンプルの設定 を参照してください。
たとえば次のように、ビルド ディレクトリからサンプルを実行できるようになりました。
./CaptureFromFileCameraVis3D
詳細については、GitHub zivid-cpp-samples リポジトリにアクセスしてください。
キーボードの Win + R キーを押してコマンド プロンプトを起動し、次に cmd と入力して Enter を押します。
リポジトリのクローンを作成する場所に移動し、次のコマンドを実行します。
git clone https://github.com/zivid/zivid-csharp-samples
Visual Studio で ZividNETSamples.sln を開き、ビルドして実行します。これを行うかどうか不明な場合は、 Visual Studio を使用して C# サンプルをビルドする を確認してください。
一部のサンプルは、外部ライブラリ、特に MathNet.Numerics と System.ValueTuple に依存しています。これらのライブラリは、サンプルをビルドする際に NuGet を通じて自動的にインストールされます。
詳細については、GitHub zivid-csharp-samples リポジトリにアクセスしてください。
注釈
これらのサンプルに推奨される Python バージョンは 3.7 - 3.9 です。
なお、Open3D は Python 3.13 以降では利用できません。
Zivid の Python サンプルリポジトリをチェックしてみてください。
git clone http://github.com/zivid/zivid-python-samples.git
IDE またはコマンド ラインを使用して、ランタイム要件をインストールします。
cd zivid-python-samples pip install -r requirements.txt注釈
Open3D のインストールに失敗した場合は、Open3D でサポートされている Python バージョンを使用していることを確認してください。または、以下のコマンドを実行して、Open3D 以外のサンプルに必要な依存関係のみをインストールすることもできます。
pip install ./modules
いずれかのサンプルを開いて実行します。
注釈
Windows 上で GUI サンプルを実行するには
pythonwを使用する必要があります。
詳細については、GitHub zivid-python-samples リポジトリにアクセスしてください。
Zivid は HALCON と連携するための 2 つの方法を提供しています。
Zivid SDK を通じて、HALCON で利用可能な C++/C# ライブラリを活用します。 C++ と C# の両方のサンプルを提供しています。(推奨)
Zivid Software に付属する GenICam GenTL プロデューサーを介して直接行います。
Zivid and HALCON are compatible with Windows 10 and 11, and Ubuntu 20.04, 22.04, 24.04, 26.04.
注釈
Ubuntu 18.04 のサポートは SDK 2.10 以降削除されました。
これらのオペレーティングシステムのいずれかで Zivid をセットアップして使用するには、次のページに記載されているそれぞれの手順に従ってください。
詳細については、GitHub zivid-halcon-samples リポジトリにアクセスしてください。
MATLAB のサポートは終了しました。サポートが必要な場合は、旧バージョン(2.15 以前)をご利用ください。
詳細については、GitHub zivid-matlab-samples リポジトリにアクセスしてください。
インストール手順、コードサンプル、Zivid ROS 2 ドライバの入門方法については、GitHub リポジトリの zivid-ros を参照してください。ROS 1 を使用している場合は、 zivid-ros-1 ブランチを参照してください。
サンプルパリティ
カメラ
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 |
アプリケーション
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 |
手順
Sample |
C++ |
C# |
Python |
HDevelop |
|---|---|---|---|---|
CalcCalplatePoseEyeInHand |
||||
CalcCalplatePoseEyeToHand |
||||
GenerateRGBAndRgbImages |
||||
GetFirstAvailableZividDevice |
||||
GetSettingsForZividCameraModel |
||||
GetZividCameraWidth |
||||
GetZividPresetFile |
||||
GetZividSampleDataDir |
モジュール
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 |