jbienzms / HoloLensARToolKit

Marker tracking using the front-facing camera of HoloLens and Unity3D, with a wrapper of ARToolKit built for UWP (Windows Universal Platform)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HoloLens with ARToolKit v0.2

Author: Long Qian

Date: 2017-07-16

Overview

HoloLensARToolKit is a successful experiment to integrate ARToolKit (v5.3.2) with HoloLens, or generally UWP (Universal Windows Platform). With fiducial marker tracking provided by ARToolKit, plus the indoor localization of HoloLens, many Augmented Reality applications would be made possible.

This repository contains:

  • ARToolKitUWP/: Wrapper of ARToolKit5 for UWP
  • ARToolKitUWP-Unity/ or ARToolKitUWP.unitypackage: Unity package to interface the native library
  • HoloLensARSample/: Some sample Unity scenes to demo the use of them
  • HoloLensCamCalib/: Link to camera calibration of HoloLens

What's new in v0.2?

HoloLensARToolKit v0.2 involves a re-write of video pipeline, taking advantage of Windows.Media.Capture APIs. Compared to v0.1 where the frame data is achieved via Unity WebcamTexture, Windows UWP APIs provide direct access to video control.

The current implementation uses .NET Task-based Asynchronous Pattern widely, to parallelize video capture, tracking, and Unity rendering. The dependency between each module is loosened. HoloLensARToolKit v0.2 is able to achieve: rendering at 45-60 fps, video capture at 30 fps, and tracking at 25-30 fps performance.

In addition, matrix code mismatch issue is fixed, and coordinate system representation is more consistent.

Example

The following example videos are taken with HoloLensARToolKit v0.1.

Minion on the Cube (Youtube Video) HoloLensARToolKit Samples (Youtube Video)

Run the sample

  1. Make sure you have HoloLens development tools installed.
    • HoloLens Emulator and Vuforia are not required.
    • Visual Studio 2017 is preferred.
  2. Launch Unity3D, open project folder HoloLensARSample.
    • Unity 5.6.x is preferred.
  3. Import the unity package ARToolKitUWP.unitypackage.
  4. Open one of the sample scenes
    • Assets/Sample/HoloLensARToolKitSingle.unity
    • Assets/Sample/HoloLensARToolKitCube.unity
    • Assets/Sample/HoloLensARToolKitMulti.unity
    • Assets/Sample/HoloLensARToolKitCoords.unity
  5. Configure HoloLens deployment settings and deploy to HoloLens.
    • See Chapter 4 and 5 of Holograms 100.
    • Make sure "Allow Unsafe Code" is checked in the project Assembly-CSharp.
    • Deploy using Release|x86|Start Debugging to see Debug logs.
    • Deploy using Release|x86|Start Without Debugging to maximize the performance.
  6. Prepare the correspondent printed marker of ARToolKit.
    • Marker images are Here.
    • Make sure the printed marker size is same as configured in Unity.
  7. Move the marker around and see the effect.
    • HoloLens clicker or air tap is able to disable and enable video preview. Disabled preview accelerates the rendering.

Compatibility Tested

  1. Unity 5.6.0f3
  2. Visual Studio 2017 (Toolset v141)
  3. ARToolKit 5.3.2
  4. Windows 10 SDK 10.0.10240.0 to 10.0.14393.0

Understand HoloLensARToolKit v0.2


Academic Citation

Coming soon.


License

HoloLensARToolKit is composed of two separate projects: ARToolKitUWP and ARToolKitUWP-Unity (including samples). Both of them are open for use in compliance with GNU Lesser General Public License (LGPL v3.0). Please see COPYING and COPYING.LESSER for license details.

ARToolKitUWP is a modified version of ARToolKit, statically links against ARToolKit binaries, and therefore complies with the license restrictions of ARToolKit (see details).

About

Marker tracking using the front-facing camera of HoloLens and Unity3D, with a wrapper of ARToolKit built for UWP (Windows Universal Platform)

License:GNU Lesser General Public License v3.0


Languages

Language:C 80.7%Language:C++ 8.6%Language:C# 8.3%Language:Objective-C 1.7%Language:Makefile 0.8%