Try MAXST AR Fusion Tracker Now ✨
List
Fail to read map file.
Posted Date: 2022-03-16 22:22     Edited Date: 2022-03-24 8:23     Writer: fl1re.nubo

Please provide your development details as below;

1. SDK Version: 5.0.2
2. Development Environment: Unity-Android
3. Tracker/Scanner: Cloud Tracker
4. License Type: Free
5. Target Device(Optional): Xiomi Poco X3 NFC

Hello, i develop app for Android and download 2dmap's from server, but have some problem when 2dmap's are added for tracking.
This my code when I Add tracker data:

    public void Launch()
    {
        Init();
        cameraBackgroundBehaviour = FindObjectOfType<CameraBackgroundBehaviour>();
        if (cameraBackgroundBehaviour == null)
        {
            Debug.LogError("Can't find CameraBackgroundBehaviour.");
            return;
        }
        FindMapImages();
    }

    public void FindMapImages()
    {
        BetterStreamingAssets.Initialize();
            if (Application.platform == RuntimePlatform.Android)
            {
            path = Directory.GetFiles(Application.persistentDataPath, "*.2dmap");
                Prepare();
            }
            else
            {
                path = BetterStreamingAssets.GetFiles("MaxstAR/Test", "*.2dmap");
                Prepare();
            }
    }

    public void Prepare()
    {
        trackingObject = GameObject.FindGameObjectsWithTag("Trackable");
        QualitySettings.vSyncCount = 0;
        Application.targetFrameRate = 60;

        AddTrackerData();
        TrackerManager.GetInstance().StartTracker(TrackerManager.TRACKER_TYPE_IMAGE);
        StartCamera();
    }
    private void AddTrackerData()
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            for (int i = 0; i < path.Length; i++)
            {
                TrackerManager.GetInstance().AddTrackerData(path[i], true);
            }
        }
        else
        {
            for (int i = 0; i < path.Length; i++)
            {
                TrackerManager.GetInstance().AddTrackerData(Application.streamingAssetsPath + path[i], false);
            }
        }
        TrackerManager.GetInstance().LoadTrackerData();
    }

Posted Date: 2022-03-18 8:20     Edited Date: 2022-03-18 8:20     Writer: sjkim

Thank you for your interest in MAXST AR SDK.

 

The forum of MAXST AR SDK doesn't provide any code review.

The forum provides answers to the usage and bugs of MAXST AR SDK.

 

Also, If you want to download 2dmap through server, please use Cloud Recognizer of MAXST.

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.

 

Please refer to link below.

https://developer.maxst.com/MD/doc/5_0_x/cloud/unity/ex

 

If you have related the MAXST AR SDK questions, feel free to ask.

 


 
Best regards,

Francisco

MAXST Support Team

Posted Date: 2022-03-18 8:32     Edited Date: 2022-03-18 8:32     Writer: fl1re.nubo

Are there other ways besides your solution? Because cloudrecognition doesn't work, i have written about it at previous thread. 

Posted Date: 2022-03-18 22:55     Edited Date: 2022-03-18 23:55     Writer: asifraza031

https://developer.maxst.com/MD/doc/5_0_x/cloud/unity/ex 

Posted Date: 2022-03-20 10:00     Edited Date: 2022-03-20 10:00     Writer: fl1re.nubo

I tried this but it doesn't work, I want to find how to download 2dmap files to persistentDataPath and add for tracking.

Posted Date: 2022-03-24 8:23     Edited Date: 2022-03-24 8:23     Writer: sjkim

Have you check your recognition count??

If you exhausted the available recognition time without adding the number of recognition, the recognition function will not be activated.

The number of recognition is calculated as the total number of attempts to recognize, regardless of whether it was successful or not.

 

If you have related the MAXST AR SDK questions, feel free to ask.

 


 
Best regards,

Francisco

MAXST Support Team