This document summarizes iPhone augmented reality capabilities and existing apps. It discusses the history of VR/AR including work by Sutherland and Nintendo. Existing AR apps mentioned include Theolodite, DishPointer, and Layar. The AR Drone is described as an iPhone-controlled remote flyer. Baby steps to building AR apps are outlined from a basic "Hello World" to adding positioning, orientation sensors and tagging landmarks. Challenges with accuracy and battery life are noted. The potential for transitioning to a full 3D virtual world is discussed.
12. From zero to hero: starting with the
“View based application” template
and ending with a tagged landmark
• Hello (Augmented) World
• Picture Level (rotation about 1 axis)
• Artificial Horizon (rotation about 2 axes)
• Artificial Horizon + Compass (add cardinal
direction / translation)
• GPS Locator: tagging a landmark (add
location / translation)
13. Baby steps to a better reality :
Hello (Augmented) World
• Goal: Overlay some text onto the live
camera image
• UIImagePicker + overlay
• Step 1: collect underwear
r3
15. Picture (er, shopping cart) Level
• Goal: Overlay a level bar on the center of
the live camera view
• Requires: real time info regarding the
rotation of the camera about the Z-axis
• Adds UIAccelerometer
r7
17. #pragma mark UIAccelerometerDelegate
- (void)accelerometer:(UIAccelerometer *)accelerometer
didAccelerate:(UIAcceleration *)acceleration;
{
double angle = -atan2(acceleration.y, acceleration.x) - M_PI/2.0;
double angleInDeg = angle * 180.0f/M_PI;
[label setText: [NSString stringWithFormat:@"Angle: %f", angleInDeg]];
overlayGraphicView.transform = CGAffineTransformMakeRotation(angle);
}
Video will go here
18. Artificial Horizon
• Goal: Keep the bar on the horizon (not just
level)
• Compensate for rotation along x-axis
• Need to know field of view of camera to
find horizon position
• ~53 degrees vertical
• ~37.5 degrees horizontal
r8
19. iPhone View Angles
53 Degrees Vertical*
37.5 Degrees Horizontal
*Close to this, but not exactly on the iPhone 4
23. GPS Hotel Locator
• Goal: Speakers must find Hotel in any (um)
state, so we’ll tag it for them.
• Add GPS location with
CLLocationManager
• Compensate for “the hotel is over there
and I’m looking over here”
24. In other words:
Given the position of the hotel, the position of
the iPhone, and the direction the iPhone is pointing,
we want to know the cardinal direction of the
hotel relative to the iPhone’s pointing direction
and the elevation of the hotel relative the iPhone’s
pointing direction in order to overlay a label
onto the hotel in real time.
27. Gotchas
• GPS and compass haven’t enough accuracy
to place advertisements or labels on near
objects.
• On a “bad day” your iPhone’s version of
“here” might be a 1/2 kilometer circle
around a cell tower... or worse.
• Location updates will drain battery...
Quickly.
• But the dream is alive.
28. “Best practices... ” or “stuff we noticed
making a demo AR app”
• Don’t try to tag a near object, inaccuracies
compound as you near the target.
• Check altitude / location accuracy: Phone
can’t get altitude w/o good GPS fix. See
documentation for accuracy (check for -1)
• The broad side of the barn is easier to hit.
• Bottom line: “here” isn’t here, yet.
32. AV Foundation
• Allows processing of the frame before
display
• Very complicated to setup
• Check out the WWDC samples and video
33. What’s next?
• Smoothing / Filtering Sensor Data (wobble
wobble)
• Full-on 3D AR world -- Dancing hippos in
swimming pools with Dolphins...
• Image tracking to mitigate the swings
•?
• Profit!
34. How we might transition to
a Full virtual 3D World
• Need useful local coordinate system to
map onto OpenGL; we’re pretty close with
the demo code, actually.
• Match OpenGL transform matrices with
current position relative to some scene we
might want to add to the real world,
camera parameters; GLULookAt...
• Need to not mind that compositing could
be very slow...
35. ARKit :
Existing AR Toolkit for iPhone
• http://github.com/zac/iphonearkit/
• Marker based
• Simple CoreLocation - based data model
• Hasn’t been updated for a while
36. What counts as AR?
• Video with... ?
• Overlay?
• Must be Interactive?
• GPS?
• Modify the virtual environment?
37. AR News Sources
• Bruce Sterling’s Beyond the Beyond blog
http://www.wired.com/
beyond_the_beyond/
• Tish Shute:
http://www.ugotrade.com/
• Twitter streams:
@anselm, @bruces, @tishshute, @brady
• O’Reilly Radar:
http://radar.oreilly.com