33
Augmented Reality su iPhone Il caso Meteo360 x Lucio Riccardi Stefano Zingarini

Il caso Meteo360 x - she.xiaprojects.comshe.xiaprojects.com/whymca10/slides.pdf · Augmented Reality per Iphone - Il caso Meteo360 About us xiaprojects.com & @xiateam ... Perché

Embed Size (px)

Citation preview

Augmented Reality su iPhoneIl caso Meteo360 x

Lucio RiccardiStefano Zingarini

Augmented Reality per Iphone - Il caso Meteo360

About us

xiaprojects.com & @xiateam

FAEY3WMPTNRE

Augmented Reality per Iphone - Il caso Meteo360

About us

Palo Alto (USA) e Pisa in ToscanaOltre 10 anni di esperienza su DB e WEB APPLICATIONOltre 70.000 utenti attivi in tutta Europa15 ingegneri coinvolti full time per Ricerca e Sviluppo

Mobile devices

Enterprise SaaS/Apps

•Sync Engine•BPM Engine•WF/Web Form Editor•Mobile Application•DB/MS-Office

JFJMLRN7RFLF

Augmented Reality per Iphone - Il caso Meteo360

Intro: Roundup

AR & iPhone Hardware

É l’ora dell’AR su Smartphone?

Sviluppo di Meteo360

7MH7XXTL4LJM

Augmented Reality per Iphone - Il caso Meteo360

Il primo dispositivo per AR?

“History of AR” http://bit.ly/bpsc383N3FPYXRNH3H

Augmented Reality per Iphone - Il caso Meteo360

Il tempo dell’AR

“History of AR” http://bit.ly/bpsc38

‘68

’92

’92

’93

’97

’96

’97

HMT6TFRPYTYL

Augmented Reality per Iphone - Il caso Meteo360

Il tempo dell’AR

Now

Supporto su iPhone dal firmware 3.1

EFPXKR6MHH9H

Augmented Reality per Iphone - Il caso Meteo360

Possibilità e dubbi

Per quanto ancora sarà un “hot topic”?

Perché dovresti pensare di implementarlo in un’applicazione esistente?

Ci sono opportunità di sviluppare nuove applicazioni basate sull’AR?

KJTPAPPF6HFY

Augmented Reality per Iphone - Il caso Meteo360

Geolocation & Api Mashup

Api MashupGeolocatedData

App Data

Advertising

GovernmentAnswers

Search

Security

Blogging

Mapping

Shipping

Shopping

Calendar

MedicalSocial

MessagingMusic

News

Events

Travel

Photos

Video

Weather

Real EstateWiki

Games

X4YKJTFPL7WW

Augmented Reality per Iphone - Il caso Meteo360

Geolocation & Api Mashup

Api MashupGeolocatedData

App Data

JWL736NMN976

Augmented Reality per Iphone - Il caso Meteo360

Perchè AR nella mia App?

Pro:Qualità in tipologie di App “mature” (mercato saturo)

Visibilità: recensioni e blog

Presenza su Keywords “calde” in App Store

NTY3L3JP3WLW

Augmented Reality per Iphone - Il caso Meteo360

AR Hype Trend

Source: Augmented Times http://bit.ly/bFoV4f

Augmented Reality

NEW!!!

Hype Cycle

YTTMXJ3X6F6L

Augmented Reality per Iphone - Il caso Meteo360

AR Frameworks per iPhone

SDK per Apps STANDALONE

ARToolkit Pro (based on ARToolkit)

Unifeye(Metaio)

Wikitude

PTAM for iPhone

Pricing

995$ per App + 5% Revenue(per anno)

2000$ per App (rumors)

Free to use

Contact sales :)

XJWARLNKMME4

Augmented Reality per Iphone - Il caso Meteo360

AR Frameworks per iPhone

Sviluppo di Layers per AR Browsers

Layar

Junaio(Metaio)

Wikitude Worlds

AR Content Store($ for Layers)

“Promozione”★Servizi★Advertising★Giochi

JPPFP7FJXJM9

Augmented Reality per Iphone - Il caso Meteo360

AR: tecnologie 2D e 3D

DIFFICOLT

A’

FX39N7FAX7P9

Augmented Reality per Iphone - Il caso Meteo360

Meteo360 Augmented Weather Reality

9LAFR9MWFJ6W

Augmented Reality per Iphone - Il caso Meteo360

Meteo360 & ARInformazioni tradizionali Input innovativo Fotocamera

AugmentedReality

ARKJKRAETREY

Augmented Reality per Iphone - Il caso Meteo360

iPhone Hardware & AR

iphone is the best device to develop ar ready apps, fast, reliable

foto immagine iphone con delle frecce che ruotano per indicare il i perni di rotazione

elenco caratteristiche hardware iphone e un esempio di velocità di refresh e di precisione

Connessione internet - Bussola - Accelerometro - GPS

KJTHWAJEHEH9

Augmented Reality per Iphone - Il caso Meteo360

A Simple Implementation

quick & dirty

metodo 2d

programmazione ad oggetti: UIView addSubview

dal SDK 3.1 apple da la possibilità di accedere alla cameraView

prima? (esempio di 4 righe di objc che decompone una classe uiview)

3.1

-(void) explode:(id)aView level:(int)level{if ([aView isKindOfClass:[UIView.... class]]){//! some funny and important operations}if (level < DeepLevel) {for (UIView *subview in [aView subviews]) {! [self explode:subview level:(level + 1)];

JJWAMR44NHK4

Augmented Reality per Iphone - Il caso Meteo360

Layers & ObjectsScelte di sviluppo//! Callback at the end of animationS-(void)someAnimationDidStop:(NSString *)animationID finished:(BOOL)finished context:(void *)duration{! //! Next step is?}//! User changed the view by moving the phone... (accelerometer 0.2 to 0.8)-(void)gotoFlat:(NSUInteger)isYes:(NSUInteger)OtherIssue{//! A little optimization... :D! if(isAnimating)return;//! Take care about this BEGIN!! [UIView beginAnimations:[NSString stringWithFormat:@"MyNameIs-%d",isYes] context:self];//! receiver instance (yes, think on - + - +)! [UIView setAnimationDelegate:self];//! matched selector, make your own!!! :D! [UIView setAnimationDidStopSelector:@selector(someAnimationDidStop:finished:context:)];//! float...! [UIView setAnimationDuration:0.5];//! how steps are done! [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];//! Now we fill the body for the animation: every line is a step, if you overwrite the same property the animation will be keyed on every single value! sky.alpha=1.0; //! Top view!! foregroundSky.alpha=1.0;! scrollView.alpha=0.0;! camera.view.alpha=0.0;! mapView.alpha=0.0;! [UIView commitAnimations];//! Take care about this COMMIT!!! :D

Y969MPYTATLX

Augmented Reality per Iphone - Il caso Meteo360

Sviluppo 360°: 2D(fake 3D)

EFJ6M3HFX7JY

Augmented Reality per Iphone - Il caso Meteo360

Sensori: Bussola- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)coordinates fromLocation:(CLLocation *)oldLocation

coordinates.coordinate

- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)heading

heading.magneticHeading!

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

acceleration.x acceleration.y acceleration.z

X93EN3NXK7LT

Augmented Reality per Iphone - Il caso Meteo360

Hint: Metal Detector

JM6JX3LM6499

Augmented Reality per Iphone - Il caso Meteo360

Sensori: Bussola e Accelerometro (compensazione)

0+90 -90

Compensazione bussola%360

CompensazioneAccelerometro

0,2-0,8

P7FWMEY4FTYJ

Augmented Reality per Iphone - Il caso Meteo360

Transform Matrix//! The map(kit) View will follow the current compass angle!!! :D[mapView setTransform:CGAffineTransformMakeRotation(-M_PI/180*(heading.magneticHeading))];//! I think I would like to write more than 1 code line... :)

XJ96A4WX7AXT

Augmented Reality per Iphone - Il caso Meteo360

Rotazione degli oggetti Camera & Angoli (modalità 360°)

GPS: posizione nello spazioBussola: Direzione di puntamento

Accelerometro: Altezza puntamentoCamera: Visuale di 45°

Visualizzazione di Dati Geolocalizzati

+

Augmented Reality App

=

6EMAW7TM7E94

Augmented Reality per Iphone - Il caso Meteo360

iPad Hardware & Augmented Virtual Reality

compensazione lack camera, idea delle foto

li diciamo i nomi di yahoo e flickr? o ci teniamo tutto per noi?

3XN4WTT6RNPL

Augmented Reality per Iphone - Il caso Meteo360

Conversione iPhone➙ iPad//! Full screen

[[UIApplication sharedApplication] setStatusBarHidden:YES];//! Take care about screen size!!!!view=[[UIView alloc] initWithFrame:CGRectMake(0, 0,window.frame.size.height, window.frame.size.width)];MySplash=[[splashView alloc] initWithImage:[UIImage ...]];//! UIView container[window addSubview:view];//! The splash screen is UIView * too, but we load on top of the other “windows”[window addSubview:MySplash];//! Start fancy animations :D[MySplash startSplash];//! Bring the base layer to the user[window makeKeyAndVisible];//! To commit changes on the screen we fork to another selector: obj-C power :D[self performSelector:@selector(backgroundThreadSelector) withObject:nil...];

49L97WE3FWR6

Augmented Reality per Iphone - Il caso Meteo360

NSData *json//! json encoding library

SBJSON *p=[[SBJSON alloc] init];//! We have a dictionary of images, strings, data, arrays...//! all objective C serializable type :)//! Warning!! NSNull cannot be stored into file plist :(NSString *j=[p stringWithObject:ALotOfBeautifulData];//! iPhone support zlib is a great features, we can use it//! Remeber to deflate compressed data php://input on the serverint error = compress([j mutableBytes],! ! ! ! &destSize,! ! ! ! [j bytes],! ! ! ! [j length]);NSMutableURLRequest *urlRequest =[NSMutableURLRequest bla...];[urlRequest setHTTPMethod:@"POST"];[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];[urlRequest setHTTPBody: d];//! just done, a few code lines to upload with 80% compression :D to your favorite web server!!

KJXE763WN7AW

Augmented Reality per Iphone - Il caso Meteo360

Risultato: The good, The Bad & The ugly

RTJN4P4T7YN3

Augmented Reality per Iphone - Il caso Meteo360

Finito lo sviluppo, e ora?

Promozione2 Giorni

Pubblicazione1 Giorno + Tempo di attesa

MantenimentoMesi :)

JMRNEX7Y4K6P

Augmented Reality per Iphone - Il caso Meteo360

Com’è finita con Meteo360

Prime 2 settimane su App Store

Y4EPHJM9JP4J

Augmented Reality per Iphone - Il caso Meteo360

Grazie dell’attenzione

"Look ahead, and pay attention to what the visionaries are talking about right now... AR has long-term implications for smart cities, green tech, education, entertainment, and global industry. This is serious business, but it has to be done right."

Robert Rice

FALWJR7XTNJY