SlideShare una empresa de Scribd logo
1 de 45
Descargar para leer sin conexión
In e N m o G
Who A ?
Sey am H s e J fa
An o d E ne g Le Sha n I ov s
@wo d s
Aug t Re t i M b e
V v A
AR is y
Re l d e r o
Sephora
So n c o h o s t
Options:
1. ARCore
2. ARKit
3. Wikitude
4. Vuforia
5. Maxst
6. EasyAR
7. ARToolKit
8. Xzimg
9. DeepAR
thinkmobiles.com
Eas R
The Ultimate
EasyAR Offers EasyAR Suffers
1. Free
2. Cross Platform
3. No Watermark
4. Unlimited Apps
5. Lots of samples(CPP, Kotlin, …)
6. Backward Compatible
1. Almost No Docs
2. Poor Explanation
3. No Gradle Import
Possibilities with EasyAR
Image Tracking/Recognition
Object Tracking/Recognition
Show Objects on Screen
Playing Videos on Object/Image
How A d a R
Android SDK
1.Add EasyAR.jar to Libs Folder
2.Add Cpp Library To jniLibs Folder
3.Add Gradle Import to Build.Gradle
4.Sync the Project
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.1.1'
testCompile 'junit:junit:4.12'
}
How U as R
Android SDK
MainActivity
glView = new GLView(this);
requestCameraPermission()
Engine.init(this, API_KEY)
MainActivity
private static String key = "===insert your API Key here===";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
if (!Engine.initialize(this, key)) {
Log.e("HelloAR", "Initialization Failed.");
}
glView = new GLView(this);
requestCameraPermission();
}
@Override
protected void onResume() {
super.onResume();
if (glView != null) { glView.onResume(); }
}
@Override
protected void onPause() {
if (glView != null) { glView.onPause(); }
super.onPause();
}
Activity Lifecycle
GLView
https://developer.android.com/guide/topics/graphics/opengl
GLView
EGLConfigChooser EGLContextFactory
GLSurfaceView.Renderer
HelloAR
GLSurfaceView.Renderer
this.setRenderer(new GLSurfaceView.Renderer() {
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
synchronized (helloAR) {
helloAR.initGL();
}
}
@Override
public void onSurfaceChanged(GL10 gl, int w, int h) {
synchronized (helloAR) {
helloAR.resizeGL(w, h);
}
}
@Override
public void onDrawFrame(GL10 gl) {
synchronized (helloAR) {
helloAR.render();
}
}
});
Lifecycle Handling
View
GLSurfaceView
GLView
@Override
public void onResume() {
super.onResume();
Engine.onResume();
}
@Override
public void onPause() {
Engine.onPause();
super.onPause();
}
@Override
protected void onDetachedFromWindow()
{
synchronized (helloAR) {
helloAR.stop();
helloAR.dispose();
}
super.onDetachedFromWindow();
}
@Override
protected void onAttachedToWindow(){
super.onAttachedToWindow();
synchronized (helloAR) {
if (helloAR.initialize()) {
helloAR.start();
}
}
}
HelloAR
ImageTrackers
ImageTargets
Streamer
CameraDevice
ObjectRenderer
CameraRenderer
ViewPort
HelloAR
ImageTarget
1. Asset
2. App
3. Absolute
4. JSON
ImageTarget Json
{
"images" :
[
{
"image" :"name1.jpg",
"name" : "name1"
},
{
"image" : "name2.jpg",
"name" : "name2",
"size" : [8.56, 5.4],
"uid" : "uid-string"
}
]
}
CameraDevice
CameraFrameStreamer
ObjectRenderer
VideoRenderer
public void render() {
GLES20.glClearColor(1.f, 1.f, 1.f, 1.f);
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
if (videobg_renderer != null) {
Vec4I default_viewport = new Vec4I(0, 0, view_size.data[0], view_size.data[1]);
GLES20.glViewport(default_viewport.data[0], default_viewport.data[1], default_viewport.data[2], default_viewport.data[3]);
if (videobg_renderer.renderErrorMessage(default_viewport)) {
Return;
}
}
if (streamer == null) { return; }
Frame frame = streamer.peek();
try {
updateViewport();
GLES20.glViewport(viewport.data[0], viewport.data[1], viewport.data[2], viewport.data[3]);
if (videobg_renderer != null) {videobg_renderer.render(frame, viewport);}
for (TargetInstance targetInstance : frame.targetInstances()) {
int status = targetInstance.status();
if (status == TargetStatus.Tracked) {
Target target = targetInstance.target();
ImageTarget imagetarget = target instanceof ImageTarget ? (ImageTarget) (target) : null;
if (imagetarget == null) {continue;}
if (box_renderer != null) {
box_renderer.render(camera.projectionGL(0.2f, 500.f), targetInstance.poseGL(), imagetarget.size());
}}}}
finally {
frame.dispose();
}
}
Frame frame = streamer.peek();
try {
updateViewport();
GLES20.glViewport(viewport.data[0], viewport.data[1], viewport.data[2], viewport.data[3]);
if (videobg_renderer != null) {
videobg_renderer.render(frame, viewport);
}
for (TargetInstance targetInstance : frame.targetInstances()) {
int status = targetInstance.status();
if (status == TargetStatus.Tracked) {
Target target = targetInstance.target();
ImageTarget imagetarget = target instanceof ImageTarget ? (ImageTarget) (target) : null;
if (imagetarget == null) {continue;}
if (box_renderer != null) {
box_renderer.render(camera.projectionGL(0.2f, 500.f), targetInstance.poseGL(),
imagetarget.size());
}}}}
finally {
frame.dispose();
}
if (videobg_renderer != null) {
videobg_renderer.render(frame, viewport);
}
for (TargetInstance targetInstance : frame.targetInstances()) {
int status = targetInstance.status();
if (status == TargetStatus.Tracked) {
Target target = targetInstance.target();
ImageTarget imagetarget = target instanceof ImageTarget ?
(ImageTarget) (target) : null;
if (imagetarget == null) {continue;}
if (box_renderer != null) {
box_renderer.render(camera.projectionGL(0.2f,500.f),
targetInstance.poseGL(),
imagetarget.size());
}}}}
if (box_renderer != null) {
box_renderer.render(camera.projectionGL(0.2f,500.f), targetInstance.poseGL(),
imagetarget.size());
}
An ….. Don
Bu l h Ne A p
Now
Twi r: @wo d s
Tel m: @wo d s
Sey ar
An o d E ne g Le Sha n I ov s
Tha
The E

Más contenido relacionado

Similar a Mobile AR

Getting started with Verold and Three.js
Getting started with Verold and Three.jsGetting started with Verold and Three.js
Getting started with Verold and Three.js
Verold
 

Similar a Mobile AR (20)

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
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With Android
 
Augmented Reality With FlarToolkit and Papervision3D
Augmented Reality With FlarToolkit and Papervision3DAugmented Reality With FlarToolkit and Papervision3D
Augmented Reality With FlarToolkit and Papervision3D
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and Tutorial
 
ARCore 101: A Hands-on Workshop
ARCore 101: A Hands-on WorkshopARCore 101: A Hands-on Workshop
ARCore 101: A Hands-on Workshop
 
FLAR Workflow
FLAR WorkflowFLAR Workflow
FLAR Workflow
 
Game development with_lib_gdx
Game development with_lib_gdxGame development with_lib_gdx
Game development with_lib_gdx
 
Unity3 d devfest-2014
Unity3 d devfest-2014Unity3 d devfest-2014
Unity3 d devfest-2014
 
The current state of web on mobile - Have smartphone browsers gotten smarter?
The current state of web on mobile - Have smartphone browsers gotten smarter?The current state of web on mobile - Have smartphone browsers gotten smarter?
The current state of web on mobile - Have smartphone browsers gotten smarter?
 
Intro to computer vision in .net
Intro to computer vision in .netIntro to computer vision in .net
Intro to computer vision in .net
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
 
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
 
COSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsCOSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer Tools
 
Firefox OS and the Internet of Things - NDC London 2014
Firefox OS and the Internet of Things - NDC London 2014Firefox OS and the Internet of Things - NDC London 2014
Firefox OS and the Internet of Things - NDC London 2014
 
Getting started with Verold and Three.js
Getting started with Verold and Three.jsGetting started with Verold and Three.js
Getting started with Verold and Three.js
 
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
 
A comprehensive tutorial to upload, cache, save and share image in Android apps
A comprehensive tutorial to upload, cache, save and share image in Android appsA comprehensive tutorial to upload, cache, save and share image in Android apps
A comprehensive tutorial to upload, cache, save and share image in Android apps
 
ARE 2011 AR Authoring
ARE 2011 AR AuthoringARE 2011 AR Authoring
ARE 2011 AR Authoring
 
Immerge yourself in a new Reality - Alessandro Pozone - Codemotion Rome 2018
Immerge yourself in a new Reality - Alessandro Pozone - Codemotion Rome 2018Immerge yourself in a new Reality - Alessandro Pozone - Codemotion Rome 2018
Immerge yourself in a new Reality - Alessandro Pozone - Codemotion Rome 2018
 

Último

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Health
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Último (20)

A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 

Mobile AR

  • 1. In e N m o G
  • 3. Sey am H s e J fa An o d E ne g Le Sha n I ov s @wo d s
  • 4. Aug t Re t i M b e
  • 7. Re l d e r o
  • 9.
  • 10.
  • 11. So n c o h o s t
  • 12. Options: 1. ARCore 2. ARKit 3. Wikitude 4. Vuforia 5. Maxst 6. EasyAR 7. ARToolKit 8. Xzimg 9. DeepAR
  • 15. EasyAR Offers EasyAR Suffers 1. Free 2. Cross Platform 3. No Watermark 4. Unlimited Apps 5. Lots of samples(CPP, Kotlin, …) 6. Backward Compatible 1. Almost No Docs 2. Poor Explanation 3. No Gradle Import
  • 16. Possibilities with EasyAR Image Tracking/Recognition Object Tracking/Recognition Show Objects on Screen Playing Videos on Object/Image
  • 17. How A d a R Android SDK
  • 18. 1.Add EasyAR.jar to Libs Folder
  • 19. 2.Add Cpp Library To jniLibs Folder
  • 20. 3.Add Gradle Import to Build.Gradle 4.Sync the Project dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:27.1.1' testCompile 'junit:junit:4.12' }
  • 21. How U as R Android SDK
  • 22. MainActivity glView = new GLView(this); requestCameraPermission() Engine.init(this, API_KEY)
  • 23. MainActivity private static String key = "===insert your API Key here==="; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); if (!Engine.initialize(this, key)) { Log.e("HelloAR", "Initialization Failed."); } glView = new GLView(this); requestCameraPermission(); }
  • 24. @Override protected void onResume() { super.onResume(); if (glView != null) { glView.onResume(); } } @Override protected void onPause() { if (glView != null) { glView.onPause(); } super.onPause(); } Activity Lifecycle
  • 27. GLSurfaceView.Renderer this.setRenderer(new GLSurfaceView.Renderer() { @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { synchronized (helloAR) { helloAR.initGL(); } } @Override public void onSurfaceChanged(GL10 gl, int w, int h) { synchronized (helloAR) { helloAR.resizeGL(w, h); } } @Override public void onDrawFrame(GL10 gl) { synchronized (helloAR) { helloAR.render(); } } });
  • 28. Lifecycle Handling View GLSurfaceView GLView @Override public void onResume() { super.onResume(); Engine.onResume(); } @Override public void onPause() { Engine.onPause(); super.onPause(); } @Override protected void onDetachedFromWindow() { synchronized (helloAR) { helloAR.stop(); helloAR.dispose(); } super.onDetachedFromWindow(); } @Override protected void onAttachedToWindow(){ super.onAttachedToWindow(); synchronized (helloAR) { if (helloAR.initialize()) { helloAR.start(); } } }
  • 31. ImageTarget 1. Asset 2. App 3. Absolute 4. JSON
  • 32. ImageTarget Json { "images" : [ { "image" :"name1.jpg", "name" : "name1" }, { "image" : "name2.jpg", "name" : "name2", "size" : [8.56, 5.4], "uid" : "uid-string" } ] }
  • 36. public void render() { GLES20.glClearColor(1.f, 1.f, 1.f, 1.f); GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); if (videobg_renderer != null) { Vec4I default_viewport = new Vec4I(0, 0, view_size.data[0], view_size.data[1]); GLES20.glViewport(default_viewport.data[0], default_viewport.data[1], default_viewport.data[2], default_viewport.data[3]); if (videobg_renderer.renderErrorMessage(default_viewport)) { Return; } } if (streamer == null) { return; } Frame frame = streamer.peek(); try { updateViewport(); GLES20.glViewport(viewport.data[0], viewport.data[1], viewport.data[2], viewport.data[3]); if (videobg_renderer != null) {videobg_renderer.render(frame, viewport);} for (TargetInstance targetInstance : frame.targetInstances()) { int status = targetInstance.status(); if (status == TargetStatus.Tracked) { Target target = targetInstance.target(); ImageTarget imagetarget = target instanceof ImageTarget ? (ImageTarget) (target) : null; if (imagetarget == null) {continue;} if (box_renderer != null) { box_renderer.render(camera.projectionGL(0.2f, 500.f), targetInstance.poseGL(), imagetarget.size()); }}}} finally { frame.dispose(); } }
  • 37. Frame frame = streamer.peek(); try { updateViewport(); GLES20.glViewport(viewport.data[0], viewport.data[1], viewport.data[2], viewport.data[3]); if (videobg_renderer != null) { videobg_renderer.render(frame, viewport); } for (TargetInstance targetInstance : frame.targetInstances()) { int status = targetInstance.status(); if (status == TargetStatus.Tracked) { Target target = targetInstance.target(); ImageTarget imagetarget = target instanceof ImageTarget ? (ImageTarget) (target) : null; if (imagetarget == null) {continue;} if (box_renderer != null) { box_renderer.render(camera.projectionGL(0.2f, 500.f), targetInstance.poseGL(), imagetarget.size()); }}}} finally { frame.dispose(); }
  • 38. if (videobg_renderer != null) { videobg_renderer.render(frame, viewport); }
  • 39. for (TargetInstance targetInstance : frame.targetInstances()) { int status = targetInstance.status(); if (status == TargetStatus.Tracked) { Target target = targetInstance.target(); ImageTarget imagetarget = target instanceof ImageTarget ? (ImageTarget) (target) : null; if (imagetarget == null) {continue;} if (box_renderer != null) { box_renderer.render(camera.projectionGL(0.2f,500.f), targetInstance.poseGL(), imagetarget.size()); }}}}
  • 40. if (box_renderer != null) { box_renderer.render(camera.projectionGL(0.2f,500.f), targetInstance.poseGL(), imagetarget.size()); }
  • 42. Bu l h Ne A p Now
  • 43.
  • 44. Twi r: @wo d s Tel m: @wo d s Sey ar An o d E ne g Le Sha n I ov s Tha
  • 45. The E