This project contains the source code for tracking passive IR sphere markers using only the HoloLens 2 AHAT Sensor.
- Easy-to-use tracking of retro-reflective marker arrays using the HoloLens 2 research mode
- Simultaneous tracking of multiple markers (tested with up to 5, can theoretically support a lot more)
- Support for partial marker occlusion - define marker arrays with 4 or more fiducials, keep tracking even when some are occluded (min. 3 visible at all times)
- Support for spherical markers and flat marker stickers
- Support for different marker types and sphere diameters to be tracked simultaneously
- Filter 3D fiducial world positions using Kalman Filters
- Filter marker array world position and rotation using low-pass filtering
Check out the Unity Sample application provided here: https://github.com/andreaskeller96/HoloLens2-IRTracking-Sample/
- Follow steps described in OpenCV/README.md to compile OpenCV 4.8.0 from source
- Open
HL2IRToolTracking.vcxproj
using Visual Studio - Set the build target to
Release
and the target architecture toARM64
- Save the solution
- Build the solution
- Copy
Out/HL2IRToolTracking.winmd
andHL2IRToolTracking.dll
to your Unity Project'sAssets/.../Plugins/WSA/ARM64/
folder - Copy the contents of the
UnityBindings/
folder to your Unity Project'sAssets/.../Scripts
folder - Setup scene like the scene included in the sample: https://github.com/andreaskeller96/HoloLens2-IRTracking-Sample/
- Make sure to enable Research Mode on your HoloLens 2 device
- Build the project in Unity
- Open the resulting solution in Visual Studio
- Build and run the solution in
Release
mode onARM64
architecture, and deploy toRemote Device
, setting the device name or ip address in the debug settings
Special thanks to Wenhao Gu for his hololens plugin project that served as a basis for this project: https://github.com/petergu684/HoloLens2-ResearchMode-Unity
This project also makes heavy use of opencv and the open source libraries included therein.
This project is provided under MIT license.
If you use this project or create your own derivatives, please cite the following BibTeX entries:
@misc{keller2023hl2irtracking,
author = {Andreas Keller},
title = {HoloLens 2 Infrared Retro-Reflector Tracking},
howpublished = {\url{https://github.com/andreaskeller96/HoloLens2-IRTracking}},
year = {2023}
}
A. Keller, HoloLens 2 Infrared Retro-Reflector Tracking. https://github.com/andreaskeller96/HoloLens2-IRTracking, 2023. [Online]. Available: https://github.com/andreaskeller96/HoloLens2-IRTracking
@ARTICLE{10021890,
author={Martin-Gomez, Alejandro and Li, Haowei and Song, Tianyu and Yang, Sheng and Wang, Guangzhi and Ding, Hui and Navab, Nassir and Zhao, Zhe and Armand, Mehran},
journal={IEEE Transactions on Visualization and Computer Graphics},
title={STTAR: Surgical Tool Tracking using Off-the-Shelf Augmented Reality Head-Mounted Displays},
year={2023},
volume={},
number={},
pages={1-16},
doi={10.1109/TVCG.2023.3238309}}
A. Martin-Gomez et al., “STTAR: Surgical Tool Tracking using Off-the-Shelf Augmented Reality Head-Mounted Displays,” IEEE Transactions on Visualization and Computer Graphics, pp. 1–16, 2023, doi: 10.1109/TVCG.2023.3238309.