# How to set up real-time position tracking of tools using 2D barcodes

**URL:** <https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985>\
**Category:** Support\
**Tags:** surgical-navigation\
**Created:** [September 4, 2018, 2:37pm UTC](https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985 "2018-09-04T14:37:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamrul079](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kamrul079/32/2059_2.png) [@kamrul079](https://discourse.slicer.org/u/kamrul079)\
**Post date:** [September 4, 2018, 2:37pm UTC](https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985/1 "2018-09-04T14:37:49Z")

</div>

I had used the same steps to calibrate the camera using the printed out markers and add connection with OpenIGTLinkIF successfully. After that, I did not find any direction that what should I need to do to track an object in real time. What are the steps? How to create let’s say this water glass model and then track in real time?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 4, 2018, 3:36pm UTC](https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985/2 "2018-09-04T15:36:56Z")

</div>

If you go to Transforms module, you should see transforms showing up as soon as you put markers in the camera’s field of view. If you use the demo configuration file then you have to have at least a reference marker and some tool markers in the field of view simultaneously.

If you have the transforms then you need to calibrate your tools and set up visualization as explained in [SlicerIGT tutorials](http://www.slicerigt.org/wp/user-tutorial/).

---

<div class="post-metadata">

**Author:** ![kamrul079](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kamrul079/32/2059_2.png) [@kamrul079](https://discourse.slicer.org/u/kamrul079)\
**Post date:** [September 4, 2018, 4:22pm UTC](https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985/3 "2018-09-04T16:22:45Z")

</div>

Don’t I need the pivot calibration?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 4, 2018, 6:38pm UTC](https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985/4 "2018-09-04T18:38:24Z")

</div>

You need to calibrate your tools, i.e., determine transform between coordinate system of the tool’s model and coordinate system of the attached barcode. For pointer-like tools, you can compute this transform using pivot calibration.
