# Webcam-based marker tracking is available in Slicer now

**URL:** <https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565>\
**Category:** Support\
**Tags:** surgical-navigation, feature\
**Created:** [June 23, 2017, 8:35pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565 "2017-06-23T20:35:40Z")\
**Posts on this page:** 13\
**Page:** 1

<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:** [June 23, 2017, 8:35pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/1 "2017-06-23T20:35:40Z")

</div>

While 3D Slicer - using SlicerIGT/Plus - have been supporting real-time position tracking using high-end devices (optical trackers, electromagnetic trackers, surgical navigation system, etc), there has been no ultra-low-cost tracking solution available - until now.

With latest version of Plus toolkit you can connect any webcam, print your own markers, and start tracking objects - and show them in real-time in 3D Slicer.

Many thanks to Mark Asselin at PerkLab for adding this feature!

While the tracking is already reasonable accurate to be suitable for certain applications, we are implementing further improvements during the next couple of months.

See more details of how to set it up in comments of the [YouTube video](https://youtu.be/MOqh6wgOOYs).

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 28, 2017, 9:50am UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/2 "2017-06-28T09:50:43Z")

</div>

Can you please upload the Slicer scene somewhere so that it can be easily tried without having to create each object with CreateModels? It would make it much easier for others to start. Thanks!

---

<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:** [June 28, 2017, 1:17pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/3 "2017-06-28T13:17:22Z")

</div>

Good idea. An example [3D Slicer scene file is available here](https://github.com/PlusToolkit/PlusLibData/raw/master/ConfigFiles/OpticalMarkerTracker/OpticalMarkerTracker_Scene.mrb).

It displays markers that are in this [marker sheet (pdf file, ready for printing)](https://github.com/PlusToolkit/PlusLibData/blob/master/ConfigFiles/OpticalMarkerTracker/marker_sheet_36h12.pdf). You may need to zoom in-out 3D views after you place the markers in the field of view of your camera to make the markers show up.

---

<div class="post-metadata">

**Author:** ![robmbar](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@robmbar](https://discourse.slicer.org/u/robmbar)\
**Post date:** [May 28, 2018, 7:45pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/4 "2018-05-28T19:45:48Z")

</div>

I am having a problem with the device set configuration file in Plus Server Launcher. After choosing the device set “PlusServer: Optical marker tracker using MMF video”, I have followed the example presented here [http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceOpticalMarkerTracker.html](http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceOpticalMarkerTracker.html) to create the file but when launched, an error occurs and the connection fails.  
I am trying to use the built-in webcam of my laptop. Is it possible to upload a different example file for this application? I can’t figure out where is the error. Thanks!

---

<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:** [May 28, 2018, 8:12pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/5 "2018-05-28T20:12:13Z")

</div>

It seems that you need help with getting Plus set up right. To get help on this, please [submit an issue on Github page of Plus](https://github.com/PlusToolkit/PlusLib/issues/new).

---

<div class="post-metadata">

**Author:** ![robmbar](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@robmbar](https://discourse.slicer.org/u/robmbar)\
**Post date:** [May 28, 2018, 8:34pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/6 "2018-05-28T20:34:29Z")

</div>

Thanks for your prompt reply!

---

<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:** [August 31, 2018, 4:55pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/7 "2018-08-31T16:55:46Z")

</div>

I’ve updated the links now (Plus repositories moved since the time of the original post).

---

<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:35pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/8 "2018-09-04T15:35:06Z")

</div>

A post was split to a new topic: [How to set up real-time position tracking of tools using 2D barcodes](https://discourse.slicer.org/t/how-to-set-up-real-time-position-tracking-of-tools-using-2d-barcodes/3985)

---

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [November 2, 2019, 9:54am UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/9 "2019-11-02T09:54:13Z")

</div>

I´m trying to make from scratch my own 3d Slicer scene and I´ve problems creating vector volume image\_image. I´m following SlicerIGT tutorials but i can´t find solution. Thanks!

---

<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:** [November 3, 2019, 2:07am UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/10 "2019-11-03T02:07:19Z")

</div>

Normally you would just let OpenIGTLinkIF module create image and transform nodes for you, but you can certainly create them from your own Python script, too. Here is an example of creating a scalar volume node: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Create\_a\_new\_volume](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Create_a_new_volume). You can create a vector volume node very similarly.

---

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [November 3, 2019, 11:07am UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/11 "2019-11-03T11:07:24Z")

</div>

Thanks Andras, really usefull info.

---

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [November 10, 2019, 3:33pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/12 "2019-11-10T15:33:22Z")

</div>

Little more complex. How can I add a second video source to the scene?  
I have 2 Plus connections with different ports for each device (18944/18945 and 18954/18955). Both successfully connected. I´ve added in OpenIGTLinkIF 2 connectors for the second camera and config properly ports but … i have no Image2-image2 (as I´ve called in Plus xml config file) vectorvolume. OpenIGTLinkIF has not create input volume nor transforms from camera and tracker.  
Is there any way to create them without code?  
Thanks on advance!

---

<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:** [November 14, 2019, 1:56pm UTC](https://discourse.slicer.org/t/webcam-based-marker-tracking-is-available-in-slicer-now/565/13 "2019-11-14T13:56:09Z")

</div>

This should be no problem, if you receive images with different names then the nodes should be created in the scene automatically. If this is still a problem then create a new topic and provide more details (the full Plus config file, etc.).
