Start a new topic

Image tracking position issue

Hi All


I am detecting an image target that is +- 15mm (0.015m)  high and 46mm (0.046m) wide.


I have placed a frame inside the prefab that should nicely align with the image. The size of the frame looks ok but the depth at which it is rendered is +- 10cm too close to the camera. Because it is too close you see double when focusing on the tracked "real" image.


Are there some kind of calibration settings?


Hi Stefan, 


The offset you are seeing is caused by a known bug that we are going to address in an upcoming release. An available workaround would be to offset the spawned object in opposite direction manually. 

I'm having trouble imagining what the issue is with seeing double. Could you perhaps provide an image or video of that? 

Hi Simon

The seeing double issue is this: The tracking images are on a device at say 30cm from my eyes. This is where I expect the AR images to appear. Because the AR Images appear at +- 20cm instead of 30cm either the device will be observed as "double" due to focussing my eyes  on the AR images or, I will see the AR images "double" as I focus on the device behind it. You can test this by putting one finger at 30cm, focusing on and putting another finger at 20cm. The finger you are not focusing on will be blurry / double as a natural side effect of binocular vision. I would need a 3D camera to demonstrate the problem.


I will try the mentioned strategy above. Have you got some examples how this can be achieved? A script? As simply offsetting the child gameobjects on the Z position by 8cm will incorrectly change the scale and pivot.


Have you got an estimated timeline for when this issue will be corrected?

Hi Stefan,


the offset depends on the size of the marker. It's a but ponderous to do, but  I would try to figure the offset out by testing and logging the offsets to the console, or creating some debug UI that allows to change offset while the app is running. 


Please try the following:

   

The prefab slot of the ARTrackedImageManager in the editor should be left empty. 

As for a code sample, it's recommended to update the position rotation of the image manually within the ARFoundation provided callbacks (see ImageTrackingSampleController.cs). 

   

  private void OnTrackedImagesChanged(ARTrackedImagesChangedEventArgs args) {
            foreach (var trackedImage in args.added) {
               //add to collection
               // instantiate visual (not as a child of the ARTrackedImage)
            }

            foreach (var trackedImage in args.updated) {
                if (_trackedImages.TryGetValue(trackedImage.trackableId, out TrackableInfo info)) {
                    //get visual from collection and update it's position
                    visual.transform.position = trackedImage.transform.position + offset;
                    visual.transform.rotation = trackedImage.transform.rotation;
                }
            }

            foreach (var trackedImage in args.removed) {
                if (_trackedImages.TryGetValue(trackedImage.trackableId, out TrackableInfo info)) {
                    //remove from collection
                    //destroy visual
                }
            }
        }


I'm checking in with the engineer working on this to see if there is a better way to determine the offset. 



Hi Stefan,


can you confirm that you are using the latest Spaces release and A3/Motorola Edge Pro? There should have been significant improvements to image tracking with Spaces 0.12.1. Today we released 0.13.0 which also features some image tracking changes that might help improve stability. We now have several image tracking modes to choose from available. Please see the documentation for more details.

Hi Simon


A3 Home app is 1.4.0.276

App Space Service is 2.06.01.2058

Companion is 1.4.0.87

Google play services for AR is 1.36.230390493

Lenovo Universal Device Client is 22.09.0.43


I will update to version 0.13.0 and send you feedback.


Is it safe to upgrade to Android 13 on the Moto?


Thank you.

Hi Stefan,


I've been told the offset is related to device calibration and unfortunately the actual fix is going to take a while. 

Upgrading to Android 13 is not save - we have seen other developers loose their connection with the Lenovo MDM Portal that we use to deploy Spaces Services, UDC, and other apps. There is a firmware update in the works to fix that. 


The software/firmware versions that are usually relevant for Spaces are:

  • Build number of Motorola Edge Pro
  • Firmware version of A3
  • Spaces Services and plugin version

Versions of other apps are only relevant in edge cases.

Build number of Motorola Edge Pro: S3Shs32.12-41-4-4

Firmware version of A3: a3_user_s1040001_2208180059_sdm710_postcs8

A3 core version: 2.1.2

Spaces Services and plugin version : 2.06.01.2058


I still need to update the SDK to see if it changes anything.

Hi Stefan,


Your versions are up-to-date to me and should enable the highest possible quality at this moment. As you are still on Android 12 be sure not to upgrade to Android 13 for now to avoid complications with Lenovo apps. 

Hi Simon


I finally managed to get v 0.13 working.  

Here is my Feedback:


The depth at which objects appear has changed. They now appear even closer to the camera and further away from the tracked image.

Hi Stefan,


sorry to hear the offset got worse - unfortunately at this moment this is likely the best it will get. If you can provide a sample apk, I can check if the offset is within the expected norm. Otherwise, I'd recommend experimenting with the image tracking modes Dynamic - Update every frame, Static - Update using an anchor, Adaptive - Update every 5 frames, or try increasing the marker size. Note that the size of the marker specified in the Reference Image Library should be as precise as possible and in meters. 

Login to post a comment