SlideShare une entreprise Scribd logo
1  sur  46
Augmented Reality
Joan Puig Sanz
9 Apr 2014
Agenda
1. What is Augmented Reality
2. Existing Platforms
3. BeyondAR Framework
1. What can we do with it?
4. What is the next step?
Augmented Reality
• According to WikiPedia:
“Augmented reality (AR) is a live direct or indirect view of a physical, real-
world environment whose elements are augmented (or supplemented)
by computer-generated sensory input such as sound, video, graphics or
GPS data”
Augmented Reality
• According to WikiPedia:
“Augmented reality (AR) is a live direct or indirect view of a physical, real-
world environment whose elements are augmented (or supplemented)
by computer-generated sensory input such as sound, video, graphics or
GPS data”
Make Augmented Reality
• Using geo localization
• Image recognition
• Sensors
– Accelerometer
– Magnetic field
– Compass
– Motion tracking camera
– …
EXISTING TOOLS
Existing Tools
• Vuforia
• Layar
• Wikitude
• Droidar
• Mixare
• Google Tango
• BeyondAR
• …
Vuforia
• Proprietary
• Available for Android and iOS
• Unity support
• Big community
• Collect some data form the user: related to the
scanned images
• Target recognition
– Device database: free < 100 images
– Cloud Database: not free >100
Vuforia
• https://www.youtube.com/watch?v=UOfN1pl
W_Hw
Layar
• Proprietary
• SDK Available for Android and iOS
–Geo localization
–Image recognition
Layar
• App browser (Android and iOS)
– Geo Layers and image recognition
Demo time!
Wikitude
• Proprietary
• SDK Available for Android, iOS, Epson
Moverio and Vuzix.
–Geo localization
–Image recognition
Wikitude
• Proprietary
• SDK Available for Android, iOS, Epson
Moverio and Vuzix.
–Geo localization
–Image recognition
Wikitude
• Proprietary
• SDK Available for Android, iOS, Epson
Moverio and Vuzix.
–Geo localization
–Image recognition
Wikitude
• Proprietary
• SDK Available for Android, iOS, Epson
Moverio and Vuzix.
–Geo localization
–Image recognition
Wikitude
• Extensions for PhoneGap and Titanium
• App browser (Android, iOS and BB10)
– Geo Layers and image recognition
Droidar
• GPL3
• SDK for Android
• Location based
• Supports 3D modeling
/bitstars/droidar
Mixare
• GPL3
• SDK for Android and iOS
• Location based
• Canvas
– Slow performance
• No code changes since 2 years ago
/mixare
Google Tango
https://www.youtube.com/watch?v=Qe10ExwzCqk
BeyondAR
• Apache 2
• SDK for Android
• Location based
• 3D
• Active development
/BeyondAR
LET’S CODE!
/BeyondAR
Example App available on
Google play
BeyondAR
Getting started
• Import the library in your project
• Update Manifest
<!-- Minimum permissions for BeyondAR -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- For BeyondAR this is not mandatory unless you want to load something from the network -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- BeyondAR needs the following features-->
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<uses-feature android:name="android.hardware.sensor.compass" />
/BeyondAR
BeyondAR
Getting started
Create the UI
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/parentFrameLayout" >
<fragment
android:id="@+id/beyondarFragment"
android:name="com.beyondar.android.fragment.BeyondarFragmentSupport"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
/BeyondAR
BeyondAR
Getting started
Create the UI
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.example);
// ...
mBeyondarFragment = (BeyondarFragmentSupport)
getSupportFragmentManager().findFragmentById (R.id.beyondarFragment);
// ...
}
BeyondarFragment: Class that manages the camera and the OpenGL surface
/BeyondAR
BeyondAR
Getting started
Create the AR world and add an AR object
// We create the world object
World myWorld = new World(this);
myWorld.setGeoPosition(41.90533734214473d, 2.565848038959814d);
World: Container for all the BeyondarObjects
• Try to manage all BeyondarObjects using this class
• Responsible for the user location
• You can add plugins
/BeyondAR
BeyondAR
Getting started
Create the AR world and add an AR object
// We create the world object
World myWorld = new World(this);
myWorld.setGeoPosition(41.90533734214473d, 2.565848038959814d);
// Create an object
GeoObject go1 = new GeoObject();
go1.setGeoPosition(41.90523339794433d, 2.565036406654116d);
go1.setImageResource(R.drawable.my_image);
go1.setName(”Hello World");
// Add the object
myWorld.addBeyondarObject(go1);
// give the world to the fragment
mBeyondarFragment.setWorld(myWorld);
/BeyondAR
BeyondAR
Getting started
Create the AR world and add an AR object
// We create the world object
World myWorld = new World(this);
myWorld.setGeoPosition(41.90533734214473d, 2.565848038959814d);
// Create an object
GeoObject go1 = new GeoObject();
go1.setGeoPosition(41.90523339794433d, 2.565036406654116d);
go1.setImageResource(R.drawable.my_image);
go1.setName(”Hello World");
// Add the object
myWorld.addBeyondarObject(go1);
// give the world to the fragment
mBeyondarFragment.setWorld(myWorld);
/BeyondAR
BeyondAR
Getting started
Interaction with the AR Objects
/BeyondAR
BeyondAR
Getting started
Interaction with the AR Objects
OnTouchBeyondarViewListener OnClickBeyondarObjectListener
mBeyondarFragment.setOnTouchBeyondarViewListener(this);
mBeyondarFragment.setOnClickBeyondarObjectListener(this);
@Override
public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) {
if (beyondarObjects.size() > 0) {
Toast.makeText(this, "Clicked on: " +
beyondarObjects.get(0).getName(), Toast.LENGTH_LONG).show();
}
}
/BeyondAR
BeyondAR
Getting started
Interaction with the AR Objects
OnTouchBeyondarViewListener OnClickBeyondarObjectListener
mBeyondarFragment.setOnTouchBeyondarViewListener(this);
mBeyondarFragment.setOnClickBeyondarObjectListener(this);
@Override
public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) {
if (beyondarObjects.size() > 0) {
Toast.makeText(this, "Clicked on: " +
beyondarObjects.get(0).getName(), Toast.LENGTH_LONG).show();
}
}
/BeyondAR
OTHER FEATURES
1. Location utils
2. Views in the AR world
3. Take screenshots
4. Plugins
5. …
/BeyondAR
BeyondAR
Using location utils
• Easy way to use the location services
LocationManager locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
// We need to set the LocationManager to the BeyondarLocationManager.
BeyondarLocationManager.setLocationManager(locationManager);
BeyondarLocationManager: Helper to use the location services.
• Retrieves the best location using GPS and the network providers
• Can be used with LocationListener, World or GeoObject
/BeyondAR
BeyondAR
Using location utils
Create the AR world and add an AR object
@Override
protected void onResume() {
super.onResume();
// When the activity is resumed it is time to enable the
// BeyondarLocationManager
BeyondarLocationManager.enable();
}
@Override
protected void onPause() {
super.onPause();
// To avoid unnecessary battery usage disable BeyondarLocationManager
// when the activity goes on pause.
BeyondarLocationManager.disable();
}
BeyondarLocationManager.addWorldLocationUpdate(myWorld);
BeyondarLocationManager.addGeoObjectLocationUpdate(user);
/BeyondAR
OTHER FEATURES
1. Location utils
2. Views in the AR world
3. Take screenshots
4. Plugins
5. …
/BeyondAR
BeyondAR
Working with Views
• Attach a View to a BeyondarObject
Extend BeyondarViewAdapter  It follows the same pattern than the
ListAdapter
- Remember to recycle your Views!!
@Override
public View getView(BeyondarObject beyondarObject, View recycledView, ViewGroup parent) {
if (recycledView == null)
recycledView = inflater.inflate(R.layout.beyondar_object_view, null);
TextView textView = (TextView) recycledView.findViewById(R.id.titleTextView);
textView.setText(beyondarObject.getName());
Button button = (Button) recycledView.findViewById(R.id.button);
button.setOnClickListener(myClickListener);
// Once the view is ready we specify the position
setPosition(beyondarObject.getScreenPositionTopRight());
return recycledView;
}
Createtheview
/BeyondAR
BeyondAR
Working with Views
• Make a BeyondarObject from a View
ImageUtils.storeView(view, path, imageName);
// If there are no errors we can tell the object to use the
// view that we just stored
beyondarObject.setImageUri(path + imageName);
/BeyondAR
BeyondAR
Working with Views
• Make a BeyondarObject from a View
ImageUtils.storeView(view, path, imageName);
// If there are no errors we can tell the object to use the
// view that we just stored
beyondarObject.setImageUri(path + imageName);
/BeyondAR
OTHER FEATURES
1. Location utils
2. Views in the AR world
3. Take screenshots
4. Plugins
5. …
/BeyondAR
BeyondAR
Screenshoots
mBeyondarFragment.takeScreenshot(myOnScreenshotListener);
@Override
public void onScreenshot(Bitmap screenshot) {
ImageDialog dialog = new ImageDialog();
dialog.setImage(screenshot);
dialog.show(getSupportFragmentManager(), "ImageDialog");
}
When you are done with the image, remember to recycle it
/BeyondAR
BeyondAR
Screenshoots
mBeyondarFragment.takeScreenshot(myOnScreenshotListener);
@Override
public void onScreenshot(Bitmap screenshot) {
ImageDialog dialog = new ImageDialog();
dialog.setImage(screenshot);
dialog.show(getSupportFragmentManager(), "ImageDialog");
}
When you are done with the image, remember to recycle it
/BeyondAR
OTHER FEATURES
1. Location utils
2. Views in the AR world
3. Take screenshots
4. Plugins
5. …
/BeyondAR
BeyondAR
Plugins
• Main goal:
– Easy to use
– Make your own features
/BeyondAR
BeyondAR
Plugins
• Example: Google Maps Plugin
// As we want to use GoogleMaps, we are going to create the plugin and
// attach it to the World
mGoogleMapPlugin = new GoogleMapWorldPlugin(this);
// Then we need to set the map in to the GoogleMapPlugin
mGoogleMapPlugin.setGoogleMap(mMap);
// Now that we have the plugin created let's add it to our world.
// NOTE: It is better to load the plugins before start adding object in to the world.
mWorld.addPlugin(mGoogleMapPlugin);
/BeyondAR
OTHER FEATURES
1. Location utils
2. Views in the AR world
3. Take screenshots
4. Plugins
5. …
/BeyondAR
What is the next step?
• Get over the WOW effect
• Choose your platform
• Make apps
– Education
– Traveling
– Gaming
beyondar.com
@joanpuigsanz
/Beyondar
46
@beyondar

Contenu connexe

Similaire à mDevcon tour 2014 beyondar

managing georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geomanaging georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geo
gborelli
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
NgLQun
 

Similaire à mDevcon tour 2014 beyondar (20)

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
 
Philipp Nagele (Wikitude): What's Next with Wikitude
Philipp Nagele (Wikitude): What's Next with WikitudePhilipp Nagele (Wikitude): What's Next with Wikitude
Philipp Nagele (Wikitude): What's Next with Wikitude
 
Building VR Applications For Google Cardboard
Building VR Applications For Google CardboardBuilding VR Applications For Google Cardboard
Building VR Applications For Google Cardboard
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with Unity
 
ARCore 101: A Hands-on Workshop
ARCore 101: A Hands-on WorkshopARCore 101: A Hands-on Workshop
ARCore 101: A Hands-on Workshop
 
Primi passi con ARKit & Unity
Primi passi con ARKit & UnityPrimi passi con ARKit & Unity
Primi passi con ARKit & Unity
 
Mobile AR Tutorial
Mobile AR TutorialMobile AR Tutorial
Mobile AR Tutorial
 
Cardboard VR: Building Low Cost VR Experiences
Cardboard VR: Building Low Cost VR ExperiencesCardboard VR: Building Low Cost VR Experiences
Cardboard VR: Building Low Cost VR Experiences
 
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
 
Create Your Own VR Experience
Create Your Own VR ExperienceCreate Your Own VR Experience
Create Your Own VR Experience
 
managing georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geomanaging georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geo
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
 
Developing Windows Phone Apps with Maps and Location Services
Developing Windows Phone Apps with Maps and Location ServicesDeveloping Windows Phone Apps with Maps and Location Services
Developing Windows Phone Apps with Maps and Location Services
 
Mobile AR SDK Tutorial - Augmented World Expo New York 2014
Mobile AR SDK Tutorial - Augmented World Expo New York 2014Mobile AR SDK Tutorial - Augmented World Expo New York 2014
Mobile AR SDK Tutorial - Augmented World Expo New York 2014
 
STEM Camp Virtual Reality
STEM Camp Virtual RealitySTEM Camp Virtual Reality
STEM Camp Virtual Reality
 
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
 
3D Touch: Preparando sua app para o futuro do iOS
3D Touch: Preparando sua app para o futuro do iOS3D Touch: Preparando sua app para o futuro do iOS
3D Touch: Preparando sua app para o futuro do iOS
 
Mobile AR
Mobile ARMobile AR
Mobile AR
 
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialAugmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
 
Building AR and VR Experiences
Building AR and VR ExperiencesBuilding AR and VR Experiences
Building AR and VR Experiences
 

Dernier

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Dernier (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 

mDevcon tour 2014 beyondar

  • 1. Augmented Reality Joan Puig Sanz 9 Apr 2014
  • 2. Agenda 1. What is Augmented Reality 2. Existing Platforms 3. BeyondAR Framework 1. What can we do with it? 4. What is the next step?
  • 3. Augmented Reality • According to WikiPedia: “Augmented reality (AR) is a live direct or indirect view of a physical, real- world environment whose elements are augmented (or supplemented) by computer-generated sensory input such as sound, video, graphics or GPS data”
  • 4. Augmented Reality • According to WikiPedia: “Augmented reality (AR) is a live direct or indirect view of a physical, real- world environment whose elements are augmented (or supplemented) by computer-generated sensory input such as sound, video, graphics or GPS data”
  • 5. Make Augmented Reality • Using geo localization • Image recognition • Sensors – Accelerometer – Magnetic field – Compass – Motion tracking camera – …
  • 7. Existing Tools • Vuforia • Layar • Wikitude • Droidar • Mixare • Google Tango • BeyondAR • …
  • 8. Vuforia • Proprietary • Available for Android and iOS • Unity support • Big community • Collect some data form the user: related to the scanned images • Target recognition – Device database: free < 100 images – Cloud Database: not free >100
  • 10. Layar • Proprietary • SDK Available for Android and iOS –Geo localization –Image recognition
  • 11. Layar • App browser (Android and iOS) – Geo Layers and image recognition Demo time!
  • 12. Wikitude • Proprietary • SDK Available for Android, iOS, Epson Moverio and Vuzix. –Geo localization –Image recognition
  • 13. Wikitude • Proprietary • SDK Available for Android, iOS, Epson Moverio and Vuzix. –Geo localization –Image recognition
  • 14. Wikitude • Proprietary • SDK Available for Android, iOS, Epson Moverio and Vuzix. –Geo localization –Image recognition
  • 15. Wikitude • Proprietary • SDK Available for Android, iOS, Epson Moverio and Vuzix. –Geo localization –Image recognition
  • 16. Wikitude • Extensions for PhoneGap and Titanium • App browser (Android, iOS and BB10) – Geo Layers and image recognition
  • 17. Droidar • GPL3 • SDK for Android • Location based • Supports 3D modeling /bitstars/droidar
  • 18. Mixare • GPL3 • SDK for Android and iOS • Location based • Canvas – Slow performance • No code changes since 2 years ago /mixare
  • 20. BeyondAR • Apache 2 • SDK for Android • Location based • 3D • Active development /BeyondAR
  • 21. LET’S CODE! /BeyondAR Example App available on Google play
  • 22. BeyondAR Getting started • Import the library in your project • Update Manifest <!-- Minimum permissions for BeyondAR --> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- For BeyondAR this is not mandatory unless you want to load something from the network --> <uses-permission android:name="android.permission.INTERNET" /> <!-- BeyondAR needs the following features--> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.sensor.accelerometer" /> <uses-feature android:name="android.hardware.sensor.compass" /> /BeyondAR
  • 23. BeyondAR Getting started Create the UI <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/parentFrameLayout" > <fragment android:id="@+id/beyondarFragment" android:name="com.beyondar.android.fragment.BeyondarFragmentSupport" android:layout_width="match_parent" android:layout_height="match_parent" /> </FrameLayout> /BeyondAR
  • 24. BeyondAR Getting started Create the UI @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.example); // ... mBeyondarFragment = (BeyondarFragmentSupport) getSupportFragmentManager().findFragmentById (R.id.beyondarFragment); // ... } BeyondarFragment: Class that manages the camera and the OpenGL surface /BeyondAR
  • 25. BeyondAR Getting started Create the AR world and add an AR object // We create the world object World myWorld = new World(this); myWorld.setGeoPosition(41.90533734214473d, 2.565848038959814d); World: Container for all the BeyondarObjects • Try to manage all BeyondarObjects using this class • Responsible for the user location • You can add plugins /BeyondAR
  • 26. BeyondAR Getting started Create the AR world and add an AR object // We create the world object World myWorld = new World(this); myWorld.setGeoPosition(41.90533734214473d, 2.565848038959814d); // Create an object GeoObject go1 = new GeoObject(); go1.setGeoPosition(41.90523339794433d, 2.565036406654116d); go1.setImageResource(R.drawable.my_image); go1.setName(”Hello World"); // Add the object myWorld.addBeyondarObject(go1); // give the world to the fragment mBeyondarFragment.setWorld(myWorld); /BeyondAR
  • 27. BeyondAR Getting started Create the AR world and add an AR object // We create the world object World myWorld = new World(this); myWorld.setGeoPosition(41.90533734214473d, 2.565848038959814d); // Create an object GeoObject go1 = new GeoObject(); go1.setGeoPosition(41.90523339794433d, 2.565036406654116d); go1.setImageResource(R.drawable.my_image); go1.setName(”Hello World"); // Add the object myWorld.addBeyondarObject(go1); // give the world to the fragment mBeyondarFragment.setWorld(myWorld); /BeyondAR
  • 28. BeyondAR Getting started Interaction with the AR Objects /BeyondAR
  • 29. BeyondAR Getting started Interaction with the AR Objects OnTouchBeyondarViewListener OnClickBeyondarObjectListener mBeyondarFragment.setOnTouchBeyondarViewListener(this); mBeyondarFragment.setOnClickBeyondarObjectListener(this); @Override public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) { if (beyondarObjects.size() > 0) { Toast.makeText(this, "Clicked on: " + beyondarObjects.get(0).getName(), Toast.LENGTH_LONG).show(); } } /BeyondAR
  • 30. BeyondAR Getting started Interaction with the AR Objects OnTouchBeyondarViewListener OnClickBeyondarObjectListener mBeyondarFragment.setOnTouchBeyondarViewListener(this); mBeyondarFragment.setOnClickBeyondarObjectListener(this); @Override public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) { if (beyondarObjects.size() > 0) { Toast.makeText(this, "Clicked on: " + beyondarObjects.get(0).getName(), Toast.LENGTH_LONG).show(); } } /BeyondAR
  • 31. OTHER FEATURES 1. Location utils 2. Views in the AR world 3. Take screenshots 4. Plugins 5. … /BeyondAR
  • 32. BeyondAR Using location utils • Easy way to use the location services LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); // We need to set the LocationManager to the BeyondarLocationManager. BeyondarLocationManager.setLocationManager(locationManager); BeyondarLocationManager: Helper to use the location services. • Retrieves the best location using GPS and the network providers • Can be used with LocationListener, World or GeoObject /BeyondAR
  • 33. BeyondAR Using location utils Create the AR world and add an AR object @Override protected void onResume() { super.onResume(); // When the activity is resumed it is time to enable the // BeyondarLocationManager BeyondarLocationManager.enable(); } @Override protected void onPause() { super.onPause(); // To avoid unnecessary battery usage disable BeyondarLocationManager // when the activity goes on pause. BeyondarLocationManager.disable(); } BeyondarLocationManager.addWorldLocationUpdate(myWorld); BeyondarLocationManager.addGeoObjectLocationUpdate(user); /BeyondAR
  • 34. OTHER FEATURES 1. Location utils 2. Views in the AR world 3. Take screenshots 4. Plugins 5. … /BeyondAR
  • 35. BeyondAR Working with Views • Attach a View to a BeyondarObject Extend BeyondarViewAdapter  It follows the same pattern than the ListAdapter - Remember to recycle your Views!! @Override public View getView(BeyondarObject beyondarObject, View recycledView, ViewGroup parent) { if (recycledView == null) recycledView = inflater.inflate(R.layout.beyondar_object_view, null); TextView textView = (TextView) recycledView.findViewById(R.id.titleTextView); textView.setText(beyondarObject.getName()); Button button = (Button) recycledView.findViewById(R.id.button); button.setOnClickListener(myClickListener); // Once the view is ready we specify the position setPosition(beyondarObject.getScreenPositionTopRight()); return recycledView; } Createtheview /BeyondAR
  • 36. BeyondAR Working with Views • Make a BeyondarObject from a View ImageUtils.storeView(view, path, imageName); // If there are no errors we can tell the object to use the // view that we just stored beyondarObject.setImageUri(path + imageName); /BeyondAR
  • 37. BeyondAR Working with Views • Make a BeyondarObject from a View ImageUtils.storeView(view, path, imageName); // If there are no errors we can tell the object to use the // view that we just stored beyondarObject.setImageUri(path + imageName); /BeyondAR
  • 38. OTHER FEATURES 1. Location utils 2. Views in the AR world 3. Take screenshots 4. Plugins 5. … /BeyondAR
  • 39. BeyondAR Screenshoots mBeyondarFragment.takeScreenshot(myOnScreenshotListener); @Override public void onScreenshot(Bitmap screenshot) { ImageDialog dialog = new ImageDialog(); dialog.setImage(screenshot); dialog.show(getSupportFragmentManager(), "ImageDialog"); } When you are done with the image, remember to recycle it /BeyondAR
  • 40. BeyondAR Screenshoots mBeyondarFragment.takeScreenshot(myOnScreenshotListener); @Override public void onScreenshot(Bitmap screenshot) { ImageDialog dialog = new ImageDialog(); dialog.setImage(screenshot); dialog.show(getSupportFragmentManager(), "ImageDialog"); } When you are done with the image, remember to recycle it /BeyondAR
  • 41. OTHER FEATURES 1. Location utils 2. Views in the AR world 3. Take screenshots 4. Plugins 5. … /BeyondAR
  • 42. BeyondAR Plugins • Main goal: – Easy to use – Make your own features /BeyondAR
  • 43. BeyondAR Plugins • Example: Google Maps Plugin // As we want to use GoogleMaps, we are going to create the plugin and // attach it to the World mGoogleMapPlugin = new GoogleMapWorldPlugin(this); // Then we need to set the map in to the GoogleMapPlugin mGoogleMapPlugin.setGoogleMap(mMap); // Now that we have the plugin created let's add it to our world. // NOTE: It is better to load the plugins before start adding object in to the world. mWorld.addPlugin(mGoogleMapPlugin); /BeyondAR
  • 44. OTHER FEATURES 1. Location utils 2. Views in the AR world 3. Take screenshots 4. Plugins 5. … /BeyondAR
  • 45. What is the next step? • Get over the WOW effect • Choose your platform • Make apps – Education – Traveling – Gaming