Wikitude Unity Plugin
Public Member Functions | Public Attributes | Properties | List of all members
Wikitude.CloudTracker Class Reference

Cloud trackers will send the image(s) taken by the camera to the Cloud Recognition server. The server will then do the hard work of trying to match the image with your targets in the specified cloud archive. More...

Inheritance diagram for Wikitude.CloudTracker:
Wikitude.TrackerBehaviour

Public Member Functions

void StartContinuousRecognition (double interval)
 Starts a continuous cloud recognition session. More...
 
void StopContinuousRecognition ()
 Stops the current continuous recognition session. More...
 
void Recognize ()
 Triggers a single device/server communication to find out if a image target occurs in the current camera frame. More...
 

Public Attributes

OnTrackerFinishedLoadingEvent OnTrackerFinishedLoading = new OnTrackerFinishedLoadingEvent()
 Called when a cloud tracker successfully loaded with the given authentication token and target collection ID. More...
 
OnTrackerLoadingErrorEvent OnTrackerLoadingError = new OnTrackerLoadingErrorEvent()
 Called whenever a client tracker encountered an error when loading from the given URL. More...
 
OnExtendedTrackingQualityChangedEvent OnExtendedTrackingQualityChanged = new OnExtendedTrackingQualityChangedEvent()
 Called whenever the quality of extended tracking changes. More...
 
OnRecognitionSuccessfulEvent OnRecognitionSuccessful = new OnRecognitionSuccessfulEvent()
 Is called when recognition was successful, regardless of the evaluation result. More...
 
OnRecognitionFailedEvent OnRecognitionFailed = new OnRecognitionFailedEvent()
 Called when the device/server communication could not be established or any other error occurred. More...
 
OnRecognitionInterruptionEvent OnRecognitionInterruption = new OnRecognitionInterruptionEvent()
 Called when the given interval is to short in order to process one request after the other. More...
 

Properties

string AuthenticationToken [get, set]
 Gets or sets the authentication token. More...
 
string TargetCollectionId [get, set]
 Gets or sets the target collection identifier. More...
 

Detailed Description

Cloud trackers will send the image(s) taken by the camera to the Cloud Recognition server. The server will then do the hard work of trying to match the image with your targets in the specified cloud archive.

When cloud trackers are created at runtime, make sure that all the relevant properties are set before the Start method is called by Unity. At start, the native tracker is created and all information needs to be available.

Member Function Documentation

void Wikitude.CloudTracker.Recognize ( )
inline

Triggers a single device/server communication to find out if a image target occurs in the current camera frame.

This includes capturing the current camera frame, sending it to the Wikitude cloud recognition server, evaluate the frame and sending back the response.

If the server could process the camera frame, onRecognitionSuccessful is called, independent of the evaluation result.

If no connection to the server could be established or any other problem occurred, onRecognitionFailed is called, providing more information about what went wrong.

void Wikitude.CloudTracker.StartContinuousRecognition ( double  interval)
inline

Starts a continuous cloud recognition session.

Calling this method does essentially the same as a single call to recognize(), but repeats this with the given interval. If the given interval is too short and the previous request hasn't finished when the next one should be send, the interruption handler is called with a newly suggested interval.

So within the interruption handler, the current continuous recognition session should be stopped and started again with the given interval. If not, requests will be dropped.

Parameters
intervalInterval at which new images are sent to the cloud.
void Wikitude.CloudTracker.StopContinuousRecognition ( )
inline

Stops the current continuous recognition session.

Calling this method will immediately stop any new device/servier communication but still deliver the result from any, currently ongoing, device/server communication.

Member Data Documentation

OnExtendedTrackingQualityChangedEvent Wikitude.CloudTracker.OnExtendedTrackingQualityChanged = new OnExtendedTrackingQualityChangedEvent()

Called whenever the quality of extended tracking changes.

OnRecognitionFailedEvent Wikitude.CloudTracker.OnRecognitionFailed = new OnRecognitionFailedEvent()

Called when the device/server communication could not be established or any other error occurred.

Parameters
errorCodeError code.
messageAdditional information about the error.
OnRecognitionInterruptionEvent Wikitude.CloudTracker.OnRecognitionInterruption = new OnRecognitionInterruptionEvent()

Called when the given interval is to short in order to process one request after the other.

Parameters
suggestedIntervalThe suggested interval that should be used when calling startContinuousRecognition.
OnRecognitionSuccessfulEvent Wikitude.CloudTracker.OnRecognitionSuccessful = new OnRecognitionSuccessfulEvent()

Is called when recognition was successful, regardless of the evaluation result.

Parameters
recognizedThe result of the recognition.
targetInformationInformation about the recognized target.
metadataTarget metadata.
OnTrackerFinishedLoadingEvent Wikitude.CloudTracker.OnTrackerFinishedLoading = new OnTrackerFinishedLoadingEvent()

Called when a cloud tracker successfully loaded with the given authentication token and target collection ID.

OnTrackerLoadingErrorEvent Wikitude.CloudTracker.OnTrackerLoadingError = new OnTrackerLoadingErrorEvent()

Called whenever a client tracker encountered an error when loading from the given URL.

Property Documentation

string Wikitude.CloudTracker.AuthenticationToken
getset

Gets or sets the authentication token.

string Wikitude.CloudTracker.TargetCollectionId
getset

Gets or sets the target collection identifier.