Start a new topic

Sample app 3D Tracking

Sample app 3D Tracking


i have used the example app downloaded with the sdk and put the map file in the assets and then updated the and i put this on the oncreate method of InternalRenderingActivity

_wikitudeSDK = new WikitudeSDK(this);
WikitudeSDKStartupConfiguration startupConfiguration = new WikitudeSDKStartupConfiguration(WikitudeSDKConstants.WIKITUDE_SDK_KEY, CameraSettings.CameraPosition.BACK, CameraSettings.CameraFocusMode.CONTINUOUS);
_wikitudeSDK.onCreate(getApplicationContext(), startupConfiguration);
//ClientTracker tracker = _wikitudeSDK.getTrackerManager().create2dClientTracker("file:///android_asset/magazine.wtc");
ClientTracker tracker = _wikitudeSDK.getTrackerManager().create3dClientTracker("file:///android_asset/book.wtm");


tracker.registerTrackerEventListener(this);
setContentView(_wikitudeSDK.setupWikitudeGLSurfaceView());

 i dont understand what is wrong with this ? is there any simple app that have 3D tracking idea ?

Hi soha,
Our native SDK example application has an example which demonstrates 3d tracking. It's the third one, Client Recognition - 3D Tracking. It just records a map first and then loads the map directly (We can't add a .wtm file as we can't make sure that you have the same object at your place ;)).

Best regards

Andreas

Hi Marko,
What did the tracking quality indicator say when you stopped the recording session?

The sample should not render a 3d model but a rectangle representing the recognized object.

Be aware that this sample should not demonstrate rendering of 3d models but a computer vision technology which is called 3d tracking (just in case there was a misunderstanding). The Wikitude Native SDK does not include any 3d model rendering technology. You would need to use the Wikitude Architect SDK instead if you need 3d model rendering.

Best regards

Andreas

Hello,

we are intrested in using the 3D Tracking feature in an application. To check the quality of the tracking we have downloaded the Native SDK for Android and installed the included Example Native SDK app on a Xperia Z1 Compact. In the app under Client Recognition we select 1.3 Tracking 3D. Then the app asks to record a map. We record the map successfully. The app says " Please wait while the map is saved and loaded ". Then the message disappears but nothing more happens. There is no 3D Object visible. Is there no 3D Model included in this example by default? Other examples in the app with image based tracking worked.

Thanks for your help...

 

  

how can i know that it recognized the scene? in my case it generate a file but not with wtc extension and i tried to load it in InternalRenderActivity in that line ClientTracker tracker = _wikitudeSDK.getTrackerManager().create3dClientTracker("file:///android_asset/lab");

but nothing happened !! how to know that it recognize the scene successfully and can i show a text when the scene is recognized?

Hi soha,
The recorded map should be a .wtm file. Did you successfully record and export such a .wtm file? This is the file a 3d tracker needs for initialization.

Once you created a 3d tracker, simply set it's listener and implement the ClientTrackerEventListener methods.

_wikitudeSDK.getTrackerManager().create3dClientTracker(file.getAbsolutePath()).registerTrackerEventListener(ClientTracking3DActivity.this);

 

@Override
public void onErrorLoading(final ClientTracker clientTracker_, final String errorMessage_) {
Log.v(TAG, "onErrorLoading: " + errorMessage_);
}

@Override
public void onTrackerFinishedLoading(final ClientTracker clientTracker_, final String trackerFilePath_) {

}

@Override
public void onTargetRecognized(final Tracker tracker_, final String targetName_) {

}

@Override
public void onTracking(final Tracker tracker_, final RecognizedTarget recognizedTarget_) {
_glRenderer.setCurrentlyRecognizedTarget(recognizedTarget_);
}

@Override
public void onTargetLost(final Tracker tracker_, final String targetName_) {
_glRenderer.setCurrentlyRecognizedTarget(null);
}

 

onTargetRecognized is called once the same object is recognized.

 

Best regards

Andreas
Login or Signup to post a comment