Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Augmented image getting detected but not tracked

I am working on augmented image example in arcore where I am able to detect the image but the image is not getting tracked and the object is not getting placed.I am referring augmented image example from codelabs. I have changed the image (hand made image), whose arcoreimg score in 100 and also done following changes to the code. It's getting detected continuously but not tracked.

config.setUpdateMode(Config.UpdateMode.LATEST_CAMERA_IMAGE);
config.setFocusMode(Config.FocusMode.AUTO);
like image 338
Sam Avatar asked Sep 13 '25 05:09

Sam


2 Answers

For successive detection and tracking of Augmented Images in ARCore follow these basic rules:

  • In ARCore 1.15+, if your image doesn't move (like a poster on a wall), you should attach a global anchor to the image to increase the tracking's stability.

  • The physical image has to occupy 1/4 of the camera feed.

  • The smallest image resolution should be 300 x 300 pixels.

  • You must track your image under appropriate lighting conditions. Barely-lit room is not good environment for AR user experience.

  • It's much better to specify an expected physical size of a tracked image. Additional metadata improves tracking performance, especially for large physical images (more than 75 cm in size).

  • When ARCore detected a desired image with no expected physical size specified, its tracking state will be automatically paused. For user it means that ARCore has recognised the image, but hasn't gathered enough data to estimate its location in 3D space. Do not use the image's pose and size estimates until the image's tracking state is tracking.

  • Augmented Images support .png and .jpeg. However, avoid heavy compression for .jpeg.

  • Use images with a high contrast content, it's no matter whether they are color or black-and-white.

  • Avoid images with repetitive patterns (like Polka dot) and sparse features.

like image 107
Andy Jazz Avatar answered Sep 15 '25 18:09

Andy Jazz


Andy's answer is correct, but maybe insufficiently specific. I had this issue as well and as soon as I added an expected width in meters, it started working almost immediately.

Instead of augmentedImageDatabase.addImage(DEFAULT_IMAGE_NAME, augmentedImageBitmap);

Use augmentedImageDatabase.addImage(DEFAULT_IMAGE_NAME, augmentedImageBitmap, <width in meters>);

Then it'll start tracking almost as soon as it is detected and you won't have to deal with this paused shenanigans. Worked great for me with a 7cm image with a 95 score. It even works great with an image with a score of 40. 40 score image with a set width works better than 100 score image without a set width.

like image 32
rexar5 Avatar answered Sep 15 '25 19:09

rexar5