Log in or register to post comments

Latency

August 19, 2011 - 10:16pm #1

Is there any way for the QCAR team to improve the latency between the camera and the image on the screen? There is a visible delay and in my opinion it is significant. If you look at the preview screen of the build-in camera (what you use to make pictures) you can see that it is very snappy. Rapid camera movements are translated to the preview screen very rapidly. However, if you enable QCAR, the picture on the screen is very laggy.

I understand that it takes time to process the camera image to detect the markers. But QCAR can do that at 30fps so where does the 0.2s or so delay come from?

Re: Latency

August 30, 2011 - 7:26pm #9

I haven't experimented with those variables yet. But I tried it on a Tegra2 tablet running Android 3 and it is much more responsive. So I am sure it is a hardware issue.

Re: Latency

August 27, 2011 - 3:53pm #8

Have you experimented with the max simultaneous and multiframe hints?

// TrackerBehaviour.cs

private enum QCARHint
{
// Specify the number of Image Targets that are handled by the tracker
// at once.
HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS = 0,
// Detection of Trackables is continued in the next frame if they could
// not be found within a certain time interval.
HINT_IMAGE_TARGET_MULTI_FRAME_ENABLED = 1,
// Specifies the maximum time the detector should look for Trackables.
HINT_IMAGE_TARGET_MILLISECONDS_PER_MULTI_FRAME = 2,
}

I've got the HTC N1 (2.3.4) and can observe some latency in the camera preview even without QCAR involved. This becomes pronounced when there's any sort of exposure or white balance correction going on. But both are actually more efficient in their 'auto' modes. Similarly Auto focus demonstrates less latency than Infinity. This suggests to me that the camera is exploiting some form of hardware optimization for these modes.

How quickly are you moving the camera and/or target in these experiments? I can get up to about 1 meter per second before the latency becomes too conspicuous, even when QCAR is attempting to detect targets.

Re: Latency

August 27, 2011 - 6:25am #7

I changed the setting to optimize for speed in Unity. Didn't make much difference though. Maybe it's a limitation of the device indeed. I'll try on a dual core later. Does QCAR make use of more then one processor?

Re: Latency

August 25, 2011 - 5:03pm #6

Hello,

Performance does depend on the device being used. You should see background rendering speed increase while the target is detected vs. when the target is not detected. You can also try changing the settings from Mode_Default to Mode_Optimize_Speed in the ImageTargets.cpp file is that is the sample app you are working with.

Thank you,

-Peter

Re: Latency

August 23, 2011 - 8:14pm #5

Android version 2.3.4

Re: Latency

August 22, 2011 - 6:31pm #4

Hello,

What version of Android is your Nexus S running?

Thank you,

-Peter

Re: Latency

August 21, 2011 - 5:19am #3

Hi Peter,

I am using the Samsung (Google) Nexus S.
QCAR version 1.0.6
Environment Unity 3.3, PC

The latency is the same with the sample apps. I tried it as well on an HTC phone. Not sure which one, but I do know that one is faster. Much less latency there. So maybe it is hardware dependent...

Re: Latency

August 20, 2011 - 9:02am #2

Hello,

There should not be a significant delay if any. Which device, QCAR version, and development environment are you using? Also do you see this behavior with the Sample Apps as well?

Thank you,

-Peter

Log in or register to post comments