Using ARcore Sceneform Library
- The Augmented Images APIs in ARCore lets you build AR apps that can detect and augment 2D images in the user's environment,such as posters or product packaging. In this Project, we will see how to detect and augmented image and show information using a ViewRenderable or show a 3-D model. We provide a set of reference images. Once ARCore begins tracking an image, it provides estimates for image position and orientation each frame. All tracking happens on the device. No internet connection is required to detect and track images. ARcore scan the image that we store in the database once an image is detected. ARcore create 3D image of that image.
There are some following steps
-
In build.gradle of App, add a Sceneform UX library, Firebase ML kit and Sceneform Assets library.
-
Compile Option to support Java which is needed for Sceneform library.
-
In Android Manifets.xml file add permission for AR features in app, Camera permission, Internet permission add meta data to make it available for "Google Play Services for AR".
-
Add the ArSceneView as shown which is provided by Sceneform ux library.
-
Install Google Sceneform tools (beta) plugin from android studio only.
-
Create an augmented image
-
Add image in drawable folder in app.
-
Add glb file in assets folder in app.
-
Match the image in camera frame with the augmented image
-
If matched, place an AR Object.
-
Run the App.
- Sceneform- Sceneform is a 3D framework that makes it easy for you to build ARCore apps without OpenGL. We are using 1.15.0 version of google.ar.sceneform.ux:sceneform-ux.
- We are using Camera permission and hardware.camera.ar permission.
- In the beginning scanning the image was quite difficult for us because we are scaning ramdom images.
- I our scenario, we had to identify the pressure sensor. Unfortunately the android ARCore SDK does not support the 3-D objects recognition. So we were not able to identify the sensor. Instead, we added an image on top of the sensors with the‘Sensor Id’. This is what we used as an augmented image as well.
- Our future planning about this project is to move the 3d model when we touching the screen.