C#
示例列表
示例主要分为两类:相机 和 应用。 相机 类别中的示例侧重于如何使用相机。 应用 类别中的示例则侧重于使用相机生成的输出,例如3D点云、2D图像或来自相机的其它数据。这些示例展示了可以如何使用来自相机的数据。
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
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.
ReadAndProjectImage - Read a 2D image from file and project it using the camera projector.
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.
HandEyeCalibration - Perform Hand-Eye calibration.
MultiCameraCalibration - Use captures of a calibration object to generate transformation matrices to a single coordinate frame.
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
操作指南
点击键盘上的Win+R键启动命令提示符,然后输入 cmd
并 按 Enter 键。
导航到要克隆存储库的位置,然后运行以下命令:
git clone https://github.com/zivid/zivid-csharp-samples
在Visual Studio中打开ZividNETSamples.sln,构建并运行它。如果您对操作流程不太确定,请查看 使用Visual Studio构建C#示例。
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.