Cloud Recognition

Prerequisites
Target Manager
Recommended Conditions for Target Images
Tracker Coordinate System in Unity

You can recognize and track 2D images registered on MAXST Developer Site to enhance the 3D content, video images, and Chroma key images.

1. Definition
2. Make Image Tracker Scene
3. Set Cloud SecretID / SecretKey
4. Add / Replace Target Image
5. Start / Stop Tracker
6. Use Tracking Information
7. Change Tracking Mode


1. Definition

Cloud recognition feature is developed to overcome the limitation that Image Tracker was limited to amaximum of 200 images per viewable within a library. With Cloud Recognizer, millions of images can be recognized with no limit. Cloud Recognizer recognizes image by transmitting real-time camera images to MAXST recognition server. After recognizing the image, it downloads the trained image file to perform image tracking function on the mobile device. Cloud Recognizer can be used when there are many targets to recognize and track, such as industrial products, movie posters or CD covers, or wine labels.스크린샷 2019-10-22 오후 3.44.20.png


2. Make Cloud Tracker Scene

  1. Install [MAXST AR SDK for Unity.][MAXST AR SDK for Unity]

  2. Create a new scene.

  3. Delete the Main Camera that exists by default and add 'Assets > MaxstAR > Prefabs > ARCamera, ImageTrackable' to the scene.

cloudPrefab.png

※ If you build, you should add [License Key][License Key] to ARCamera.
  1. Create an empty object and add 'Assets > MaxstARSamples > Scripts > ImageTrackerSample' as a component.

    cloudSample

  2. Create a cube as a child of CloudTrakable and adjust its size and position.

    cloudCube

  3. The cube will be augmented by illuminating the target image to the camera after Play.


3. Set Cloud SecretID / SecretKey

If you want to use cloud target, you have to enter SecretID and SecretKey before start the tracker.

>CloudTrackerSample.cs

void Start()
{
    ...
    TrackerManager.GetInstance().setCloudRecognitionSecretIdAndSecretKey("32b41d66c3924477955...", "c40d6fbca31e4d03baa6...");
    TrackerManager.GetInstance().StartTracker(TrackerManager.TRACKER_TYPE_CLOUD_RECOGNIZER);
    ...
}

4. Add / Replace Target Image

There are two ways of trackign taret images. First, you can track all the target images that you've uploaded on the cloud. Second, you can define the target images that you want to use as target.

cloudTarget1

cloudTarget2


5. Start / Stop Tracker

Refer to the following code to start / stop the cloudtracker.

>CloudTrackerSample.cs

void Start()
{
    ...
    TrackerManager.GetInstance().StartTracker(TrackerManager.TRACKER_TYPE_CLOUD_RECOGNIZER);
    ...
}

void OnApplicationPause(bool pause)
{
    ...
    TrackerManager.GetInstance().StopTracker();
    ...
}

void OnDestroy()
{
    ...
    TrackerManager.GetInstance().StopTracker();
    TrackerManager.GetInstance().DestroyTracker();
}

6. Use Tracking Information

Refer to the following code to use the tracking information.

>CloudTrackerSample.cs

void Update()
{
    ...
    TrackingState state = TrackerManager.GetInstance().UpdateTrackingState();
    TrackingResult trackingResult = state.GetTrackingResult(); 

    if(trackingResult.GetCount() > 0) {
            Trackable trackable = trackingResult.GetTrackable(0);
            if(cloudTrackablesMap.ContainsKey(trackable.GetCloudName())) {
                foreach (var cloudTrackable in cloudTrackablesMap[trackable.GetCloudName()])
                {
                    cloudTrackable.OnTrackSuccess(trackable.GetId(), trackable.GetName(), trackable.GetPose());
                }
            } else {
                if(cloudTrackablesMap.ContainsKey("_MaxstCloud_")) {
                    foreach (var cloudTrackable in cloudTrackablesMap["_MaxstCloud_"])
                    {
                        cloudTrackable.OnTrackSuccess(trackable.GetId(), trackable.GetName(), trackable.GetPose());
                    }
                }
            }
        }
}

7. Change Tracking Mode

5 Tracking Modes of Cloud Tracker: NORMAL_TRACKING, EXTENDED_TRACKING, MULTI_TRACKING, JITTER_REDUCTION_ACTIVATION, JITTER_REDUCTION_DEACTIVATION

  • NORMAL_TRACKING: Defaul Setting.
TrackerManager.GetInstance().SetTrackingOption(TrackerManager.TrackingOption.NORMAL_TRACKING);
  • EXTENDED_TRACKING: Traceable even at the far distance from the target image.
TrackerManager.GetInstance().SetTrackingOption(TrackerManager.TrackingOption.EXTEND_TRACKING);
  • MULTI_TRACKING: Possible to recognize and track up to three target images at the same time.
TrackerManager.GetInstance().SetTrackingOption(TrackerManager.TrackingOption.MULTI_TRACKING);
  • JITTER_REDUCTION_ACTIVATION: Jitter reduction.
TrackerManager.GetInstance().SetTrackingOption(TrackerManager.TrackingOption.JITTER_REDUCTION_ACTIVATION);
  • JITTER_REDUCTION_DEACTIVATION: Disable the jitter reduction option.
TrackerManager.GetInstance().SetTrackingOption(TrackerManager.TrackingOption.JITTER_REDUCTION_DEACTIVATION);