Creating a floating 3D model over an image target
A common way to use AR to enhance the world that’s seen through the device’s camera is to recognize a target image and either display a different image or animation in its place, or add a 3D model to the view that tracks the location of the target image.
We’ll do the latter in this recipe, making a 3D model appear over a book’s cover image that we will add to a library.
Figure 17.25: A 3D “car” model displayed over the book cover image in our AR phone app
Getting ready
This recipe builds upon the previous recipe, so make a copy of that project and use the copy.
You’ll also need a target image. Either take a photo of an object in your home/office or use the provided book cover image called tesla_book.jpg
in the 17_06
folder. You’ll also need to print the image out or display the image onscreen while running the AR app on your phone.