WTCloudTracker Class Reference

Inherits from WTBaseTracker : NSObject
Declared in WTCloudTracker.h

Overview

Cloud tracker require a continuous internet connection in order to communicate with the Wikitude cloud recognition server.

  isLoaded

Represents if the tracker could be loaded or not.

@property (nonatomic, assign, readonly) BOOL isLoaded

Declared In

WTCloudTracker.h

  delegate

The delegate object that is associated with this cloud tracker object.

@property (nonatomic, weak) id<WTCloudTrackerDelegate> delegate

Discussion

The delegate object is usually set through the appropriate WTTrackerManager factory method.

Declared In

WTCloudTracker.h

– extendedTargets

An array of NSString objects that represent which targets of the .wtc file should be treated as extended targets.

- (nullable NSArray *)extendedTargets

Discussion

The extended targets array is usually set through the client tracker creation factory method.

Declared In

WTCloudTracker.h

– recognize:errorHandler:

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

- (void)recognize:(WTCloudRecognitionSuccessHandler)successHandler errorHandler:(WTCloudRecognitionErrorHandler)errorHandler

Parameters

successHandler

A block object that is called whenever the device/server communication was successful

errorHandler

A block object that is called whenever the device/server communication could not be established or any other error occured

Discussion

This method can be used to trigger a single cloud recognition session. 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, the successHandler is called, independent of the evaluation result. One can use the WTCloudRecognitionResponse object, that is the only parameter to the successHandler, to retrieve more information about the server processing. If no connection to the server could be established or any other problem occured, the errorHanlder block gets invoked, providing more information about what went wrong.

Declared In

WTCloudTracker.h

– startContinuousRecognitionWithInterval:successHandler:interruptionHandler:errorHandler:

Starts a continuous cloud recognition session

- (void)startContinuousRecognitionWithInterval:(NSTimeInterval)interval successHandler:(nullable WTCloudRecognitionSuccessHandler)successHandler interruptionHandler:(nullable WTContinuousCloudRecognitionInterruptionHandler)interruptionHandler errorHandler:(nullable WTCloudRecognitionErrorHandler)errorHandler

Parameters

interval

The interval in which new camera frames should be send to the Wikitude cloud recognition server

successHandler

A block object that is invoked whenever teh device/server communication was successful. This happens with the given interval.

interruptionHandler

A block object that is invoked every time the given interval is to short in order to process one request after the other.

errorHandler

A block object that is invoked whenever the device/server communication could not be established or any other error occured

Discussion

Calling this method does essentially the same as a single call to -recognize:errorHandler, 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.

Declared In

WTCloudTracker.h

– stopContinuousRecognition

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

- (void)stopContinuousRecognition

Declared In

WTCloudTracker.h