Log in or register to post comments

Duplicate Image Tracking

September 20, 2019 - 9:26am #1

I am trying to track 5 image targets that all have the same image. I know this functionality is not supported by Vuforia. However in my research I have found that uploading the same image multiple times can allow an application to track duplicate image targets. The issue I am running into is overlapped image targets. 

In my setup I have a controller that listens to the state change of my 5 duplicate image targets. When an image target gets tracked it informs the controller, and gets added to a list of tracked image targets. If the new image target's position is close to an existing tracked target we know that we are tracking the same physical image target. At this point I can disable the overlapping object, however when I go to scan the 5th image target it can never be scanned because Vuforia is tracking it on the incorrect image.

I am looking for a way to either:

  • Prevent Vuforia from tracking image targets that appear to be on top of each other
  • Disable/enable a specific image target within Vuforia

What I have tried:

  • Forcing the duplicate image target to stop being tracked. But this doesn't propagate up to Vuforia and behind the scenes it is still tracking this image target. 
    object.GetComponent<TrackableBehaviour>().OnTrackerUpdate(TrackableBehaviour.Status.NO_POSE, TrackableBehaviour.StatusInfo.UNKNOWN);
  • Restarting the tracker manager. I was hoping that this would joggle Vuforia's image tracking causing it to recalculate the tracked images. It was still stuck in it's ways.
    IEnumerator RestartTracker()

    {

        TrackerManager.Instance.GetTracker<ObjectTracker>().Stop();

        yield return new WaitForSeconds(1f);

        TrackerManager.Instance.GetTracker<ObjectTracker>().Start();

    }
  • Changing the number of image targets that Vuforia can track at one time. This method works around 50% of the time. This is a start but needs to be better. The tracking number is set to one less than the number of tracked image targets(assumes that the problem target is at the end of the tracked images list)

    IEnumerator ToggleTracking(int trackingNumber)

    {

        VuforiaUnity.SetHint(VuforiaUnity.VuforiaHint.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, trackingNumber);

        yield return new WaitForSeconds(1f);

        VuforiaUnity.SetHint(VuforiaUnity.VuforiaHint.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 10);

     }

Other possible solutions:

  • Editing the Vuforia DLLs to add the image tracking logic to prevent tracking image targets that have the same location. (This sounds like a last ditch effort, and extremely difficult)
  • Trying to dynamically add and remove individual image targets from the database, forcing Vuforia to stop recognizing a problem image target, giving it a chance to detect that image target on a different image.
  • Any kind of call to stop Vuforia from identifying a given image target. Something like this must exist, but I haven't found it in the API yet.
  • Have more image targets. This will allow us to disable problem targets, but still capture all 5 targets. Obviously this is a last ditch option, because it will tank performance. 
  • Use ARCore and AKKit instead of Vuforia.

I'm looking for other potential solutions that I haven't tried, and pointers on how to implement any of my possible solutions.

Log in or register to post comments