MasTrackerManager class controls trackers provided by MAXST AR.
Inherits NSObject typedef public enum TrackerType.
◆ TrackingOption
Tracking option enumerator for further functionality.
Tracking options consist of two groups; Jitter Control Group(JITTER_REDUCTION_ACTIVATION and JITTER_REDUCTION_DEACTIVATION) and Functionaliy Control Group(NORMAL_TRACKING, ENHANCED_TRACKING, EXTENDED_TRACKING, and MULTI_TRACKING).
In each group, only one option is selected. The default option in Jitter Control Group is JITTER_REDUCTION_DEACTIVATION and the default in Functionaliy Control Group is NORMAL_TRACKING. Each option works on the different trackers, so please check which tracker supports which options.
Enumerator |
---|
NORMAL_TRACKING | Normal Tracking (Default, It works on Marker, Image, and Object Tracker.)
|
EXTENDED_TRACKING | Extended Tracking (It works on Image and Object Traker.)
|
ENHANCED_TRACKING | Enhanced Tracking (It works on Marker Tracker.)
|
MULTI_TRACKING | Simultaneous Target Tracking (It works only on Image Tracker.)
|
JITTER_REDUCTION_ACTIVATION | Jitter Reduction Activation (It works on Marker, Image, Instant, QRCode)
|
JITTER_REDUCTION_DEACTIVATION | Jitter Reduction Deactivation (It works on Marker, Image, QRCode)
|
◆ addTrackerData:
- (void) addTrackerData: |
|
(NSString *) |
trackingFileName |
|
Add a map file to the candidate list for Image Tracker, Object Tracker, Image Fusion Tracker and Object Fusion Tracker.
After adding some map files, loadTrackerData should be called.
- Parameters
-
trackingFileName | absolute file path if the map file is located in App Sandbox. |
◆ destroyTracker
Destroy a tracker. Remove all tracking data including map data and tracking results.
◆ findSurface
Start to find the groud plane visible through the camera. It works only on Instant Tracker.
◆ getFusionTrackingState
- (int) getFusionTrackingState |
|
|
|
Get the status of the AR fusion tracker working on the current app.
- Returns
- 1 if the tracking status is successful, otherwise -1.
◆ getGuideInformation
Get the guide information such as feature points, a bounding box and anchors concerning Object Tracker.
It works only on Object Tracker.
- Returns
- GuideInfo instance
◆ getWorldPositionFromScreenCoordinate
- (void) getWorldPositionFromScreenCoordinate: |
|
(float *) |
screen |
world: |
|
(float *) |
world |
|
|
| |
Get 3d world position corresponding to given 2d screen position.
- Parameters
-
x | and y in screen coordinate as an input. |
x,y | and z in world coordinate as an output. |
◆ isFusionSupported
- (bool) isFusionSupported |
|
|
|
Get a boolean value representing whether the current device supports AR fusion trackers.
- Returns
- true if the device supports AR fusion trackers.
◆ isTrackerDataLoadCompleted
- (bool) isTrackerDataLoadCompleted |
|
|
|
Get a boolean value representing whether loading the map files is complete.
- Returns
- true if loading the map files is complete.
◆ loadTrackerData
Load the map files in the candidate list to a memory. This method runs asynchronously to the main (UI) thread.
◆ quitFindingSurface
- (void) quitFindingSurface |
|
|
|
Stop to find the ground plane. It works only on Instant Tracker.
◆ removeTrackerData
- (void) removeTrackerData: |
|
(NSString *) |
trackingFileName |
|
Remove a map file from the candidate list.
To actually remove the map from the tracker, loadTrackerData should be called.
- Parameters
-
trackingFileName | the file path of a map to want to remove. If trackingFileName is set to "", all map files will be cleared. |
◆ setCloudRecognitionSecretId
- (void) setCloudRecognitionSecretId: |
|
(NSString *) |
secretId |
secretKey: |
|
(NSString *) |
secretKey |
|
|
| |
Set secret ID and key for access of cloud recognition.
The secret Id and key can be obtained through https://developer.maxst.com.
- Parameters
-
secretId | secret ID |
secretKey | secret key |
◆ setTrackingOption
Set tracking options for AR Trackers.
Tracking options consists of two groups; Jitter Control Group(JITTER_REDUCTION_ACTIVATION and JITTER_REDUCTION_DEACTIVATION) and Functionaliy Control Group(NORMAL_TRACKING, ENHANCED_TRACKING, EXTENDED_TRACKING, and MULTI_TRACKING).
In each group, only one option is selected. The default option in Jitter Control Group is JITTER_REDUCTION_DEACTIVATION and the default in Functionaliy Control Group is NORMAL_TRACKING. Each option works on the different trackers, so please check which tracker supports which options.
- Parameters
-
option | tracking option TrackingOption.JITTER_REDUCTION_ACTIVATION : Jitter Reduction Activation (It works on Marker, Image, Instant, QRCode)
TrackingOption.JITTER_REDUCTION_DEACTIVATION : Jitter Reduction Deactivation (Marker, Image)
TrackingOption.NORMAL_TRACKING : Normal Tracking (It works on Marker, Image, and Object Tracker.)
TrackingOption.ENHANCED_TRACKING : Enhanced Tracking (It works on Marker Tracker.)
TrackingOption.EXTENDED_TRACKING : Extended Tracking (It works on Image and Object Traker.)
TrackingOption.MULTI_TRACKING : Multiple Target Tracking (It works only on Image Tracker.)
|
◆ startTracker
- (void) startTracker: |
|
(TrackerType) |
trackerMask |
|
Start a AR tracker.
MAXST AR provices the following trackers; Marker Tracker, QRcode Tracker, Image Tracker, Cloud Recognizer, Instant Tracker, Marker Fusion Tracker, QRCode Fusion Tracker, Image Fusion Tracker, Instant Fusion Tracker, Object Fusion Tracker, QR/Barcode Scanner.
Only one tracker can be run at one time.
- Parameters
-
trackerType | tracker type (trackerType should be among TRACKER_TYPE_CODE_SCANNER, TRACKER_TYPE_IMAGE, TRACKER_TYPE_MARKER, TRACKER_TYPE_OBJECT, TRACKER_TYPE_INSTANT, TRACKER_TYPE_QR_TRACKER, TRACKER_TYPE_CLOUD_RECOGNIZER, TRACKER_TYPE_IMAGE_FUSION, TRACKER_TYPE_OBJECT_FUSION, TRACKER_TYPE_QR_FUSION, TRACKER_TYPE_MARKER_FUSION, and TRACKER_TYPE_INSTANT_FUSION.) |
◆ stopTracker
◆ updateTrackingState
Update and get the current tracking state.
- Returns
- the updated tracking state
◆ TRACKER_TYPE_CLOUD_RECOGNIZER
- TRACKER_TYPE_CLOUD_RECOGNIZER = 0x30 |
|
protected |
◆ TRACKER_TYPE_CODE_SCANNER
- TRACKER_TYPE_CODE_SCANNER = 0x01 |
|
protected |
◆ TRACKER_TYPE_IMAGE
- TRACKER_TYPE_IMAGE = 0x02 |
|
protected |
◆ TRACKER_TYPE_IMAGE_FUSION
- TRACKER_TYPE_IMAGE_FUSION = 0x80 |
|
protected |
◆ TRACKER_TYPE_INSTANT
- TRACKER_TYPE_INSTANT = 0x20 |
|
protected |
◆ TRACKER_TYPE_INSTANT_FUSION
- TRACKER_TYPE_INSTANT_FUSION = 0x10000 |
|
protected |
◆ TRACKER_TYPE_MARKER
- TRACKER_TYPE_MARKER = 0X04 |
|
protected |
◆ TRACKER_TYPE_MARKER_FUSION
- TRACKER_TYPE_MARKER_FUSION = 0x800 |
|
protected |
◆ TRACKER_TYPE_OBJECT
- TRACKER_TYPE_OBJECT = 0X08 |
|
protected |
◆ TRACKER_TYPE_OBJECT_FUSION
- TRACKER_TYPE_OBJECT_FUSION = 0x100 |
|
protected |
◆ TRACKER_TYPE_QR_FUSION
- TRACKER_TYPE_QR_FUSION = 0x400 |
|
protected |
◆ TRACKER_TYPE_QR_TRACKER
- TRACKER_TYPE_QR_TRACKER = 0x40 |
|
protected |