Repository navigation
Description
Hello Slicer Community,
I have been working with 3D Slicer and using my phone camera for tracking through SlicerIGT and the PLUS Server, following guidance and watching a video on https://youtu.be/MOqh6wgOOYs . But when I try with the phone camera, I am unable to see the tracking in 3D. I would like to know if it is possible to achieve 3D tracking using the phone camera too, or do I just need a webcam?
AIM: Using Phone Camera for Tracking in SlicerIGT and PLUS Server.
Software Set up:
Step 1: Set up my phone as a webcam
Since I am using an Android device (Pixel 6), here are the steps:
- Install IP Webcam from the Play Store.
2. Open the app and scroll to the bottom.
3. Tap "Start server." We will see an IP address like http://192.168.1.10:8080/video.
- Ensure your phone and PC are on the same Wi-Fi network.
Step 2: Start the IP Camera Server
- Open the app → Scroll to bottom → Tap Start server
- The app will display a URL like:
- http://192.168.0.105:8080/video
Fig1 :This URL streams live MJPEG video from my phone's camera.
I can now see the live video feed from my Pixel 6 camera!
Step 3: Show tracked pen (ARUCO_mip_36h12) inside 3D Slicer in real time
- Printed ARUCO_mip_36h12
- I cut and tape it to my pen and cup
Fig 2: cut and tape it to my pen and cup, PatternWidthMm="40.0"
Step 4: Run PLUS with Config file: Pixel6PenTrack.xml
<PlusConfiguration version="2.8" ( I have version 2.8)
<DataCollection StartupDelaySec="1.0" CollectionDuration="0">
<DeviceSet>
<DataSources>
<!-- MJPEG video from Pixel 6 IP Webcam -->
<DataSource Type="Video" Id="PixelStream" PortUsImageOrientation="MF">
<MJPEGVideoSource Url="http://192.168.200.57:8080/video" /> ( I have changed here my IP address)
</DataSource>
<!-- AprilTag Tracker on pen -->
<DataSource Type="Tool" Id="PenTool" PortName="Video" TrackerBufferSize="30" ToolReferenceFrame="Tracker">
<Filters>
<Filter Type="vtkPlusOpenCvAprilTagTracker" ToolId="PenTool" PatternWidthMm="40.0" />
</Filters>
</DataSource>
</DataSources>
<Devices>
<Device Id="PixelVideoDevice" Type="VirtualCapture" SourceId="PixelStream">
<OutputChannels>
<OutputChannel Id="VideoOutput">
<VideoDataSource Id="PixelStream" />
</OutputChannel>
</OutputChannels>
</Device>
<Device Id="PenTagTracker" Type="VirtualTracker">
<InputChannels>
<InputChannel Id="VideoInput" VideoDataSourceId="PixelStream" />
</InputChannels>
<OutputChannels>
<OutputChannel Id="TrackedOutput" Tools="PenTool" />
</OutputChannels>
</Device>
</Devices>
</DeviceSet>
</DataCollection>
<CoordinateDefinitions>
<Transform From="Tracker" To="Reference" Matrix="1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1" />
</CoordinateDefinitions>
<OpenIGTLink>
<Server Address="127.0.0.1" Port="18944" />
</OpenIGTLink>
</PlusConfiguration>
Step 5: Open Slicer 5.6.2 and Connect
- Open 3D Slicer
- Go to Modules > PLUS Remote
- Enter connection details:
- Hostname: localhost
- Port: 18944
- Click Start
Step 6 : View the Tracked Tool in Slicer
It shows that no devices were created and the data collector failed. I have found the error here. Basically, I have not seen the tracking in Slicer
Suggestion: Could you please guide me and take some time to help me solve this issue?
Thank you.
Best Regards,
Chayanika Devi



Activity
Sunderlandkyl commentedon Apr 24, 2025
The VirtualCapture device is only for recording an existing video source.
You can try connecting to the camera using the OpenCV device:
http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceOpenCVVideo.html
Chayanika-Devi commentedon Apr 24, 2025
Thank you so much Kyle for this resources. I will get back to you soon. Again, thank you for your time and guidance