Skip to content

Commit fd96f79

Browse files
Add easy_handeye calibration guide and update camera calibration (#176)
- Adds Hand-Eye Calibration with easy_handeye - Updates Camera Calibration and Practical CV considerations - Standardizes formatting and sidebar navigation --------- Co-authored-by: Nevin Valsaraj <nevin.valsaraj32@gmail.com>
1 parent bb1a034 commit fd96f79

4 files changed

Lines changed: 80 additions & 10 deletions

File tree

_data/navigation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Wiki links. These show up in the sidebar in the order they appear here.
1+
# Wiki links. These show up in the sidebar in the order they appear here.
22
wiki:
33
- title: Overview
44
children:
@@ -112,6 +112,8 @@ wiki:
112112
url: /wiki/sensing/fiducial-markers/
113113
- title: Hand-Eye Calibration
114114
url: /wiki/sensing/handeye-calibration/
115+
- title: Hand-Eye Calibration with easy_handeye
116+
url: /wiki/sensing/easy-handeye/
115117
- title: Intel Realsense
116118
url: /wiki/sensing/realsense/
117119
- title: OpenCV Stereo Vision Processing

wiki/sensing/camera-calibration.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
---
2-
date: 2017-08-15
2+
date: 2024-05-01
33
title: Camera Calibration
44
---
5+
It is quite common for projects to involve vision systems, but despite this many teams working with cameras ignore the basic advantages of calibrating a camera properly. Not only does a good calibration lead to better quality of data in form of images captured but also reduces overall errors in the vision the system, a properly calibrated camera helps avoid unnecessary delays due to radiometric and geometric errors.
6+
7+
## What is Camera Calibration?
8+
Camera Calibration is the process of estimating internal or external parameters of a camera by taking multiple measurements of a known object. Often both are necessary to get a system working well.
9+
10+
#### Types of Camera Calibration
11+
- *Intrinsic* - Estimates the internal parameters of the camera including the focal length, the optical center, and distortion coefficients. This can be useful when trying to transform points between pixel space and 3D space.
12+
- *Extrinsic* - Estimates the external parameters of the camera i.e. the translation and rotation of the camera relative to a reference point. This can be useful when incorporating information from multiple sensors or when trying to act upon information captured by a camera.
13+
14+
## Tools for Camera Calibration
15+
There are multiple methods of camera calibration depending on what you are trying to achieve. Some specific tutorials on camera calibration are listed below:
16+
17+
- [Camera IMU Calibration](/wiki/sensing/camera-imu-calibration.md) - Using the Kalibr library to calibrate a camera and IMU
18+
- Kalibr can also be used for intrinsic camera calibration as shown in [this video](https://www.youtube.com/watch?app=desktop&v=puNXsnrYWTY)
19+
- [Hand-Eye Calibration with easy_handeye](/wiki/sensing/easy-handeye.md) - Using the easy_handeye library to perform extrinsic camera calibration with a robotic arm
20+
- [Photometric Calibration](/wiki/sensing/photometric-calibration.md) - Calibrating a camera to determine the absolute value of light intensity
521

6-
It is quite common for projects to involve vision systems, but despite this most teams working with cameras ignore the basic advantages of calibrating a camera properly. Not only does a good calibration lead to better quality of data in form of images captured but also reduces overall errors in the vision the system, a properly calibrated camera helps avoid unnecessary delays due to radiometric and geometric errors.
722

823
## References
9-
Listed below are a few good places to get started on camera calibration.
10-
- Quick intro. and overview: https://www.cs.umd.edu/class/fall2013/cmsc426/lectures/camera-calibration.pdf
11-
- A comprehensive guide: http://www.cs.rutgers.edu/~elgammal/classes/cs534/lectures/CameraCalibration-book-chapter.pdf
12-
- Chapter 2 in this book: http://szeliski.org/Book/drafts/SzeliskiBook_20100903_draft.pdf (I would highly recommend this book, above all)
13-
- Using MATLAB for online/offline calibration: https://www.mathworks.com/help/vision/camera-calibration.html
24+
This is only a brief overview, for more detailed information about camera calibration, check out the links below
25+
- [Camera Calibration](http://www.cs.rutgers.edu/~elgammal/classes/cs534/lectures/CameraCalibration-book-chapter.pdf) - Zhengyou Zhang
26+
- [Computer Vision: Algorithms and Applications](http://szeliski.org/Book/drafts/SzeliskiBook_20100903_draft.pdf) - Richard Szeliski (Chapter 2)
27+
- [Camera Calibration](https://www.mathworks.com/help/vision/camera-calibration.html) - Mathworks
28+
- [What is lens distortion?](https://photographylife.com/what-is-distortion) - Nasim Mansurov

wiki/sensing/computer-vision-considerations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
date: 2017-08-15
2+
date: 2024-05-24
33
title: Computer Vision for Robotics- Practical Considerations
44
---
55
Things to take care of when working with vision in robotics:
@@ -19,7 +19,7 @@ Its easy to get enchanted by the promises of the camera. However, computer visio
1919
- If you are doing pose estimation using CV, your calibration error will affect your pose accuracy/precision.
2020
- When calibrating, make sure your target (chessboard) is as planar as it can get. Also make sure its edges and corners are sharp.
2121
- The above point is even more relevant if you are using the OpenCV software for calibration because it auto-detects corners
22-
- Apart from OpenCV, another good calibration toolbox is [Caltech Calib Toolbox](http://www.vision.caltech.edu/bouguetj/calib_doc/).
22+
- Refer to the [Camera Calibration Entry](/wiki/sensing/camera-calibration.md) for more information
2323

2424
## Scale
2525
- Any knowledge you recover about the world using Computer Vision is only accurate up to a scale. Estimating this scale is difficult. Possible solutions include:

wiki/sensing/easy-handeye.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
date: 2024-05-01
3+
title: Hand-Eye Calibration with easy_handeye
4+
---
5+
*[Easy Handeye](https://github.com/IFL-CAMP/easy_handeye)* from the TUM Computer Aided Medical Procedures Lab is an extremely useful tool for calibrating a camera with an arm. There are two types of hand-eye calibration:
6+
7+
- *eye-in-hand* - The camera is mounted on the arm end-effector and it is necessary to determine the static transform between the camera frame and the end-effector.
8+
- *eye-on-base* - The camera is mounted in the workspace of the arm and it is necessary to determine the static transform between the camera frame and the base of the arm.
9+
10+
## Procedure
11+
Print a marker from [ArUco Marker Generator](https://chev.me/arucogen/), be sure to select 'Original ArUco' for the dictionary. Measure the edge length of the marker in meters and record for later. For eye-in-hand calibration, the ArUco marker should be affixed to a static object. For eye-on-base calibration, the ArUco marker should be affixed to the end-effector.
12+
13+
Install aruco ros
14+
15+
```bash
16+
sudo apt-get install ros-noetic-aruco-ros
17+
```
18+
19+
Clone the easy_handeye repository into a new or existing ROS workspace and make the workspace.
20+
21+
```bash
22+
cd catkin_ws/src
23+
git clone git@github.com:IFL-CAMP/easy_handeye.git
24+
cd ../ && catkin_make
25+
```
26+
27+
Select one of the [example launch files](https://github.com/IFL-CAMP/easy_handeye/tree/master/docs/example_launch), move it to `easy_handeye/easy_handeye/launch`. This launch file launches the camera, robotic arm, aruco detector, and handeye calibration tool.
28+
29+
If you cannot find a launch file that matches your camera arm configuraiton, you will have to modify an existing one.
30+
31+
Within the launch file, replace the camera and arm launch commands with the launch commands corresponding to your system.
32+
33+
Within the launch file set the following parameters:
34+
- `eye_on_hand` - True for eye-on-hand, False for eye-on-base
35+
- `marker_size` - The size of your ArUco marker in meters
36+
- `marker_id` - The ID of your ArUco marker
37+
- `tracking_base_frame` - The RGB frame of your camera
38+
- `tracking_marker_frame`- The frame of the ArUco marker detection
39+
- `robot_base_frame`- The frame of the base of the robotic arm
40+
- `robot_effector_frame` - The frame of the end effector of the robotic arm
41+
42+
Once all parameters are changed, run the launch file.
43+
44+
```bash
45+
roslaunch easy_handeye <YOUR_LAUNCH_FILE>
46+
```
47+
48+
Move the arm in manual mode to an angle where the camera can see the aruco marker and hit capture. Repeat this 10-20 times for different arm configurations then hit compute. Try to get diverse arm positions. This will give you the translation and rotation of the camera relative to the base or end effector depending on which calibration being performed.
49+
50+
One thing to note is that sometimes this calibration needs to be adjusted manually by hand. If possible, verify the calibration in different arm configurations and adjust the translation and rotation if necessary.
51+
52+
## References
53+
- [Easy Handeye](https://github.com/IFL-CAMP/easy_handeye)

0 commit comments

Comments
 (0)