SlideShare une entreprise Scribd logo
1  sur  46
AUGMENTED REALITY


     Paolo Quadrani

         MitAPP




      www.MitAPP.com
DEFINITION



• Isa term for a live direct or indirect view of a physical real-
  world environment whose elements are augmented by virtual
  computer-generated imagery. (Wikipedia)




       www.MitAPP.com
HISTORY
•   1966: was invented the head mounted display.

•   1992: The term Augmented Reality has been coined by Thomas
    Caudell.

•   1999: Hirokazu Kato develops ARToolKit and is demonstrated at
    Siggraph in the same year.

•   2008: Wikitude AR Travel Guide is launched with the G1
    Android Phone.

•   2010: acrossair, AR Browser brings AR to the mobile user on the
    iPhone 3Gs.

    www.MitAPP.com
TECHNOLOGY - TRACKING
•   Mobile devices use

    •   Digital camera.

    •   Accelerometers.

    •   GPS.

    •   Gyroscopes, Solid state compasses.

    •   RFID.

    •   Wireless sensors.

           www.MitAPP.com
PROCEDURE

• ImageRegistration: this define
 the way of retrieving the real
 world reference system on
 which over-impose
 computer generated images.

• Toachieve the point above
 are used computer vision
 techniques.

       www.MitAPP.com
LIGHTWEIGHT AUGMENTED
        REALITY
                           es: Wikitude
• Use GPS tracking to
 retrieve the device
 position.

• Usesolid state compass
 to manage the device
 orientation.


    www.MitAPP.com
Ristoranti - Google Maps




     GEO-REFERENCED DATA

• Datacontent has to be
 associated to a GPS position

 • Data   access through

   • web     service

   • local   to a database


     www.MitAPP.com                       © Google
WORKFLOW


               Accelerom
Compass                    Camera
                  eter




Acquire the GPS Position
WORKFLOW


 GPS                      Accelerom
           Compass                    Camera
Position                     eter




           Acquire the GPS Position
RETRIEVING GPS POSITION

• Classes

  • CLLocationManager

  • CLLocation

• Protocol

  • CLLocationManagerDelegate


      www.MitAPP.com
RETRIEVING GPS POSITION
Delegates Methods

 - (void)locationManager:(CLLocationManager*)manager
     didUpdateToLocation:(CLLocation*)newLocation
           fromLocation:(CLLocation*)oldLocation;

 - (void)locationManager:
 (CLLocationManager*)manager
              didFailWithError:(NSError*)error;


   www.MitAPP.com
RETRIEVING GPS POSITION
Delegates Methods

 - (void)locationManager:(CLLocationManager*)manager
     didUpdateToLocation:(CLLocation*)newLocation
           fromLocation:(CLLocation*)oldLocation;


 - (void)locationManager:(CLLocationManager*)manager
               didFailWithError:(NSError*)error;


   www.MitAPP.com
RETRIEVING GPS POSITION
CLLocationManager* manager =
[[CLLocationManager alloc] init];
[manager setDelegate:self];
[manager
setDesiredAccuracy:kCLLocationAccuracyBest];
[manager setDistanceFilter:10];
[manager startUpdatingLocation];




 www.MitAPP.com
RETRIEVING GPS POSITION
CLLocationManager* manager = [[CLLocationManager
alloc] init];
[manager setDelegate:self];
[manager
setDesiredAccuracy:kCLLocationAccuracyBest];
[manager setDistanceFilter:10]; // Distance expressed in
meters
[manager startUpdatingLocation];




 www.MitAPP.com
RETRIEVING GPS POSITION

CLLocationManager* manager = [[CLLocationManager alloc]
init];
[manager setDelegate:self];
[manager setDesiredAccuracy:kCLLocationAccuracyBest];
[manager setDistanceFilter:10];
[manager startUpdatingLocation];




 www.MitAPP.com
RETRIEVING GPS POSITION
- (void)locationManager:(CLLocationManager*)manager
didUpdateToLocation:(CLLocation*)newLocation fromLocation:
(CLLocation*)oldLocation {




    // Use the coordinate data
    double lat = newLocation.coordinate.latitude;
    double lon = newLocation.coordinate.longitude;
}

    www.MitAPP.com
RETRIEVING GPS POSITION
- (void)locationManager:(CLLocationManager*)manager
didUpdateToLocation:(CLLocation*)newLocation fromLocation:
(CLLocation*)oldLocation {

    NSTimeInterval howRecent =
    [newLocation.timestamp timeIntervalSinceNow];

    if (howRecent < -10) return;

    if (newLocation.horizontalAccuracy > 100) return;

    // Use the coordinate data
    double lat = newLocation.coordinate.latitude;
    double lon = newLocation.coordinate.longitude;
}

    www.MitAPP.com
RETRIEVING GPS POSITION
- (void)locationManager:(CLLocationManager*)manager
didUpdateToLocation:(CLLocation*)newLocation fromLocation:
(CLLocation*)oldLocation {

    NSTimeInterval howRecent =
    [newLocation.timestamp timeIntervalSinceNow];

    if (howRecent < -10) return;

    if (newLocation.horizontalAccuracy > 100) return;

    // Use the coordinate data
    double lat = newLocation.coordinate.latitude;
    double lon = newLocation.coordinate.longitude;
}

    www.MitAPP.com
WORKFLOW


 GPS                         Accelerom
                                                 Camera
Position                        eter




       Get the orientation through the Compass
WORKFLOW


 GPS                         Accelerom
               Compass                           Camera
Position                        eter




       Get the orientation through the Compass
USING THE COMPASS

• Classes

  • CLLocationManager

  • CLHeading

• Protocol

  • CLLocationManagerDelegate


      www.MitAPP.com
USING THE COMPASS
Delegates Methods

 - (void)locationManager:(CLLocationManager*)manager
     didUpdateHeading:(CLHeading*)newHeading;

 - (void)locationManagerShouldDisplayHeadingCalibration:
 (CLLocationManager*)manager;




   www.MitAPP.com
USING THE COMPASS
Delegates Methods

 - (void)locationManager:(CLLocationManager*)manager
     didUpdateHeading:(CLHeading*)newHeading;
 -
 (void)locationManagerShouldDisplayHeadingCalibration:
 (CLLocationManager*)manager;



   www.MitAPP.com
USING THE COMPASS
CLLocationManager* manager = [[CLLocationManager alloc] init];
[manager setDelegate:self];
[manager setDesiredAccuracy:kCLLocationAccuracyBest];
[manager setDistanceFilter:10];
[manager startUpdatingLocation];

if ([manager headingAvailable]) {
    [manager setHeadingFilter:2];
    [manager startUpdatingHeading];
} else {
    // Show a message to notify the user that compass is required in AR
    apps.
}


  www.MitAPP.com
USING THE COMPASS
CLLocationManager* manager = [[CLLocationManager alloc] init];
[manager setDelegate:self];
[manager setDesiredAccuracy:kCLLocationAccuracyBest];
[manager setDistanceFilter:10];
[manager startUpdatingLocation];

if ([manager headingAvailable]) {
    [manager setHeadingFilter:2]; // filter value is in degrees.
    [manager startUpdatingHeading];
} else {
    // Show a message to notify the user that compass is required in AR
    apps.
}

  www.MitAPP.com
RETRIEVING GPS POSITION
- (void)locationManager:
(CLLocationManager*)manager didUpdateHeading:
(CLHeading*)newHeading {

    // Use the compass data
    // angle in degree with respect to the magnetic
    north
    double heading = newHeading.magneticHeading;
}

    www.MitAPP.com
WORKFLOW


 GPS
               Compass                          Camera
Position




Catch the Acceleration for detecting device orientation
           and virtual item fine positioning
WORKFLOW


 GPS
               Compass         Accelerometer    Camera
Position




Catch the Acceleration for detecting device orientation
           and virtual item fine positioning
ACCELEROMETERS

• Classes

  • UIAccelerometer

  • UIAcceleration

• Protocol

  • UIAccelerometerDelegate


      www.MitAPP.com
USING THE COMPASS

Delegate Method


 - (void)accelerometer:
 (UIAccelerometer*)accelerometer
     didAccelerate:(UIAcceleration*)acceleration;



   www.MitAPP.com
ACCELEROMETERS

UIAccelerometer* accelerometer = [UIAccelerometer
sharedAccelerometer];
[accelerometer setUpdateInterval: 1/25];
[accelerometer setDelegate:self];




 www.MitAPP.com
ACCELEROMETERS

UIAccelerometer* accelerometer =
[UIAccelerometer sharedAccelerometer];
[accelerometer setUpdateInterval: 1/25];
[accelerometer setDelegate:self];




 www.MitAPP.com
ACCELEROMETERS
- (void)accelerometer:
(UIAccelerometer*)accelerometer
    didAccelerate:(UIAcceleration*)acceleration {

    // Use the accelerometer data
    double accel_x = acceleration.x;
    double accel_y = acceleration.y;
    double accel_z = acceleration.z;
}

    www.MitAPP.com
WORKFLOW


 GPS                         Accelerom
               Compass
Position                        eter




      Get the real world from the device camera
WORKFLOW


 GPS                         Accelerom
               Compass                        Camera
Position                        eter




      Get the real world from the device camera
GETTING THE IMAGE FROM
         THE CAMERA


• UIImagePickerController   class

• UIImagePickerControllerDelegate   protocol




      www.MitAPP.com
GETTING THE IMAGE FROM
       THE CAMERA
if([UIImagePickerController isSourceTypeAvailable:
       UIImagePickerControllerSourceTypeCamera]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [picker setDelegate:self];
    [picker setShowCameraControls:NO];
    [picker setNavigationBarHidden:YES];
    [picker setCameraOverlayView:[self view]];
    [self presentModalViewController:picker animated:NO];
    }




     www.MitAPP.com
GETTING THE IMAGE FROM
       THE CAMERA
if([UIImagePickerController isSourceTypeAvailable:
       UIImagePickerControllerSourceTypeCamera]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [picker setDelegate:self];
    [picker setShowCameraControls:NO];
    [picker setNavigationBarHidden:YES];
    [picker setCameraOverlayView:[self view]];
    [self presentModalViewController:picker animated:NO];
    }




     www.MitAPP.com
GETTING THE IMAGE FROM
       THE CAMERA
if([UIImagePickerController isSourceTypeAvailable:
       UIImagePickerControllerSourceTypeCamera]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [picker setDelegate:self];
    [picker setShowCameraControls:NO];
    [picker setNavigationBarHidden:YES];
    [picker setCameraOverlayView:[self view]];
    [self presentModalViewController:picker animated:NO];
    }




     www.MitAPP.com
GETTING THE IMAGE FROM
       THE CAMERA
if([UIImagePickerController isSourceTypeAvailable:
       UIImagePickerControllerSourceTypeCamera]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [picker setDelegate:self];
    [picker setShowCameraControls:NO];
    [picker setNavigationBarHidden:YES];
    [picker setCameraOverlayView:[self view]];
    [self presentModalViewController:picker animated:NO];
    }




     www.MitAPP.com
GETTING THE IMAGE FROM
       THE CAMERA
if([UIImagePickerController isSourceTypeAvailable:
       UIImagePickerControllerSourceTypeCamera]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [picker setDelegate:self];
    [picker setShowCameraControls:NO];
    [picker setNavigationBarHidden:YES];
    [picker setCameraOverlayView:[self view]];
    [self presentModalViewController:picker animated:NO];
    }




     www.MitAPP.com
GETTING THE IMAGE FROM
       THE CAMERA
if([UIImagePickerController isSourceTypeAvailable:
       UIImagePickerControllerSourceTypeCamera]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [picker setDelegate:self];
    [picker setShowCameraControls:NO];
    [picker setNavigationBarHidden:YES];
    [picker setCameraOverlayView:[self view]];
    [self presentModalViewController:picker animated:NO];
    }




     www.MitAPP.com
PUTTING ALL TOGETHER

• Existing   libraries to use as starting point:

  • NyARToolKit  (free) - http://nyatla.jp/nyartoolkit/wiki/
    index.php?FrontPage.en

  • ARKit    (free) - http://www.iphonear.org/

  • metaio    (free and commercial) - http://www.metaio.com/

       www.MitAPP.com
AR APPLICATIONS ON APPLE
           STORE


• Layar

• Wikitude

• Around   Me



     www.MitAPP.com
VIDEO




www.MitAPP.com
MITAPP



           http://www.mitapp.com/

                 paolo.quadrani@gmail.com

                  cafiniomar@gmail.com

www.MitAPP.com

Contenu connexe

Similaire à Augmented Reality on iPhone Applications

Enhance your world with ARKit. UA Mobile 2017.
Enhance your world with ARKit. UA Mobile 2017.Enhance your world with ARKit. UA Mobile 2017.
Enhance your world with ARKit. UA Mobile 2017.UA Mobile
 
Oculus Rift DK2 + Leap Motion Tutorial
Oculus Rift DK2 + Leap Motion TutorialOculus Rift DK2 + Leap Motion Tutorial
Oculus Rift DK2 + Leap Motion TutorialChris Zaharia
 
How to use geolocation in react native apps
How to use geolocation in react native appsHow to use geolocation in react native apps
How to use geolocation in react native appsInnovationM
 
Breizhcamp Rennes 2011
Breizhcamp Rennes 2011Breizhcamp Rennes 2011
Breizhcamp Rennes 2011sekond0
 
Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK
Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK
Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK AugmentedWorldExpo
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008xilinus
 
Introduction to MapKit
Introduction to MapKitIntroduction to MapKit
Introduction to MapKitRob C
 
20150811 potatotips 20
20150811 potatotips 2020150811 potatotips 20
20150811 potatotips 20tkawashita
 
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONELUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONEMicrosoft Mobile Developer
 
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the UglyProvisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the Uglychristianbourgeois
 
Recoil at Codete Webinars #3
Recoil at Codete Webinars #3Recoil at Codete Webinars #3
Recoil at Codete Webinars #3Mateusz Bryła
 

Similaire à Augmented Reality on iPhone Applications (20)

Enhance your world with ARKit. UA Mobile 2017.
Enhance your world with ARKit. UA Mobile 2017.Enhance your world with ARKit. UA Mobile 2017.
Enhance your world with ARKit. UA Mobile 2017.
 
Oculus Rift DK2 + Leap Motion Tutorial
Oculus Rift DK2 + Leap Motion TutorialOculus Rift DK2 + Leap Motion Tutorial
Oculus Rift DK2 + Leap Motion Tutorial
 
Geolocation and Mapping
Geolocation and MappingGeolocation and Mapping
Geolocation and Mapping
 
How to use geolocation in react native apps
How to use geolocation in react native appsHow to use geolocation in react native apps
How to use geolocation in react native apps
 
jai krishna.ppt.pptx
jai krishna.ppt.pptxjai krishna.ppt.pptx
jai krishna.ppt.pptx
 
Breizhcamp Rennes 2011
Breizhcamp Rennes 2011Breizhcamp Rennes 2011
Breizhcamp Rennes 2011
 
Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK
Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK
Philipp Nagele (CTO, Wikitude) An Insider Deep-Dive into the Wikitude SDK
 
Where 2.0
Where 2.0Where 2.0
Where 2.0
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008
 
MSI UI Software Design Report
MSI UI Software Design ReportMSI UI Software Design Report
MSI UI Software Design Report
 
Introduction to MapKit
Introduction to MapKitIntroduction to MapKit
Introduction to MapKit
 
20150811 potatotips 20
20150811 potatotips 2020150811 potatotips 20
20150811 potatotips 20
 
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONELUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
 
Airflow at WePay
Airflow at WePayAirflow at WePay
Airflow at WePay
 
DIY Uber
DIY UberDIY Uber
DIY Uber
 
Core Location in iOS
Core Location in iOSCore Location in iOS
Core Location in iOS
 
FLAR Workflow
FLAR WorkflowFLAR Workflow
FLAR Workflow
 
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the UglyProvisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
 
Recoil at Codete Webinars #3
Recoil at Codete Webinars #3Recoil at Codete Webinars #3
Recoil at Codete Webinars #3
 
Google Maps Api
Google Maps ApiGoogle Maps Api
Google Maps Api
 

Plus de Omar Cafini

Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015
Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015
Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015Omar Cafini
 
La mia storia di Libero Professionista
La mia storia di Libero ProfessionistaLa mia storia di Libero Professionista
La mia storia di Libero ProfessionistaOmar Cafini
 
PRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESS
PRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESSPRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESS
PRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESSOmar Cafini
 
Mobile & territorio
Mobile & territorioMobile & territorio
Mobile & territorioOmar Cafini
 
Sviluppare e vendere applicazioni per iPhone
Sviluppare e vendere applicazioni per iPhoneSviluppare e vendere applicazioni per iPhone
Sviluppare e vendere applicazioni per iPhoneOmar Cafini
 
Applicazioni iPhone: un mercato per tutti?
Applicazioni iPhone: un mercato per tutti?Applicazioni iPhone: un mercato per tutti?
Applicazioni iPhone: un mercato per tutti?Omar Cafini
 
iPhone Development Tools
iPhone Development ToolsiPhone Development Tools
iPhone Development ToolsOmar Cafini
 
MarcheIN - Il centro benessere delle relazioni
MarcheIN - Il centro benessere delle relazioniMarcheIN - Il centro benessere delle relazioni
MarcheIN - Il centro benessere delle relazioniOmar Cafini
 
presentazione MarcheIN
presentazione MarcheINpresentazione MarcheIN
presentazione MarcheINOmar Cafini
 
Bologna In 23 Febbraio2009
Bologna In 23 Febbraio2009Bologna In 23 Febbraio2009
Bologna In 23 Febbraio2009Omar Cafini
 
SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...
SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...
SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...Omar Cafini
 

Plus de Omar Cafini (12)

Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015
Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015
Airbag studio - Convegno Autoimprenditorialità - Senigallia 2015
 
La mia storia di Libero Professionista
La mia storia di Libero ProfessionistaLa mia storia di Libero Professionista
La mia storia di Libero Professionista
 
PRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESS
PRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESSPRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESS
PRESENTAZIONE DEI PRINCIPALI SOCIAL MEDIA E LORO UTILIZZO NEL BUSINESS
 
Mobile & territorio
Mobile & territorioMobile & territorio
Mobile & territorio
 
Sviluppare e vendere applicazioni per iPhone
Sviluppare e vendere applicazioni per iPhoneSviluppare e vendere applicazioni per iPhone
Sviluppare e vendere applicazioni per iPhone
 
Applicazioni iPhone: un mercato per tutti?
Applicazioni iPhone: un mercato per tutti?Applicazioni iPhone: un mercato per tutti?
Applicazioni iPhone: un mercato per tutti?
 
Making An App
Making An AppMaking An App
Making An App
 
iPhone Development Tools
iPhone Development ToolsiPhone Development Tools
iPhone Development Tools
 
MarcheIN - Il centro benessere delle relazioni
MarcheIN - Il centro benessere delle relazioniMarcheIN - Il centro benessere delle relazioni
MarcheIN - Il centro benessere delle relazioni
 
presentazione MarcheIN
presentazione MarcheINpresentazione MarcheIN
presentazione MarcheIN
 
Bologna In 23 Febbraio2009
Bologna In 23 Febbraio2009Bologna In 23 Febbraio2009
Bologna In 23 Febbraio2009
 
SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...
SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...
SolidITcamp - Piattaforma Open per favorire la comunicazione delle realtà non...
 

Dernier

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 

Dernier (20)

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 

Augmented Reality on iPhone Applications

  • 1. AUGMENTED REALITY Paolo Quadrani MitAPP www.MitAPP.com
  • 2. DEFINITION • Isa term for a live direct or indirect view of a physical real- world environment whose elements are augmented by virtual computer-generated imagery. (Wikipedia) www.MitAPP.com
  • 3. HISTORY • 1966: was invented the head mounted display. • 1992: The term Augmented Reality has been coined by Thomas Caudell. • 1999: Hirokazu Kato develops ARToolKit and is demonstrated at Siggraph in the same year. • 2008: Wikitude AR Travel Guide is launched with the G1 Android Phone. • 2010: acrossair, AR Browser brings AR to the mobile user on the iPhone 3Gs. www.MitAPP.com
  • 4. TECHNOLOGY - TRACKING • Mobile devices use • Digital camera. • Accelerometers. • GPS. • Gyroscopes, Solid state compasses. • RFID. • Wireless sensors. www.MitAPP.com
  • 5. PROCEDURE • ImageRegistration: this define the way of retrieving the real world reference system on which over-impose computer generated images. • Toachieve the point above are used computer vision techniques. www.MitAPP.com
  • 6. LIGHTWEIGHT AUGMENTED REALITY es: Wikitude • Use GPS tracking to retrieve the device position. • Usesolid state compass to manage the device orientation. www.MitAPP.com
  • 7. Ristoranti - Google Maps GEO-REFERENCED DATA • Datacontent has to be associated to a GPS position • Data access through • web service • local to a database www.MitAPP.com © Google
  • 8. WORKFLOW Accelerom Compass Camera eter Acquire the GPS Position
  • 9. WORKFLOW GPS Accelerom Compass Camera Position eter Acquire the GPS Position
  • 10. RETRIEVING GPS POSITION • Classes • CLLocationManager • CLLocation • Protocol • CLLocationManagerDelegate www.MitAPP.com
  • 11. RETRIEVING GPS POSITION Delegates Methods - (void)locationManager:(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation*)oldLocation; - (void)locationManager: (CLLocationManager*)manager didFailWithError:(NSError*)error; www.MitAPP.com
  • 12. RETRIEVING GPS POSITION Delegates Methods - (void)locationManager:(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation*)oldLocation; - (void)locationManager:(CLLocationManager*)manager didFailWithError:(NSError*)error; www.MitAPP.com
  • 13. RETRIEVING GPS POSITION CLLocationManager* manager = [[CLLocationManager alloc] init]; [manager setDelegate:self]; [manager setDesiredAccuracy:kCLLocationAccuracyBest]; [manager setDistanceFilter:10]; [manager startUpdatingLocation]; www.MitAPP.com
  • 14. RETRIEVING GPS POSITION CLLocationManager* manager = [[CLLocationManager alloc] init]; [manager setDelegate:self]; [manager setDesiredAccuracy:kCLLocationAccuracyBest]; [manager setDistanceFilter:10]; // Distance expressed in meters [manager startUpdatingLocation]; www.MitAPP.com
  • 15. RETRIEVING GPS POSITION CLLocationManager* manager = [[CLLocationManager alloc] init]; [manager setDelegate:self]; [manager setDesiredAccuracy:kCLLocationAccuracyBest]; [manager setDistanceFilter:10]; [manager startUpdatingLocation]; www.MitAPP.com
  • 16. RETRIEVING GPS POSITION - (void)locationManager:(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation: (CLLocation*)oldLocation { // Use the coordinate data double lat = newLocation.coordinate.latitude; double lon = newLocation.coordinate.longitude; } www.MitAPP.com
  • 17. RETRIEVING GPS POSITION - (void)locationManager:(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation: (CLLocation*)oldLocation { NSTimeInterval howRecent = [newLocation.timestamp timeIntervalSinceNow]; if (howRecent < -10) return; if (newLocation.horizontalAccuracy > 100) return; // Use the coordinate data double lat = newLocation.coordinate.latitude; double lon = newLocation.coordinate.longitude; } www.MitAPP.com
  • 18. RETRIEVING GPS POSITION - (void)locationManager:(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation: (CLLocation*)oldLocation { NSTimeInterval howRecent = [newLocation.timestamp timeIntervalSinceNow]; if (howRecent < -10) return; if (newLocation.horizontalAccuracy > 100) return; // Use the coordinate data double lat = newLocation.coordinate.latitude; double lon = newLocation.coordinate.longitude; } www.MitAPP.com
  • 19. WORKFLOW GPS Accelerom Camera Position eter Get the orientation through the Compass
  • 20. WORKFLOW GPS Accelerom Compass Camera Position eter Get the orientation through the Compass
  • 21. USING THE COMPASS • Classes • CLLocationManager • CLHeading • Protocol • CLLocationManagerDelegate www.MitAPP.com
  • 22. USING THE COMPASS Delegates Methods - (void)locationManager:(CLLocationManager*)manager didUpdateHeading:(CLHeading*)newHeading; - (void)locationManagerShouldDisplayHeadingCalibration: (CLLocationManager*)manager; www.MitAPP.com
  • 23. USING THE COMPASS Delegates Methods - (void)locationManager:(CLLocationManager*)manager didUpdateHeading:(CLHeading*)newHeading; - (void)locationManagerShouldDisplayHeadingCalibration: (CLLocationManager*)manager; www.MitAPP.com
  • 24. USING THE COMPASS CLLocationManager* manager = [[CLLocationManager alloc] init]; [manager setDelegate:self]; [manager setDesiredAccuracy:kCLLocationAccuracyBest]; [manager setDistanceFilter:10]; [manager startUpdatingLocation]; if ([manager headingAvailable]) { [manager setHeadingFilter:2]; [manager startUpdatingHeading]; } else { // Show a message to notify the user that compass is required in AR apps. } www.MitAPP.com
  • 25. USING THE COMPASS CLLocationManager* manager = [[CLLocationManager alloc] init]; [manager setDelegate:self]; [manager setDesiredAccuracy:kCLLocationAccuracyBest]; [manager setDistanceFilter:10]; [manager startUpdatingLocation]; if ([manager headingAvailable]) { [manager setHeadingFilter:2]; // filter value is in degrees. [manager startUpdatingHeading]; } else { // Show a message to notify the user that compass is required in AR apps. } www.MitAPP.com
  • 26. RETRIEVING GPS POSITION - (void)locationManager: (CLLocationManager*)manager didUpdateHeading: (CLHeading*)newHeading { // Use the compass data // angle in degree with respect to the magnetic north double heading = newHeading.magneticHeading; } www.MitAPP.com
  • 27. WORKFLOW GPS Compass Camera Position Catch the Acceleration for detecting device orientation and virtual item fine positioning
  • 28. WORKFLOW GPS Compass Accelerometer Camera Position Catch the Acceleration for detecting device orientation and virtual item fine positioning
  • 29. ACCELEROMETERS • Classes • UIAccelerometer • UIAcceleration • Protocol • UIAccelerometerDelegate www.MitAPP.com
  • 30. USING THE COMPASS Delegate Method - (void)accelerometer: (UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration; www.MitAPP.com
  • 31. ACCELEROMETERS UIAccelerometer* accelerometer = [UIAccelerometer sharedAccelerometer]; [accelerometer setUpdateInterval: 1/25]; [accelerometer setDelegate:self]; www.MitAPP.com
  • 32. ACCELEROMETERS UIAccelerometer* accelerometer = [UIAccelerometer sharedAccelerometer]; [accelerometer setUpdateInterval: 1/25]; [accelerometer setDelegate:self]; www.MitAPP.com
  • 33. ACCELEROMETERS - (void)accelerometer: (UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration { // Use the accelerometer data double accel_x = acceleration.x; double accel_y = acceleration.y; double accel_z = acceleration.z; } www.MitAPP.com
  • 34. WORKFLOW GPS Accelerom Compass Position eter Get the real world from the device camera
  • 35. WORKFLOW GPS Accelerom Compass Camera Position eter Get the real world from the device camera
  • 36. GETTING THE IMAGE FROM THE CAMERA • UIImagePickerController class • UIImagePickerControllerDelegate protocol www.MitAPP.com
  • 37. GETTING THE IMAGE FROM THE CAMERA if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [picker setDelegate:self]; [picker setShowCameraControls:NO]; [picker setNavigationBarHidden:YES]; [picker setCameraOverlayView:[self view]]; [self presentModalViewController:picker animated:NO]; } www.MitAPP.com
  • 38. GETTING THE IMAGE FROM THE CAMERA if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [picker setDelegate:self]; [picker setShowCameraControls:NO]; [picker setNavigationBarHidden:YES]; [picker setCameraOverlayView:[self view]]; [self presentModalViewController:picker animated:NO]; } www.MitAPP.com
  • 39. GETTING THE IMAGE FROM THE CAMERA if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [picker setDelegate:self]; [picker setShowCameraControls:NO]; [picker setNavigationBarHidden:YES]; [picker setCameraOverlayView:[self view]]; [self presentModalViewController:picker animated:NO]; } www.MitAPP.com
  • 40. GETTING THE IMAGE FROM THE CAMERA if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [picker setDelegate:self]; [picker setShowCameraControls:NO]; [picker setNavigationBarHidden:YES]; [picker setCameraOverlayView:[self view]]; [self presentModalViewController:picker animated:NO]; } www.MitAPP.com
  • 41. GETTING THE IMAGE FROM THE CAMERA if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [picker setDelegate:self]; [picker setShowCameraControls:NO]; [picker setNavigationBarHidden:YES]; [picker setCameraOverlayView:[self view]]; [self presentModalViewController:picker animated:NO]; } www.MitAPP.com
  • 42. GETTING THE IMAGE FROM THE CAMERA if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [picker setDelegate:self]; [picker setShowCameraControls:NO]; [picker setNavigationBarHidden:YES]; [picker setCameraOverlayView:[self view]]; [self presentModalViewController:picker animated:NO]; } www.MitAPP.com
  • 43. PUTTING ALL TOGETHER • Existing libraries to use as starting point: • NyARToolKit (free) - http://nyatla.jp/nyartoolkit/wiki/ index.php?FrontPage.en • ARKit (free) - http://www.iphonear.org/ • metaio (free and commercial) - http://www.metaio.com/ www.MitAPP.com
  • 44. AR APPLICATIONS ON APPLE STORE • Layar • Wikitude • Around Me www.MitAPP.com
  • 46. MITAPP http://www.mitapp.com/ paolo.quadrani@gmail.com cafiniomar@gmail.com www.MitAPP.com

Notes de l'éditeur

  1. Per poter visualizzare i dati geo referenziati in AR occorre daterminare la propria posizione rispetto ai dati. Occorre quindi far partire il sistema di acquisizione della posizione GPS e utilizzare i dati che da esso provengono per capire quali dati mostrare.
  2. Delegate Method chiamato dal CLLocationManager quando una nuova posizione GPS viene determinata
  3. Delegate Method chiamato dal CLLocationManager quando c&amp;#x2019;&amp;#xE8; stato un errore nel determinarla (es. non c&amp;#x2019;&amp;#xE8; copertira GPS)
  4. Codice necessario a far partire l&amp;#x2019;acquisizione della posizione GPS. Il codice in giallo permette di creare l&amp;#x2019;instanza del location manager. La classe in cui &amp;#xE8; inserito questo codice (in genere un ViewController) diventa la classe delegate del location manager.
  5. I due metodi evidenziati mostrano come sia possibile scegliere l&amp;#x2019;accuratezza del segnala GPS che si desidera avere durante l&amp;#x2019;acquisizione e quale &amp;#xE8; la soglia minima di aggiornamento tra una posizione e l&amp;#x2019;altra espressa in metri.
  6. Il metodo evidenziato permette di far partire il location manager e quindi l&amp;#x2019;acquisizione del segnale GPS appena disponibile.
  7. Primo metodo delegate chiamato dal location manager quando una nuova posizione GPS &amp;#xE8; disponibile. Il parametro newLocation contiene la nuova posizione, mentre in oldLocation &amp;#xE8; presente l&amp;#x2019;ultima delle posizioni valide precedentemente acquisite. Il codice in giallo mostra come estrarre le coordinate geografiche latitudine e longitudine dalla struttura dati CLLocation.
  8. Un controllo necessario da fare prima di estrarre le informazioni relative alle coordinate &amp;#xE8; quello di verificare che tale posizione non sia estratta dalla cache. Occorre quindi controllare il timestamp della &amp;#x2018;newLocation&amp;#x2019; e verificare che non sia antecedente al tempo attiale di una certa soglia, altrimenti si tratta di un valore preso dalla cache =&gt; da scartare.
  9. Altro controllo da fare &amp;#xE8; relativo all&amp;#x2019;accuratezza della posizione pervenuta dal manager. In questo caso (codice in giallo) si sta scartando la posizione GPS che ha un&amp;#x2019;accuratezza maggiore di 100m. La soglia con cui confrontare il valore estratto da newLocation dipende dal tipo di applicazione che si sta realizzando, quindi va scelto caso per caso. Per un&amp;#x2019;app di AR l&amp;#x2019;accuratezza da accettare dovrebbe essere inferiore o uguale a 10m.
  10. Oltre alla posizione GPS occorre determinare anche l&amp;#x2019;orientazione dell&amp;#x2019;utente rispetto al nord magnetico in maniera tale da capire (per una determinata posizione GPS) verso quali dati l&amp;#x2019;utente si sta orientando e quindi stabilire quali dati mostrare e quali nascondere dalla visualizzazione.
  11. Il metodo evidenziato rappresenta il metodo delegate relativo all&amp;#x2019;aggiornamento del compasso a stato solido presente nell&amp;#x2019;iPhone 3Gs. Questo metodo viene chiamato nel momento in cui un nuovo valore di oriemtamento &amp;#xE8; disponibile.
  12. Il metodo evidenziato rappresenta il metodo delegate relativo all&amp;#x2019;aggiornamento del compasso a stato solido presente nell&amp;#x2019;iPhone 3Gs. Questo metodo viene chiamato nel momento in cui si presenta un&amp;#x2019;interferenza elettromagnetica e/o non &amp;#xE8; possibile calcolare l&amp;#x2019;orientamento. Questo methodo &amp;#xE8; quello che permette di visualizzare l&amp;#x2019;icona della bussola in presenza di disturbi.
  13. Il codice in giallo permette di eseguire il test della disponibilit&amp;#xE0; del compasso a stato solido nell&amp;#x2019;iPhone su cui viene eseguito il codice. In caso di esito positivo, si proceder&amp;#xE0; alla configurazione del compasso.
  14. Il codice evidenziato mostra il parametro di configurazione della frequenza di aggiornamento dei valori (nell&amp;#x2019;esempio ogni 2 gradi) e l&amp;#x2019;istruzione necessaria a far partire l&amp;#x2019;acquisizione dei valori relativi al compasso.
  15. Il codice evidenziato mostra come estrarre l&amp;#x2019;informazione dell&amp;#x2019;orientamento dell&amp;#x2019;utente rispetto al nord magnetico espresso in gradi dalla struttura CLHeading.
  16. Questo tipo di sensore permette di avere un controllo fine dei movimenti dell&amp;#x2019;utente e quindi aggiostare le icone rappresentanti i dati in maniera tale da filtrare i movimenti rapidi del dispositivo. Inoltre &amp;#xE8; possibile gestire eventuali cambi di orientamento del dispositivo e aggiornare conseguentemente la posizione delle icone sullo schermo.
  17. Il metodo rappresenta il delegate relativo all&amp;#x2019;aggiornamento dell&amp;#x2019;accelerometro presente nell&amp;#x2019;iPhone/iPod. Questo metodo viene chiamato nel momento in cui un nuovo valore di accelerazione &amp;#xE8; disponibile.
  18. Il codice in giallo mostra il modo di avere un riferimento all&amp;#x2019;accelerometro di sistema. Non si pu&amp;#xF2; creare una nuova instanza, ma occorre far riferimento all&amp;#x2019;UIAccelerometer unico di sistema.
  19. Il codice in giallo mostra poi come customizzare la frequenza di aggiornamento dell&amp;#x2019;acquisizione dei valori di accelerazione e l&amp;#x2019;assegnazione del delegate oltre ad assegnare chi ricever&amp;#xE0; i dati di aggiornamento scatener&amp;#xE0; l&amp;#x2019;inizio dell&amp;#x2019;acquisizione delle accelerazioni.
  20. Il metodo evidenziato rappresenta il metodo delegate relativo all&amp;#x2019;aggiornamento dell&amp;#x2019;acelerometro. Il parametro &amp;#x2018;acceleration&amp;#x2019; contiene i valori di accelerazione lungo i 3 assi x, y e z.
  21. Ora che si hanno a disposizione tutti i dati di posizione orientamento ed accelerazione, occorre acquisire le informazioni dal mondo reale in maniera da poterci poi sovrapporre quelle provenienti dal mondo &amp;#x2018;sintetico&amp;#x2019;.
  22. Il codice evidenziato permette di eseguire un controllo sul dispositivo della presenza o meno della camera. Per un&amp;#x2019;app di AR &amp;#xE8; decisamente fondamentale che questo tipo di input sia presente.
  23. Si proceder&amp;#xE0; quindi all&amp;#x2019;instanza del&amp;#x2019;ImagePickerController.
  24. ... e all&amp;#x2019;abilitazione del picker per restituirci l&amp;#x2019;immagine proveniente dalla camera e non dalla libreria delle immagini salvate. Quindi assegnamo il delegate per poter ricevere le chiamate di aggiornamento dal picker controller.
  25. Per un&amp;#x2019;app di AR &amp;#xE8; fondamentale l&amp;#x2019;immersivit&amp;#xE0; dei dati nel mondo reale, quindi i due metodi evidenziati permettono di eliminare gli elementi grafici 2D presenti normalmente nel picker che permettono di scattare una foto (il primo) e la navigazione delle foto scattate (il secondo).
  26. Questo &amp;#xE8; il metodo fondamentale per l&amp;#x2019;app di AR, in quanto permette di definire la vista che verr&amp;#xE0; sovrapposta a quela di visualizzazione dell&amp;#x2019;immagine proveniente dalla camera dell&amp;#x2019;iPhone. In questa vista verranno poi disegnate le icone che rappresentano i dati sintetici da sovrapporre all&amp;#x2019;immagine della camera.
  27. E&amp;#x2019; quindi giunto il momento di mostrare l&amp;#x2019;immagine della camera mediante il metodo evidenziato. In questo caso non &amp;#xE8; necessario mostrarlo con l&amp;#x2019;animazione classica dei ViewController presentati in modalit&amp;#xE0; modale, quindi al flag &amp;#x2018;animated&amp;#x2019; viene assegnato NO.
  28. In questa slide viene presentata una lista di librerie disponibili per iPhone (Objective-C) che permettono di costruire un&amp;#x2019;applicazione di AR senza dover pertire da zero. Ovviamente la complessit&amp;#xE0; di un&amp;#x2019;app di AR non &amp;#xE8; banale, quindi conviene appoggiarsi alle librerie esistenti magari modificandole per adattarle all&amp;#x2019;applicazione del caso.