Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Commit d877d2c

Browse files
authored
Merge pull request #32 from Foxman13/master
PR to merge in my HoloLens-Reprojection sample
2 parents f54dffd + bf45882 commit d877d2c

98 files changed

Lines changed: 28651 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
19.2 KB
Loading
22.6 KB
Loading
324 KB
Loading
122 KB
Loading
175 KB
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# HoloLens Reprojection
2+
This sample project demonstrates how you can use the HoloLens LocatableCamera to project 2D image analysis results back into world space to add a visualization to the objects detected.
3+
4+
The user snaps a photo with the front-facing web camera on HoloLens and then posts it to an inference pipeline for object detection and classification.
5+
6+
## References
7+
8+
* [LocatableCamera](https://docs.microsoft.com/en-us/windows/mixed-reality/locatable-camera)
9+
* [LocatableCamera in Unity](https://docs.microsoft.com/en-us/windows/mixed-reality/locatable-camera-in-unity)
10+
* [Custom Vision Tutorial](https://docs.microsoft.com/en-us/windows/mixed-reality/mr-azure-302b#chapter-6---create-the-customvisionanalyser-class)
11+
* [How to build a custom classifier with Custom Vision](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/getting-started-build-a-classifier)
12+
13+
## Prerequisites
14+
15+
* [Unity 2018.3.3 or greater](https://unity3d.com)
16+
* [Visual Studio 2017](https://visualstudio.microsoft.com/)
17+
* [Windows 10](https://www.microsoft.com/en-us/software-download/windows10)
18+
* A HoloLens
19+
20+
## Setup
21+
22+
I got started by training a custom vision classifier on http://customvision.ai. (see above for how to get started)
23+
24+
For my sample, I create a model to detect coffee mugs and classify them.
25+
26+
![Tagging in Custom Vision](Images/tag.jpg?raw=true)
27+
28+
You will need to create a train your own model on the Custom Vision portal, or roll your own inference pipeline and integrate the reporjection components into your project.
29+
30+
Once you publish the iteration that you're happy with, you will input that URL and the Prediction Key value into the CustomVisionServiceConfig object.
31+
32+
![CustomVisionServiceConfig](Images/customvisionserviceconfig.jpg?raw=true)
33+
34+
Then, it will need to be set on the SceneController component.
35+
36+
![Set the config](Images/customvisionserviceconfig_set.jpg?raw=true)
37+
38+
That should be all you need to do. Don't forget to setup your HoloLens project settings and then build out to Visual Studio.
39+
40+
## Screenshot
41+
42+
![screenshot](Images/hololens_screenshot.jpg?raw=true)
43+
44+
If you find any issues with the sample, please submit an issue. Thank you!

Standalone-Samples/HoloLens-Reprojection/src/Assets/Audio.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Standalone-Samples/HoloLens-Reprojection/src/Assets/Audio/Button_Press.wav.meta

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Standalone-Samples/HoloLens-Reprojection/src/Assets/JsonDotNet.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)