Log in or register to post comments

[Performances] Two trackables

August 13, 2012 - 1:18pm #1

Hi all,

I need to detect two trackables in my game, but once they are detected, I turn off the second trackable to gain some framerate.
But in fact I've a better framerate with two trackables followed !

Two trackables: Around 25~28ms for the Qualcomm routine.

One trackable: Aound 30~40ms for the Qualcomm routine.

I was expecting maybe the same framerate, but not more ! Should I change the ARCamera configuration after desactivating the second trackable? For example the Max Simultaneous Image Targets to 1, desactivate the multi frame, etc...

Any clue? Thanks ! 

[Performances] Two trackables

August 14, 2012 - 7:47am #6

Yes that's likely due to the fact that a lesser proportion of the target's features are within the FOV of the camera, so they're not being captured.

[Performances] Two trackables

August 14, 2012 - 6:54am #5

Oh, and another thing I discovered, 
closer I'm to the trackable, longer the AR routine will take to execute.

When I'm on limit of detecting distance I've 20ms for the AR routine, but when I'm as close as possible,I've 40ms+ (iPad3).
I think this is expected, if the trackable on screen is bigger the image analysis will take more time to found the trackable, I guess (with my poor skill in image analysis).

[Performances] Two trackables

August 14, 2012 - 6:45am #4

Using this function (work for both editor and iOS):

Quote:

void TrackerEnable(string trackName, string objectName, bool enable)

{

ImageTracker imageTracker = (ImageTracker)TrackerManager.Instance.GetTracker(Tracker.Type.IMAGE_TRACKER);

if(imageTracker == null)

{

//on editor mode

GameObject.Find(objectName).SetActiveRecursively(enable);

return;

}

        DataSet dataSet = imageTracker.GetActiveDataSet();

 

// Disable all Trackables.

        int numTrackables = dataSet.GetNumTrackables();

        for (int i = 0; i < numTrackables; ++i)

        {

TrackableBehaviour trackable = dataSet.GetTrackable(i);

if (trackable != null && trackable.TrackableName == trackName)

{

trackable.enabled = enable;

}

}

}

 

trackName is the name of the trackable I keep from the trackable detection.

objectName is the name of the gameObject itself.

 

Edit: I tried this:

Quote:

QCAR.SetHint(QCAR.QCARHint.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS,  1);

QCAR.SetHint(QCAR.QCARHint.HINT_IMAGE_TARGET_MULTI_FRAME_ENABLED,  0);

 

It seems working, but I can't be sure.

[Performances] Two trackables

August 13, 2012 - 7:47pm #3

Those values can only be set for initialization. Your other results are interesting. How are you disabling that 2nd trackable?

[Performances] Two trackables

August 13, 2012 - 1:28pm #2

It seems I don't have access to MaxSimultaneousImageTargets and MultiFrameEnabled fields, how can I change this on real-time (Is this possible?)

Log in or register to post comments