Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Augmented Reality for Android Application Development
Augmented Reality for Android Application Development

Augmented Reality for Android Application Development: As an Android developer, including Augmented Reality (AR) in your mobile apps could be a profitable new string to your bow. This tutorial takes you through every aspect of AR for Android with lots of hands-on exercises.

eBook
$9.99 $18.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Augmented Reality for Android Application Development

Chapter 2. Viewing the World

In this chapter, we will learn how to develop the first element of any mobile AR application: the view of the real world. To understand the concept of the view of the real world, we will take a look at the camera application you have installed on your mobile. Open any photo capture application (camera app) you have preinstalled on your android device, or you may have downloaded from the Google Play store (such as Camera Zoom FX, Vignette, and so on). What you can see on the viewfinder of the application is a real-time video stream captured by the camera and displayed on your screen.

If you move the device around while running the application, it seems like you were seeing the real world "through" the device. Actually, the camera seems to act like the eye of the device, perceiving the environment around you. This process is also used for mobile AR development to create a view of the real world. It's the concept of see-through video that we introduced in the previous...

Understanding the camera


Phone manufacturers are always competing to equip your smartphone with the most advanced camera sensor, packing it with more features, such as higher resolution, better contrast, faster video capture, new autofocus mode, and so on. The consequence is that the capabilities (features) of the mobile phone cameras can differ significantly between smartphone models or brands. Thankfully, the Google Android API provides a generic wrapper for the underlying camera hardware unifying the access for the developer: the Android camera API. For your development, an efficient access to the camera needs a clear understanding of the camera capabilities (parameters and functions) available through the API. Underestimating this aspect will result in slow-running applications or pixelated images, affecting the user experience of your application.

Camera characteristics

Cameras on smartphones nowadays share many characteristics with digital point-and-shoot cameras. They generally support...

Accessing the camera in Android


To start with, we will create a simple camera activity to get to know the principles of camera access in Android. While there are convenient Android applications that provide quick means for snapping a picture or recording a video through Android intents, we will get our hands dirty and use the Android camera API to get a customized camera access for our first application.

We will guide you, step-by-step, in creating your first app showing a live camera preview. This will include:

  • Creating an Eclipse project

  • Requesting relevant permissions in the Android Manifest file

  • Creating SurfaceView to be able to capture the preview frames of the camera

  • Creating an activity that displays the camera preview frames

  • Setting camera parameters

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support...

Live camera view in JME


In the preceding example, you got a glimpse of how you can access the Android camera with a low-level graphics library (standard Android library). Since we want to perform Augmented Reality, we will need to have another technique to overlay the virtual content over the video view. There are different ways to do that, and the best method is certainly to use a common view, which will integrate the virtual and video content nicely. A powerful technique is to use a managed 3D graphics library based on a scenegraph model. A scenegraph is basically a data structure that helps you to build elaborate 3D scenes more easily than in plain OpenGL® by logically organizing basic building blocks, such as geometry or spatial transformations. As you installed JME in the first chapter, we will use this specific library offering all the characteristics we need for our AR development. In this subsection, we will explore how you can use JME to display the video. Different to our preceding...

Summary


In this chapter you got an introduction to the world of Android camera access and how to display camera images in the JME 3D rendering engine. You learned about various camera parameters and the compromises you have made (for example, between image size and frames per second) to get an efficient camera access. We also introduced the simplest way of displaying a camera view in an Android activity, but also explained why you need to go beyond this simple example to integrate the camera view and 3D graphics in a single application. Finally, we helped you through the implementation of a JME application, which renders the camera background. The knowledge you gained in this chapter is the beneficial basis to overlay the first 3D objects on the camera view—a topic we will discuss in the next chapter.

Left arrow icon Right arrow icon

Key benefits

  • Understand the main concepts and architectural components of an AR application
  • Step-by-step learning through hands-on programming combined with a background of important mathematical concepts
  • Efficiently and robustly implement some of the main functional AR aspects

Description

Augmented Reality offers the magical effect of blending the physical world with the virtual world, which brings applications from your screen into your hands. AR redefines advertising and gaming, as well as education. It will soon become a technology that will have to be mastered as a necessity by mobile application developers. Augmented Reality for Android Application Development enables you to implement sensor-based and computer vision-based AR applications on Android devices. You will learn about the theoretical foundations and practical details of implemented AR applications, and you will be provided with hands-on examples that will enable you to quickly develop and deploy novel AR applications on your own. Augmented Reality for Android Application Development will help you learn the basics of developing mobile AR browsers, how to integrate and animate 3D objects easily with the JMonkeyEngine, how to unleash the power of computer vision-based AR using the Vuforia AR SDK, and will teach you about popular interaction metaphors. You will get comprehensive knowledge of how to implement a wide variety of AR apps using hands-on examples. This book will make you aware of how to use the AR engine, Android layout, and overlays, and how to use ARToolkit. Finally, you will be able to apply this knowledge to make a stunning AR application.

Who is this book for?

Augmented Reality for Android Application Development is for Android mobile application developers who are familiar with Android Development Tools and deployment, JMonkeyEngine, and the Vuforia SDK.

What you will learn

  • Decide which AR approach is right for you: sensor-based or computer vision-based
  • Get camera-access for Android
  • Overlay 3D objects on physical images with the JMonkeyEngine
  • Learn how to use the GPS sensor to locate yourself in the world
  • Master orientation sensors
  • Learn the building blocks of implementing Augmented Reality Browsers
  • Understand the power of the Vuforia SDK for computer vision-based AR
  • Enable user interaction with Augmented Objects

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 25, 2013
Length: 134 pages
Edition : 1st
Language : English
ISBN-13 : 9781782168553
Vendor :
Google
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Nov 25, 2013
Length: 134 pages
Edition : 1st
Language : English
ISBN-13 : 9781782168553
Vendor :
Google
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 118.97
Android Application Programming with OpenCV
$38.99
Voice Application Development for Android
$40.99
Augmented Reality for Android Application Development
$38.99
Total $ 118.97 Stars icon
Banner background image

Table of Contents

7 Chapters
Augmented Reality Concepts and Tools Chevron down icon Chevron up icon
Viewing the World Chevron down icon Chevron up icon
Superimposing the World Chevron down icon Chevron up icon
Locating in the World Chevron down icon Chevron up icon
Same as Hollywood – Virtual on Physical Objects Chevron down icon Chevron up icon
Make It Interactive – Create the User Experience Chevron down icon Chevron up icon
Further Reading and Tips Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(10 Ratings)
5 star 40%
4 star 40%
3 star 10%
2 star 10%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Mauro Figueiredo Jan 19, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great introductory book for those that want to build augmented reality applications for android mobile systems. It is well written describing step by step the installation and integration of the required SDKs and developer tools so that even less experienced programmers can easily follow.Chapter 1 introduces the main concepts of augmented reality and describes the installation of the required SDKs and tools. What I like from chapters 2 and 3 is that it clearly explains the programming of the mobile camera along with the 3D graphics rendering (including basic concepts from computer graphics) required for every AR application.Following chapters clearly shows how to develop the basic building blocks for an AR browser supported by both global tracking and computer vision-based AR .I would recommend this book for bachelors or master degrees students that want to quickly develop an augmented reality app.
Amazon Verified review Amazon
SuJo Jan 16, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Augmented Reality Android Application DevelopmentStarting off the book jumps into having you install SDKs and developer tools. The author guides you all through the settings and teaches you what to do in order to get up and running. I enjoy when programming books start with some theory behind the actual concepts the book starts off with this and sets the pace. I also want to mention that the book is very well organized each chapter leads into the next chapter and branches off with the previous concepts that you were learning. I like how the author organized the code blocks using a different font however it would've been nice if there was a light gray background behind them but I won't deduct points for that.Chapters 1 through 3 seemed to just be basic information along with getting you up and running it was very easy-to-follow along and the camera perspectives were explained very clearly, and I appreciated the images in the book that verified the output. Chapter 4 is when things start to ramp up you begin with a lot of math exercises and you set up for tracking and that's when you get into the really fun stuff, ray picking was explained fairly well.All in all this book was a great starter guide for setting up all the SDKs required for 3D rendering and setting up virtual environments. [...] Check it out, it's well worth it!
Amazon Verified review Amazon
Peter Backx Jan 28, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a short and very practical introduction to Augmented Reality on Android. It starts with the very basic (how to use the camera, how to do 3D), but by the end of the book you've got a fully functioning app.The book can be used be beginner's to Android development, but a little experience will help in getting through some of the tougher parts (like the native development)The only downside of the book: it's a very short book. By the time you've finished the book, you'll be so eager to learn more that you wish this book was twice or thrice it's actual length.
Amazon Verified review Amazon
Kiyoshi Kiyokawa Jan 21, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book covers a whole set of topics to quickly start developing augmented reality applications on an Android device. It is very well organized and written. What I like about this book is that the authors are well known AR researchers in the community, and they provide reliable and easy-to-understand descriptions not only on the software development aspects but also on more general aspects of AR throughout the chapters. In most of chapters, general concepts and tips are given (e.g. cameras and coordinate systems) first then the real programming examples are explained. As far as you follow the instructions step by step, you will never get lost and will succeed in trying the examples at your hand. In this sense, this book will be perfect for students and self learning.This book is very self-contained in both positive and negative meanings. After running several demonstrations, readers may be at a loss as to what to do next. I would have liked to see more advanced topics and at least gateways to such topics. Chapter 7 provides some advanced topics, but they are mostly still within the software framework they introduced. It may have been more interesting if the book also introduces some state of the art research issues to read such as image based outdoor tracking and 3D reconstruction. Considering the target readers and the page count, I can understand they omit them though.All in all, this is an excellent book as a starter. I would use it for my class to teach.
Amazon Verified review Amazon
Shane Jan 20, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a good high level over view of Augmented Reality and Android. The AR and Android development are very rich topics. I really appreciated the links and the required software sections. This is one of the more difficult parts of starting to develop software: just getting started. There were a cases where the authors made trade-offs. One of the key areas was in the emulation of an android platform. The authors neglected the vast differences between CPUs and chipsets. These play a vital role in day-to-day development. The prepackaged code worked on a few emulation environments but failed on others. If you own a android device this is a easy book to work through but if you are looking to deploy an end product on numerous devices then this will only be a guide for AR based theory (at a very high level).
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.