Start a new topic

Image Recognition

Image Recognition

1 person has this problem


I am doing my final project of the career. The project is about to recognize with your mobile phone a place that your teacher has done a photo before, so the kids has to go to the same place and with the phone try to recognize the same as their teacher.

Im trying to do it with the client recognition of the native API for android, and i am following the tutorial that wikitude has for 3D tracking. After i finished the following tutorial when i start recording in addition that the recording quality never change to "average" or more than "bad" i dont know if i am doing well. I put as the client3Dtracker a .wtc that i upload before to my own server, and when i start recording with the app the same object that i have in the .wtc the methods:

* onTrackingMapRecordingQualityChanged

* onFinishedSavingTrackingMap

So i would appreciate if u could help me, im a bit stuck.

Hi Sergio,
I'm a bit confused which kind of tracking you are using. You mention .wtc files which are used for 2d tracking as well as 3D tracking where .wtm files are used. In which technology are you interested or which kind of objects should be recognized?

When using 3D tracking, the trackingMapRecordingQualityChanged method is called when recording a .wtm file. This would be the teachers step. Once he clicks 'stop recording', the onFinishedSavingTrackingMap is called to inform you that the recording session was saved successfully. After he recorded a map, the application that is used by the students, needs to load the .wtm file. Both of the previously mentioned methods are then not called anymore, because no .wtm file recording is active when students try to find the target.

If you are interested in 2D tracking (.wtc files), also none of the above mentioned methods are called since they are not related to 3D tracking.

Best regards


Hi Andreas,


Yeah i am using 3D tracking, so i have to change the file to a .wtm. Your answer was so important for me, because now i really now what is the problem in my application.

But now i have a problem, you say that when you start recording and save it to a .wtm file, that is the step that the teacher must do, so the part of the teacher should not have this

in the code: of the student app.

tracker = wikiSDK.getTrackerManager().create3dClientTracker(server);


Because this is the part to the stundent no?

And if it is true, when i start the part of the student app and start filming with the camera, i have to load before the .wtm that the teacher has recorded and with the upper method, create a tracker to that file and if the student watch the same as the teacher the method OnTracking and OnTargetRecognize should be called yeah?

Thank you for you support.

Hi Sergio,
Just one question upfront: Teachers/Students don't code the application, right? You code both applications and provide each user group the final app.

Anyways, the teachers app does the following:
Record a .wtm file which is then exported (Please refer to our documentation on that part), uploaded to a server or packaged within the student application

You can record the .wtm file with the methods provided by the TrackingMapRecorder. This involves all methods regarding tracking map quality and finish saving callback. Please keep in mind that if the tracking map quality does not change to average or good, it is very likely that the recorded object can not be recognized by the student application. To get a better quality, move around the target and record it in various angels.


The students application:
Loads a .wtm file with the method provided by the TrackerManager. The .wtm file can eiter be packaged within the application or loaded from a server. 
Once the student sees the same target as in the .wtm file, TrackerManager methods are called that inform about a recognized target, an updated target or lost target.


Does this help you?

Best regards


About your question, i am the one who code the apps. I dont know yet, if i will do one app with a sign in part to recognize the role of the person who sign or it will be two different applications.

Yeah it helps me, i will try this days, if i have any question i will ask here.


Hi Andreas, im back again.

The teacher app is running perfectly, and i have to say thank you very much.

But im having some troubles with the student part. Once the teacher has already save the .wtm i try to read it from the student part with:

tracker = wikiSDK.getTrackerManager().create3dClientTracker(Keys.RECORDING_NAME + ".wtm");


But i dont know if i have to activate the tracker to start tracking the .wtm and find similarities with the camera of the student, I dont know if i am explaining correctly. 

Once i initialize the tracker in the OnCreate what i have to do to start the recognize

Hi Sergio,
So far you are doing just fine ;) You need to create the tracker as you already written. After it is created, you need to assign a listener to it to receive the 'target recognized', 'target udpated' and 'target lost' callbacks. Please refer to the API documentation for the exact method names. You don't have to manually start the tracker. As soon as the tracker is created, it's active.

Best regards


Hi Andreas,

I have a doubt, in the api native documentation only register that:


_wikitudeSDK.getTrackingMapRecorder().registerTrackingMapRecorderEventListener(new TrackingMapRecorderEventListener() { @Override public void onFinishedSavingTrackingMap(File file) { ... }

But this is to save the tracker, not to start recognizing. After i do this, in the OnCreate method, where and how i have to assign the listener to that tracker, if you can put the line of code to do it or give me the page where i can found it i will be very appreciate.:

tracker = wikiSDK.getTrackerManager().create3dClientTracker(Keys.RECORDING_NAME);


Thank you Andreas for your support.

Hi Sergio,
Line 111 in ClientTracking3DActivity has the answer for you ;)



You could optionally also create a member and assign the newly created tracker to the member and in the next line, use the member and make the registerTrackerEventListener call.

Best regards


Hi Andreas,

I have that line that you said to me, but the method:

public void onTrackerFinishedLoading(ClientTracker clientTracker, String s) {
Log.e(TAG, "Tracker finished loading " + s);


This method is load correctly, and my application call it perfectly. But the rest of the methods like onTracking and the others are never called.

I dont know if can be that, i have to upload the .wtm to my server and in the method that you said i have to put the url of my server...but if this way of load the map doesn´t work i think that onTrackerFinishedLoading will never be called and onErrorLoading will be called instead.

I dont know where i am doing wrong...

Hi Sergio,
The .wtm file can be on the device or on any server. 
If you provide a valid TrackerEventListener implementation, it's method will get called. Is your onTrackerFinishedLoading mehod called or do you call it yourself?

Best regards


I have the same problem as him only the onTrackerFinishedLoading is called and iam using the sample and put the map into the assets and changed that line in internal rendering any help please


ClientTracker tracker = _wikitudeSDK.getTrackerManager().create3dClientTracker("file:///android_asset/soha.wtm");


Hi soha,
If the onTargetRecognized trigger is not called, the map might not include enough information to recognize the object again. What was the map quality indicator saying when you record the map?
Could you send us a video so that we see what map you recorded and under which conditions you try to recognize it again?

Best regards


Hi Andreas,

When I save the .wtm the quality is max available, that in my case is good, i think that it is called with the same name in the example. I finally make it works, to load fine the .wtm, but it is impossible to me that the methods onTracking, onTargetRecognized to be called, neither onTargetLost.

The method onTrackerFinishLoading is called by itself,but the others that i mentioned to you, are never called.

I dont know what i am doing wrong :S

My student app doesnt has to implement 

wikiSDK.getTrackingMapRecorder().registerTrackingMapRecorderEventListener(new TrackingMapRecorderEventListener() {


This is only for save the map no?
Login or Signup to post a comment