Skip to content

Commit fcdf262

Browse files
committed
Samples: Automatic updates to public repository
Remember to do the following: 1. Ensure that modified/deleted/new files are correct 2. Make this commit message relevant for the changes 3. Force push 4. Delete branch after PR is merged If this commit is an update from one SDK version to another, make sure to create a release tag for previous version.
1 parent afa1ba3 commit fcdf262

64 files changed

Lines changed: 373 additions & 259 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,11 @@ from the camera can be used.
199199
- **multi_camera**
200200
- [multi_camera_calibration] - Use captures of a calibration
201201
object to generate transformation matrices to a single
202-
coordinate frame, from connected cameras.
202+
coordinate frame, from multiple connected cameras.
203203
- [multi_camera_calibration_from_zdf] - Use captures of a
204204
calibration object to generate transformation matrices to a
205-
single coordinate frame, from ZDF files.
205+
single coordinate frame, from ZDF files captured with multiple
206+
cameras.
206207
- [stitch_by_transformation] - Use transformation matrices from
207208
Multi-Camera calibration to transform point clouds into a single
208209
coordinate frame, from connected cameras.

source/applications/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Applications
2+
3+
> **Tutorials:** Read the [Applications](https://support.zivid.com/en/latest/camera/academy/applications.html) tutorials on Zivid Knowledge Base.

source/applications/advanced/auto_2d_settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
first. If you want to use your own white reference (white wall, piece of paper, etc.) instead of using the calibration
1717
board, you can provide your own mask in _main(). Then you will have to specify the lower limit for f-number yourself.
1818
19+
For more information about camera settings, check out this article:
20+
https://support.zivid.com/en/latest/camera/reference-articles/camera-settings.html
21+
1922
"""
2023

2124
import argparse
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Barcode Detection
2+
3+
> **Tutorial:** Read the full [Barcode Detection](https://support.zivid.com/en/latest/camera/academy/applications/barcode-detection.html) tutorial on Zivid Knowledge Base.

source/applications/advanced/barcode/barcode_detector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""
22
Detect and decode linear and matrix barcodes from a 2D capture.
33
4+
For more information on how to use the Zivid Barcode Detector, check out the Barcode Detection tutorial:
5+
https://support.zivid.com/en/latest/camera/academy/applications/barcode-detection.html
6+
47
"""
58

69
import zivid

source/applications/advanced/color_balance.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
If you want to use your own white reference (white wall, piece of paper, etc.) instead of using the calibration board,
99
you can provide your own mask in _main().
1010
11+
For more information on color balance, check out this article:
12+
https://support.zivid.com/en/latest/reference-articles/settings/2d-settings/color-balance.html
13+
1114
"""
1215

1316
import argparse

source/applications/advanced/downsample.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
44
The ZDF files for this sample can be found under the main instructions for Zivid samples.
55
6+
For more information on downsampling point clouds, check out this tutorial:
7+
https://support.zivid.com/en/latest/camera/academy/applications/downsampling.html
8+
69
"""
710

811
import argparse
@@ -58,6 +61,7 @@ def _main() -> None:
5861

5962
point_cloud = frame.point_cloud()
6063

64+
6165
print(f"Before downsampling: {point_cloud.width * point_cloud.height} point cloud")
6266

6367
visualize_point_cloud(point_cloud)

source/applications/advanced/gamma_correction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""
22
Capture 2D image with gamma correction.
33
4+
For more information about gamma correction, check out this article:
5+
https://support.zivid.com/en/latest/camera/reference-articles/settings/2d-settings/gamma.html
6+
47
"""
58

69
import argparse
Lines changed: 1 addition & 232 deletions
Original file line numberDiff line numberDiff line change
@@ -1,234 +1,3 @@
11
# Hand-Eye Calibration
22

3-
This page provides an overview of how to **perform**, **verify**, and **use Hand–Eye Calibration** with Zivid cameras.
4-
5-
If you are new to Hand–Eye Calibration, start with the [Hand–Eye Calibration – Concept & Theory][HandEyeTutorial-url], explaining:
6-
7-
- What Hand–Eye Calibration is
8-
- The difference between **eye-in-hand** and **eye-to-hand**
9-
- Best practices for dataset (point clouds and robot poses) acquisition
10-
11-
If you already know what you’re doing and just want to run calibration or check out our Hand-Eye calibration code, continue reading.
12-
13-
<!-- Use "Markdown All in One plugin in VS code to automatically generate and update TOC". -->
14-
15-
- [Quick Start: Just Calibrate](#quick-start-just-calibrate)
16-
- [Programmatic Hand–Eye Calibration](#programmatic-handeye-calibration)
17-
- [Dataset Acquisition Samples](#dataset-acquisition-samples)
18-
- [After Hand–Eye Calibration](#after-handeye-calibration)
19-
- [Verifying Calibration Accuracy](#verifying-calibration-accuracy)
20-
- [Summary: Which Tool Should I Use?](#summary-which-tool-should-i-use)
21-
22-
---
23-
24-
## Quick Start: Just Calibrate
25-
26-
If your goal is **only to compute the Hand–Eye Transformation Matrix**, use one of the tools below and follow Zivid’s [best-practice guide for capture poses][ZividHandEyeCalibration-url].
27-
28-
### Hand–Eye Calibration GUI (Recommended)
29-
30-
- Tutorial: [Hand–Eye GUI Tutorial][HandEyeCalibrationGUITutorial-url]
31-
- Application: [HandEyeCalibration GUI][HandEyeCalibrationGUI-url]
32-
33-
Best choice if you:
34-
35-
- Want a guided, no-code workflow
36-
37-
---
38-
39-
## Programmatic Hand–Eye Calibration
40-
41-
The following applications produce a Hand–Eye Transformation Matrix from robot poses and calibration captures.
42-
43-
### Minimal Hand-Eye Calibration Code Example
44-
45-
- Sample: [HandEyeCalibration][HandEyeCalibration-url]
46-
- Tutorial: [Integrating Zivid Hand-Eye Calibration][hand-eye-procedure-url]
47-
48-
Workflow:
49-
50-
1. User inputs robot pose in the form of a 4x4 transformation matrix (manual entry)
51-
2. Camera captures the calibration object
52-
3. User moves the robot to a new capture pose and enters the command to add a new pose
53-
4. First three steps are repeated (typically 10–20 pose pairs)
54-
5. User enters the command to perform calibration and the application returns a Hand-Eye Transformation Matrix
55-
56-
Use this if you:
57-
58-
- Want the simplest integration example
59-
- Are building your own calibration pipeline
60-
61-
---
62-
63-
### Hand Eye Calibration CLI Tool
64-
65-
- Tutorial: [Zivid CLI Tool for Hand–Eye Calibration][CLI application-url]
66-
- Installed with:
67-
- Windows Zivid installer
68-
- `tools` deb package on Ubuntu
69-
70-
Use this if you:
71-
72-
- Already have a dataset (robot poses + point clouds)
73-
- Want a command-line, batch-style workflow
74-
75-
---
76-
77-
## Dataset Acquisition Samples
78-
79-
The samples below show how to acquire robot poses and point clouds, then compute the Hand–Eye Transformation Matrix.
80-
81-
### RoboDK-Based (Robot-Agnostic)
82-
83-
- Sample: [RoboDKHandEyeCalibration][RobodkHandEyeCalibration-url]
84-
- Tutorial: [Any Robot + RoboDK + Python Hand–Eye Tutorial][RoboDKHandEyeTutorial-url]
85-
- Supported robots: [RoboDK robot library][robodk-robot-library-url]
86-
87-
Features:
88-
89-
- Works with any RoboDK-supported robot
90-
- Capture poses are manually defined in the `.rdk` file
91-
- Fully automated robot control
92-
93-
---
94-
95-
### Universal Robots (e.g. UR5e)
96-
97-
- Sample: [UniversalRobotsPerformHandEyeCalibration][URhandeyecalibration-url]
98-
- Tutorial: [UR5e + Python Hand–Eye Tutorial][URHandEyeTutorial-url]
99-
100-
Features:
101-
102-
- Designed specifically for UR robots
103-
- Fully automated robot control
104-
105-
---
106-
107-
## After Hand–Eye Calibration
108-
109-
The following applications assume that a **Hand–Eye Transformation Matrix already exists**.
110-
111-
### Utilize Hand-Eye Calibration
112-
113-
- Sample: [UtilizeHandEyeCalibration][UtilizeHandEyeCalibration-url]
114-
- Tutorial: [How To Use The Result Of Hand-Eye Calibration][UtilizeHandEyeCalibrationTutorial-url]
115-
116-
Demonstrates how to:
117-
118-
- Transform poses from camera coordinates to robot coordinates
119-
- Use the transform in real applications (e.g., bin picking)
120-
121-
Example workflow:
122-
123-
1. Capture a point cloud with a Zivid camera
124-
2. Find an object pick pose in camera coordinate system
125-
3. Transform the pose into robot coordinate system
126-
4. Plan and execute the robot motion
127-
128-
---
129-
130-
### Pose Conversions
131-
132-
- Sample: [PoseConversions][PoseConversions-url]
133-
- Application: [PoseConversions GUI][PoseConversionsGUI-url]
134-
- Theory: [Conversions Between Common Orientation Representations][PoseConversionsTheory-url]
135-
136-
Zivid primarily operates with a (4x4) Transformation Matrix (Rotation Matrix + Translation Vector). This example shows how to convert to and from:
137-
138-
- Axis–Angle
139-
- Rotation Vector
140-
- Roll–Pitch–Yaw
141-
- Quaternion
142-
143-
Useful for integrating with robot controllers.
144-
145-
---
146-
147-
## Verifying Calibration Accuracy
148-
149-
### Verify Hand-Eye With Visualization
150-
151-
- Sample: [VerifyHandEyeWithVisualization][VerifyHandEyeWithVisualization-url]
152-
153-
Application validation approach:
154-
155-
- Loads the hand-eye dataset and output (transformation matrix)
156-
- For each dataset pair:
157-
- Transforms the point cloud to common coordinate system
158-
- Finds the checkerboard centroid cartesian coordinates
159-
- Removes the points outside the the checkerboard ROI
160-
- Overlaps transformed point clouds
161-
- Visualizes alignment accuracy
162-
163-
Best for:
164-
165-
- Visual verification
166-
- Detecting systematic rotation/translation errors
167-
168-
---
169-
170-
### RoboDK Touch Test Verification
171-
172-
- Script: [RobodkHandEyeVerification][RobodkHandEyeVerification-url]
173-
- Tutorial: [Verify Hand-Eye Calibration Result Via Touch Test][RobodkHandEyeVerificationTutorial-url]
174-
175-
Verification steps:
176-
177-
1. Robot moves to a predefined capture pose
178-
2. User places the calibration object in the FOV
179-
3. Camera estimates a touch point
180-
4. Robot physically touches the calibration object
181-
5. User repeats the test at multiple locations
182-
183-
Best for:
184-
185-
- Physical validation
186-
- High-accuracy requirement applications
187-
188-
---
189-
190-
## Summary: Which Tool Should I Use?
191-
192-
| Goal | Recommended Tool |
193-
|------|------------------|
194-
| Conceptual understanding | [Knowledge Base article][HandEyeTutorial-url] |
195-
| Guided calibration | [Hand–Eye GUI][HandEyeCalibrationGUITutorial-url] |
196-
| Minimal integration example | [HandEyeCalibration][HandEyeCalibration-url] |
197-
| Existing dataset | [Hand–Eye GUI][HandEyeCalibrationGUITutorial-url]|
198-
| UR robots | [Hand–Eye GUI][HandEyeCalibrationGUITutorial-url] or [UR Hand–Eye sample][URHandEyeTutorial-url] |
199-
| Any robot | [Hand–Eye GUI][HandEyeCalibrationGUITutorial-url] or [RoboDK Hand–Eye sample][RoboDKHandEyeTutorial-url] |
200-
| Use calibration result | [UtilizeHandEyeCalibration][UtilizeHandEyeCalibrationTutorial-url] |
201-
| Verify visually | [Hand–Eye GUI][HandEyeCalibrationGUITutorial-url] or [VerifyHandEyeWithVisualization][VerifyHandEyeWithVisualization-url] |
202-
| Verify physically | [Hand–Eye GUI][HandEyeCalibrationGUITutorial-url] or [RoboDK Touch Test][RobodkHandEyeVerification-url] |
203-
204-
205-
[HandEyeTutorial-url]: https://support.zivid.com/latest/academy/applications/hand-eye.html
206-
207-
[HandEyeCalibration-url]: hand_eye_calibration.py
208-
209-
[HandEyeCalibrationGUI-url]: hand_eye_gui.py
210-
[HandEyeCalibrationGUITutorial-url]: https://support.zivid.com/en/latest/academy/applications/hand-eye/hand-eye-gui.html
211-
212-
[UtilizeHandEyeCalibration-url]: utilize_hand_eye_calibration.py
213-
[UtilizeHandEyeCalibrationTutorial-url]: https://support.zivid.com/en/latest/academy/applications/hand-eye/how-to-use-the-result-of-hand-eye-calibration.html
214-
215-
[VerifyHandEyeWithVisualization-url]: verify_hand_eye_with_visualization.py
216-
[ZividHandEyeCalibration-url]: https://support.zivid.com/latest/academy/applications/hand-eye/hand-eye-calibration-process.html
217-
[hand-eye-procedure-url]: https://support.zivid.com/en/latest/academy/applications/hand-eye/hand-eye-calibration-process.html#custom-integration
218-
219-
[PoseConversions-url]: pose_conversions.py
220-
[PoseConversionsGUI-url]: pose_conversion_gui.py
221-
[PoseConversionsTheory-url]: https://support.zivid.com/en/latest/reference-articles/pose-conversions.html
222-
223-
[CLI application-url]: https://support.zivid.com/latest/academy/applications/hand-eye/zivid_CLI_tool_for_hand_eye_calibration.html
224-
225-
[URhandeyecalibration-url]: ur_hand_eye_calibration/universal_robots_perform_hand_eye_calibration.py
226-
[URHandEyeTutorial-url]: https://support.zivid.com/en/latest/academy/applications/hand-eye/ur5-robot-%2B-python-generate-dataset-and-perform-hand-eye-calibration.html
227-
228-
[RobodkHandEyeCalibration-url]: robodk_hand_eye_calibration/robodk_hand_eye_calibration.py
229-
[RoboDKHandEyeTutorial-url]: https://support.zivid.com/en/latest/academy/applications/hand-eye/robodk-%2B-python-generate-dataset-and-perform-hand-eye-calibration.html
230-
231-
[RobodkHandEyeVerification-url]: robodk_hand_eye_calibration/robodk_verify_hand_eye_calibration.py
232-
[RobodkHandEyeVerificationTutorial-url]: https://support.zivid.com/en/latest/academy/applications/hand-eye/hand-eye-calibration-verification-via-touch-test.html
233-
234-
[robodk-robot-library-url]: https://robodk.com/supported-robots
3+
> **Tutorial:** Read the full [Hand-Eye Calibration](https://support.zivid.com/en/latest/camera/academy/applications/hand-eye.html) tutorial on Zivid Knowledge Base.

source/applications/advanced/hand_eye_calibration/hand_eye_calibration.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""
22
Perform Hand-Eye calibration.
33
4+
For more information on Hand-Eye calibration, check out this tutorial:
5+
https://support.zivid.com/en/latest/camera/academy/applications/hand-eye.html
6+
47
"""
58

69
import argparse

0 commit comments

Comments
 (0)