List
Using image recognition as a trigger for events
Posted Date: 2018-05-01 12:54     Edited Date: 2018-05-02 7:54     Writer: inactive

Hi 

I am trying to create an image tracker script which alows sound to play when certain images are recognized, however when looking on your website I found the line of script which reads TrackingResult result = TrackerManager.GetInstance().getTrackingResult();

This results in an error as the TrackerManager libery dose not contain the defenision of "getTrackingResult()";

Would it be possible to get a working function which tests the current image being tracked and returns its name and other traker infomation so i can create a method to play sound and other events when certain images are being tracked.

Kind Regards,

Richard.

 

Posted Date: 2018-05-02 7:54     Edited Date: 2018-05-02 7:54     Writer: inactive

I'm sorry that we missed to update document updating.

Correct code is like below and you should find it our sample project.

TrackingState state = TrackerManager.GetInstance().UpdateTrackingState();
TrackingResult trackingResult = state.GetTrackingResult();

for (int i = 0; i < trackingResult.GetCount(); i++)
{
    Trackable trackable = trackingResult.GetTrackable(i);
    imageTrackablesMap[trackable.GetName()].OnTrackSuccess(
    trackable.GetId(), trackable.GetName(), trackable.GetPose());
}

We will fix it ASAP.

Thank you for letting us know document error.

Jack

SDK Team, Maxst