MaxstARSDK
MasTrackerManager Class Reference

Control AR Engine. More...

#import <MasTrackerManager.h>

Inheritance diagram for MasTrackerManager:
Inheritance graph
Collaboration diagram for MasTrackerManager:
Collaboration graph

Instance Methods

(void) - startTracker:
 Start AR engine. Only one tracking engine could be run at one time. More...
 
(void) - stopTracker
 Stop tracking engine. More...
 
(void) - destroyTracker
 Remove all tracking data (Map data and tracking result) More...
 
(void) - addTrackerData:
 Add map file to candidate list. More...
 
(void) - removeTrackerData:
 Remove map file from candidate list. More...
 
(void) - loadTrackerData
 Load map files in candidate list to memory. This method don't block main(UI) thread. More...
 
(bool) - isTrackerDataLoadCompleted
 Get map files loading state. This is for UI expression. More...
 
(bool) - isFusionSupported
 Check if Fusion is supported. More...
 
(int) - getFusionTrackingState
 Check the status of the Fusion Tracker. More...
 
(MasTrackingState *) - updateTrackingState
 Update tracking state. This function should be called before getTrackingResult and background rendering. More...
 
(void) - findSurface
 Start to find the surface of an environment from a camera image. More...
 
(void) - quitFindingSurface
 Stop to find the surface. More...
 
(void) - findImageOfCloudRecognition
 find the tracker ID of the current screen image. More...
 
(MasSurfaceThumbnail *) - saveSurfaceData:
 Save the surface data to file. More...
 
(void) - setVocabulary:
 
(void) - getWorldPositionFromScreenCoordinate:world:
 Get 3d world coordinate corresponding to given 2d screen position. More...
 
(MasGuideInfo *) - getGuideInformation
 Get surface mesh information of the found surface after the findSurface method has been called. More...
 
(void) - setTrackingOption:
 Set tracking options. 1, 2, 4 cannot run simultaneously. More...
 
(void) - saveFrames
 
(void) - setCloudRecognitionSecretId:secretKey:
 Set secret ID and key for access of cloud recognition. More...
 

Protected Types

enum  TrackerType : int {
  TRACKER_TYPE_CODE_SCANNER = 0x01 , TRACKER_TYPE_IMAGE = 0x02 , TRACKER_TYPE_MARKER = 0X04 , TRACKER_TYPE_OBJECT = 0X08 ,
  TRACKER_TYPE_INSTANT = 0x20 , TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30 , TRACKER_TYPE_QR_TRACKER = 0x40 , TRACKER_TYPE_IMAGE_FUSION = 0x80 ,
  TRACKER_TYPE_OBJECT_FUSION = 0x100 , TRACKER_TYPE_QR_FUSION = 0x400 , TRACKER_TYPE_MARKER_FUSION = 0x800 , TRACKER_TYPE_SPACE = 0x8000 ,
  TRACKER_TYPE_INSTANT_FUSION = 0x10000
}
 Tracker Type @constant TRACKER_TYPE_CODE_SCANNER Code scanner @constant TRACKER_TYPE_IMAGE Planar image tracker @constant TRACKER_TYPE_MARKER Marker tracker @constant TRACKER_TYPE_OBJECT Object tracker (Object data should be created via Visual SLAM Tool) @constant TRACKER_TYPE_INSTANT Instant tracker @constant TRACKER_TYPE_CLOUD_RECOGNIZER Cloud Recognition Image tracker @constant TRACKER_TYPE_QR_TRACKER QR Code tracker @constant TRACKER_TYPE_IMAGE_FUSION Image Fusion tracker @constant TRACKER_TYPE_OBJECT_FUSION Object Fusion tracker @constant TRACKER_TYPE_QR_FUSION QR Code Fusion tracker @constant TRACKER_TYPE_MARKER_FUSION Maker Fusion tracker @constant TRACKER_TYPE_SPACE Space tracker @constant TRACKER_TYPE_INSTANT_FUSION Instant Fusion tracker. More...
 
enum  TrackingOption : int {
  NORMAL_TRACKING = 0x01 , EXTENDED_TRACKING = 0x02 , ENHANCED_TRACKING = 0x80 , MULTI_TRACKING = 0x04 ,
  JITTER_REDUCTION_ACTIVATION = 0x08 , JITTER_REDUCTION_DEACTIVATION = 0x10 , CLOUD_RECOGNITION_AUTO_ACTIVATION = 0x20 , CLOUD_RECOGNITION_AUTO_DEACTIVATION = 0x40
}
 Additional tracking option. @constant NORMAL_TRACKING Normal Tracking (Image Tracker Only) @constant EXTENDED_TRACKING Extended Tracking (Image Tracker Only) @constant MULTI_TRACKING Multi Target Tracking (Image Tracker Only) @constant JITTER_REDUCTION_ACTIVATION Jitter Reduction Activation (Marker, Image, and object trackers) @constant JITTER_REDUCTION_DEACTIVATION Jitter Reduction Deactivation (Marker, Image, and object trackers) @constant CLOUD_RECOGNITION_AUTO_ACTIVATION Coud Recognition Auto activation (Cloud Recognition) @constant CLOUD_RECOGNITION_AUTO_DEACTIVATION Coud Recognition Auto Deactivation (Cloud Recognition) More...
 

Detailed Description

Control AR Engine.

Member Enumeration Documentation

◆ TrackerType

- (enum TrackerType) :
protected

Tracker Type @constant TRACKER_TYPE_CODE_SCANNER Code scanner @constant TRACKER_TYPE_IMAGE Planar image tracker @constant TRACKER_TYPE_MARKER Marker tracker @constant TRACKER_TYPE_OBJECT Object tracker (Object data should be created via Visual SLAM Tool) @constant TRACKER_TYPE_INSTANT Instant tracker @constant TRACKER_TYPE_CLOUD_RECOGNIZER Cloud Recognition Image tracker @constant TRACKER_TYPE_QR_TRACKER QR Code tracker @constant TRACKER_TYPE_IMAGE_FUSION Image Fusion tracker @constant TRACKER_TYPE_OBJECT_FUSION Object Fusion tracker @constant TRACKER_TYPE_QR_FUSION QR Code Fusion tracker @constant TRACKER_TYPE_MARKER_FUSION Maker Fusion tracker @constant TRACKER_TYPE_SPACE Space tracker @constant TRACKER_TYPE_INSTANT_FUSION Instant Fusion tracker.

Enumerator
TRACKER_TYPE_CODE_SCANNER 

Code scanner

TRACKER_TYPE_IMAGE 

Planar image tracker

TRACKER_TYPE_MARKER 

Code scanner

TRACKER_TYPE_OBJECT 

Object tracker (Object data should be created via SLAM tracker)

TRACKER_TYPE_INSTANT 

Instant tracker

TRACKER_TYPE_CLOUD_RECOGNIZER 

Cloud recognizer

TRACKER_TYPE_QR_TRACKER 

QR-Code tracker

TRACKER_TYPE_IMAGE_FUSION 

Image Fusion tracker

TRACKER_TYPE_OBJECT_FUSION 

Object Fusion tracker

TRACKER_TYPE_QR_FUSION 

QR-Code Fusion tracker

TRACKER_TYPE_MARKER_FUSION 

Marker Fusion tracker

TRACKER_TYPE_SPACE 

Space tracker

TRACKER_TYPE_INSTANT_FUSION 

Instant Fusion tracker

◆ TrackingOption

- (enum TrackingOption) :
protected

Additional tracking option. @constant NORMAL_TRACKING Normal Tracking (Image Tracker Only) @constant EXTENDED_TRACKING Extended Tracking (Image Tracker Only) @constant MULTI_TRACKING Multi Target Tracking (Image Tracker Only) @constant JITTER_REDUCTION_ACTIVATION Jitter Reduction Activation (Marker, Image, and object trackers) @constant JITTER_REDUCTION_DEACTIVATION Jitter Reduction Deactivation (Marker, Image, and object trackers) @constant CLOUD_RECOGNITION_AUTO_ACTIVATION Coud Recognition Auto activation (Cloud Recognition) @constant CLOUD_RECOGNITION_AUTO_DEACTIVATION Coud Recognition Auto Deactivation (Cloud Recognition)

Enumerator
NORMAL_TRACKING 

Normal Tracking (Image Tracker Only)

EXTENDED_TRACKING 

Extended Tracking (Image Tracker Only)

ENHANCED_TRACKING 

Enhanced Tracking (Marker Tracker Only)

MULTI_TRACKING 

Multi Target Tracking (Image Tracker Only)

JITTER_REDUCTION_ACTIVATION 

Jitter Reduction Activation (Marker, Image, and object trackers)

JITTER_REDUCTION_DEACTIVATION 

Jitter Reduction Deactivation (Marker, Image, and object trackers)

CLOUD_RECOGNITION_AUTO_ACTIVATION 

Cloud Recognition Auto Activation (Cloud Tracker Only)

CLOUD_RECOGNITION_AUTO_DEACTIVATION 

Cloud Recognition Auto Deactivation (Cloud Tracker Only)

Method Documentation

◆ addTrackerData:

- (void) addTrackerData: (NSString *)  trackingFileName

Add map file to candidate list.

Parameters
trackingFileNameabsolute file path

◆ destroyTracker

- (void) destroyTracker

Remove all tracking data (Map data and tracking result)

◆ findImageOfCloudRecognition

- (void) findImageOfCloudRecognition

find the tracker ID of the current screen image.

◆ findSurface

- (void) findSurface

Start to find the surface of an environment from a camera image.

◆ getFusionTrackingState

- (int) getFusionTrackingState

Check the status of the Fusion Tracker.

Returns
1 is stable -1 is unstable

◆ getGuideInformation

- (MasGuideInfo *) getGuideInformation

Get surface mesh information of the found surface after the findSurface method has been called.

Returns
MasSurfaceMesh instance

◆ getWorldPositionFromScreenCoordinate:world:

- (void) getWorldPositionFromScreenCoordinate: (float *)  screen
world: (float *)  world 

Get 3d world coordinate corresponding to given 2d screen position.

Parameters
screenscreen touch x, y position
worldworld position x, y, z

◆ isFusionSupported

- (bool) isFusionSupported

Check if Fusion is supported.

Returns
true if Fusion is supports.

◆ isTrackerDataLoadCompleted

- (bool) isTrackerDataLoadCompleted

Get map files loading state. This is for UI expression.

Returns
true if map loading is completed

◆ loadTrackerData

- (void) loadTrackerData

Load map files in candidate list to memory. This method don't block main(UI) thread.

◆ quitFindingSurface

- (void) quitFindingSurface

Stop to find the surface.

◆ removeTrackerData:

- (void) removeTrackerData: (NSString *)  trackingFileName

Remove map file from candidate list.

Parameters
trackingFileNamemap file name. This name should be same which added. If set "" (empty) file list will be cleared.

◆ saveFrames

- (void) saveFrames

◆ saveSurfaceData:

- (MasSurfaceThumbnail *) saveSurfaceData: (NSString *)  outputFileName

Save the surface data to file.

Parameters
outputFileNamefile path (should be absolute path)
Returns
MasSurfaceThumbnail instance if true else null

◆ setCloudRecognitionSecretId:secretKey:

- (void) setCloudRecognitionSecretId: (NSString *)  secretId
secretKey: (NSString *)  secretKey 

Set secret ID and key for access of cloud recognition.

Parameters
secretIdsecret ID
secretKeysecret key

◆ setTrackingOption:

- (void) setTrackingOption: (TrackingOption option

Set tracking options. 1, 2, 4 cannot run simultaneously.

Parameters
option1 : Normal Tracking (Image Tracker Only) 2 : Extended Tracking (Image Tracker Only) 4 : Multiple Target Tracking (Image Tracker Only)

◆ setVocabulary:

- (void) setVocabulary: (NSString *)  filePath

◆ startTracker:

- (void) startTracker: (TrackerType trackerMask

Start AR engine. Only one tracking engine could be run at one time.

Parameters
trackerMasktracking engine type

◆ stopTracker

- (void) stopTracker

Stop tracking engine.

◆ updateTrackingState

- (MasTrackingState *) updateTrackingState

Update tracking state. This function should be called before getTrackingResult and background rendering.

Returns
Tracking state container

The documentation for this class was generated from the following file: