Log in or register to post comments

app start to crazy over not marked sites

July 28, 2011 - 2:30pm #1

Hello
I created app based on ImageTarget sample
I've magazine with 50 pages and 25 of them are Trackables (whole A4 pages)
All 4*/5 some of them 5/5 :)

And all is great when I focus my Mobile Camera on one of the "marked" sites.
Then I have for example Cube rendered over the page and some other stuff

But when I "watch" at almost all from rest unmarked pages my app start to crazy. Cube and other stuff blinked on screen.

My question is there a way to painlessly for fluent work test more then one time that camera view is over trackable ? I tried to use sleep() 100ms for example and test again but whole app then stop and its look terrible.
Maybe there is a way to "config" QCAR params to force him to wait more time before decide that we look at correct trackable ?

My current code:

if ( state.getNumActiveTrackables() == 0 ){
	jclass clazz = env->GetObjectClass(obj);
	jmethodID getObjectTrackedMethodID = env->GetMethodID(clazz,"ObjectTrackedNone", "()I");
	env->CallIntMethod(obj, getObjectTrackedMethodID );
}
else{
        GLfloat vbVertices[96];
        unsigned char vbCounter=0;
	// Get the trackable:
	const QCAR::Trackable* trackable = state.getActiveTrackable(0);
	QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(trackable->getPose());        

	// Choose the texture based on the target name:
	jstring name = env->NewStringUTF(trackable->getName());
	jclass clazz = env->GetObjectClass(obj);
	jmethodID getObjectTrackedMethodID = env->GetMethodID(clazz,"ObjectTracked", "(Ljava/lang/String;)I");
	env->CallVoidMethod(obj, getObjectTrackedMethodID, name );
			
	const Texture* const thisTexture1 = textures[1];

	#ifdef USE_OPENGL_ES_1_1
	  // RENDER
	#else
          RENDER
	#endif
}
 

Thx for any help or sugestions

Re: app start to crazy over not marked sites

July 29, 2011 - 12:28am #3

Ok thats great news.

Can You tell me only what do you meen "soon"? days or weeks ? :)

Re: app start to crazy over not marked sites

July 28, 2011 - 7:45pm #2

We have an update coming out soon that should address the issue of false positives. I would suggest holding tight until that is available, and let us know if it helps!

Just FYI, I wouldn't suggest sleeping the rendering thread. It is also responsible for rendering the camera image, and you want that to look fluid.

- Kim

Log in or register to post comments