Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Problem using ImageTags from Holotoolkit

I'm trying to use some functions from HoloToolkit, where no examples in Holotoolkit-Unity exists:

ImageTagLocation, ImageTagLocationListener and so on..

So far I managed some implemantion in Unity, but I'm stuck on detecting ImageTags ...

In my case, the Imagetaglistener fires an Event for OnTagLocatingCompleted() but not for OnTagLocated().

Has anybody an example of using the Holotoolkit for detecting ImageTags (AprilTags ...) ?

Answers

  • Options

    What library are you using that defines ImageTagLocation and ImageTagLocationListener?

    I've been using Vuforia with great success on the HoloLens, but I'm always interested in knowing what the options are.

    Our Holographic world is here

    RoadToHolo.com      WikiHolo.net      @jbienz
    I work in Developer Experiences at Microsoft. My posts are based on my own experience and don't represent Microsoft or HoloLens.

  • Options

    I'm using the SharingClient.dll (from Holotoolkit) which is exposed thru the Holotolkit-Unity (HoloToolkit.Sharing;).
    There are several classes which I'm using.
    I subclassed the ImageTagLocationListener ... but I'm not sure, if it really works

    My ImageTagDetector.cs:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using HoloToolkit.Sharing;

    public class ImageTagDetector : ImageTagLocationListener
    {
    public event System.Action TagLocatedEvent = null;
    public event System.Action TagLocatingCompletedEvent = null;

    public ImageTagDetector()
    {
    
    }
    
    public override void OnTagLocated(ImageTagLocation location)
    {
        Debug.Log("Tag located.");
        if (this.TagLocatedEvent != null)
        {
            TagLocatedEvent(location);
        }
    }
    
    public override void OnTagLocatingCompleted()
    {
        Debug.Log("Tags completed.");
        if (this.TagLocatingCompletedEvent != null)
        {
            TagLocatingCompletedEvent();
    
        }
    }
    

    }

    And what I've done..

    ...
    private ImageTagManager itm = null; //from Holotoolkit.Sharing
    private ImageTagDetector td = null; //my subclassed ImageTagLocationListener

    ...

    td = new ImageTagDetector();
    td.TagLocatedEvent += this.onTagLocated;
    td.TagLocatingCompletedEvent += this.onAllTagsCompleted;

    //texDat are the pixels (byte[])
    bool b = itm.FindTags(texDat1, tex.width, tex.height, 1, td);

    void onTagLocated(ImageTagLocation location)
    {
    }

    void onAllTagsCompleted()
    {
    }
    

    If I'm looking into the source it seems the workerThread does'nt work ...
    It would be that good to have an example project / scene in Holotoolkit-Unity.

  • Options

    And:
    ... I'm also using Vuforia with success but sometimes it would be good to have an alternative for simple markers (VuMarks are an option but FrameMarkers are obsolete) ...

Sign In or Register to comment.