Overview • 3rd Party Dependencies • Getting Started • Acknowledgements • Appendix
This is the C++ DLL used for the image-processing and tool-pose estimation used by the system reported in our publication: Semi-Automatic Infrared Calibration for Augmented Reality Systems in Surgery[^1] by Hisham Iqbal & Ferdinando Rodriguez y Baena.
This project is a Windows Runtime Component (C++/WinRT)[^2] DLL designed to enable the HoloLens 2 to detect the presence of tools equipped with IR-reflective markers. The resulting .dll
and .winmd
files can be copied and easily consumed on a C# Unity app (see HL2-DINO-Unity
for example).
[!NOTE] The
experimental
branch includes new features that are under development and may require further testing and refinement. Any significant commits are highlighted below.
Change | Description |
---|---|
Commit a8082fe |
Added support for spherical passive markers by parsing the marker_radius_m key in the JSON config and iteratively using different radii to compute tool poses in Holo2IRTracker.cpp |
The classes in this project are designed to carry out the following tasks:
For more details on each class, check out the docs!
Libraries/Headers | Note |
---|---|
ResearchModeAPI.h |
From the HoloLens2ForCV project on GitHub |
OpenCV 4.9.0 |
Compiled for compatibility with UWP applications[^3]. Static libraries included within this project |
Eigen |
Header-only matrix library with no extra compilation required |
Shiny-UWP |
Used for gathering profiler data.[^4] Static libraries included. |
See the NOTICE file in the repo for more details.
[!TIP] Shiny-UWP is optional and can be removed altogether if you are not interested in this info.
git clone https://github.com/HL2-DINO/DINO-DLL.git
HL2DinoPlugin.sln
, set project configs to Release
and ARM64
experimental
branch or make any changes to the source code as you wish[Build] -> [Build Solution]
.dll
and .winmd
from the ARM64/Release/HL2DinoPlugin/
folder into your Unity project inside the folder Assets/Plugins/WSA
To see how to set up a sample Unity project, check out the DINO-Unity
repositories.
You can use this project as is to build a .dll
and .winmd
in your Unity project. If you wish to make alterations to the source code to insert your own algorithms, then make any necessary adjustments, and compile for Release
and ARM64
architecture.
Two outputs of this process (HL2DinoPlugin.dll
& HL2DinoPlugin.winmd
) will be contained in ARM64/Release/HL2DinoPlugin
. These need to be copied over to your Unity project structure inside the folder Assets/Plugins/WSA
.
If this project is useful for your research or work, please considering citing the following publication:
@inproceedings{Iqbal2022,
author = {Hisham Iqbal and Ferdinando Rodriguez y Baena},
journal = {2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2022)},
title = {Semi-Automatic Infrared Calibration for Augmented Reality Systems in Surgery},
year = {2022},
}
Thanks go out to:
The design of the DLL in this project was based on some very useful open-source projects which are really worth exploring for your own research:
[!NOTE] Gear Icon in repository logo created by Freepik - Flaticon
There are some additional features which have not been implemented yet to expedite the process of open-sourcing.
TO-DO's on the DLL side:
[ ] Move away from detecting contours every single frame
In this version, blob/contour detection runs every frame, which is the most time consuming part of the image processing loop. By using tracking algorithms to lower the frequency of detection, we could potentially get some performance gain.
[ ] Integrate filtering into the processing of the noisy sensor data.
Noise in the sensor data (infrared response / computed depth) results in noisy estimates for tool pose. This could be tackled with simple low-pass filters added to each TrackedTool struct, or an implementation of Kalman filters incorporating data from other streams of the HoloLens (visual light environmental cameras, IMU data).
[ ] Adding support to process data in millimetres and metres.
The internal processing and exposed outputs of pose estimation is done entirely with metres. With some small scaffolding in the code, we can support doing this in millimetres. At present, you can pass in tool config data as millimetres, but it's converted into metres before it reaches the DLL.
This project is licensed under the BSD License.
[^1]: Iqbal H., Rodriguez y Baena, F. (2022) Semi‑Automatic Calibration for Augmented Reality Systems in Surgery. 2022 IEEE/RSJ International Conference on Intelligent Robots and Systems https://dx.doi.org/10.1109/IROS47612.2022.9982215
[^2]: The project was built using a Windows Runtime Component (C++/WinRT) project template on Visual Studio 2019. See this tutorial for a reference on how to set up your own project.
[^3]: If you want to re-compile OpenCV with different flags or for a different major version, it is highly recommended you follow the instructions found in this project README written by Andreas Keller. Some more reading on the topic can be done here and here
[^4]: A forked repository of the original Shiny Profiler.