Search code examples
arcore

Combining ground plane and augmented images


I'm looking to create an app with ARCore that will combine plane detection and augmented images. Basically, I want to detect the plane first (similar to the helloAR example where you can place down Android mascots), then scan an image (using augmented images) and have the model that appears from the image transfer on to the plane so that it is independent of the image. Does anyone know how I can do this? I'm using Unity.


Solution

  • Your device will always detect surfaces unless you disable plane detection even in Augmented Image example it detects surfaces which in fact help for accuracy of tracking. It simply does not visualize detected planes.

    Since your question is too broad i will just give you some tips.

    Session.GetTrackables() is a generic function so with this you can get both AugmentedImage and DetectedPlane keep detected trackables in a list lets say it is called m_AllPlanes. Make sure you work with only the first detected plane or just disable plane detection after first plane is detected. Then get trackable images. Visualize your model and transfer the model to m_AllPlanes[0].CenterPose.position