I would like to create a mock AR (Aug Reality) demo using the camera whereby you can move the camera around and see information about the world around you. In the first instance as this would just be an initial demo I thought a sensible approach may be to use a large transparent image and based on the angle of the device a different portion of the image would be shown, so as you would tilt it up the image would move down and a different portion of the image would be shown, and as you would pan left and right the corresponding part of that image would show, appearing like there's an overlay over specific parts of the scene (from the camera).
My initial investigation leads me to believe the CMMotionManager class is probably the best to use to handle the device angle position and after which the centre of the image overlay would be altered accordingly.
My question is 2 fold:
Thanks,
To answer the first part of your question:
I think you're on the right track by using CMMotionManager since it provides stable estimates (by combing gyroscope, accelerometer, and magnetometer signals) of the devices roll, pitch, and yaw. It's much more stable than using the gyro or accelerometer by themselves.
Second part of your question:
There is a good tutorial on augmented reality on the iphone on Ray Wenderlich's website .
Good luck.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.