This software was described in: "Image-Guided Navigation: A Cost Effective Practical Introduction using the Image-Guided Surgery Toolkit (IGSTK)", Ö. Güler, Z. Yaniv, IEEE EMBC, 2012. |
To enable the use of your computer's camera as a tracking device we first need to calibrate it. The calibration process is straightforward and only requires acquisition of several images.
To calibrate your camera you will need to follow the four step process described below:
Print the calibration and validation patterns (*.pdf). Make sure that the square size in the validation pattern is 30mm.
Press the "Start Camera" button (shortcut key: [s]) to initialize the camera.
Position the calibration grid in front of the camera and press the "Capture" button (shortcut key: [space]).
Take five or more images of the calibration pattern in different orientations and positions. The more images the more accurate the calibration.
All images are saved to a temporary subdirectory where the programs were installed (tmp). You can delete this directory after calibration.
Press the "Calibrate" button (shortcut key: [c]). A file selection dialog opens and you need to select five or more images of the calibration pattern. The pattern is detected in each of the images and the result is displayed in a popup window which is automatically closed. If the pattern is successfully detected in enough images then the camera is calibrated and the result is saved in a file named "cameraCalibration.yml" in a subdirectory where the tutorial was installed (Configuration).
Position validation grid in front of the camera and press "Validate" button (shortcut key: [v]). If the validation pattern is detected in the image, a popup window will open and the estimated distance between two of the pattern's squares will be overlaid onto the image. This should be approximately 60mm. If this varies significantly from the expected value then the calibration is not accurate enough and should be repeated.
[s] | Start camera |
[space] | Capture video frame |
[c] | Calibrate camera |
[v] | Validate camera calibration |
[h] | Show help dialog |
[q] | Quit Application |