28
Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania Antonino Furnari 10/05/2014 An Introduction to Augmented Reality [email protected]

An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality [email protected]. Computer Vision AA. 2013/2014

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Image Processing LabDipartimento di Matematica e Informatica

Università degli Studi di Catania

Antonino Furnari

10/05/2014

An Introduction to Augmented Reality

[email protected]

Page 2: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Augmented Reality

“a live, copy, 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”

“it is related to a more general concept called mediated reality, in which a view of reality is

modified (possibly even diminished rather than augmented) by a computer”

“as a result, the technology functions by enhancing one’s current perception of reality.”

wikipedia definition

Page 3: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Applications

Page 4: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Applications

Page 5: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Some History

● The term “augmented reality” appears since the 1940s;

● The first augmented head mounted display is invented by Ivan Sutherland in 1968;

● First systems using mobile devices, internet and geolocalization appear in the 90s;

● Advances in the 2000s;● Augmented Reality diffusion in the 2010s.

Page 6: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Hardware

Some technologies which make AR interesting:● Head-mounted (with 6 DoF monitoring);● Handheld:

– Mobile phones;– Tablets;

● Wearable devices:

– Google glass;– Orcam (video - http://www.orcam.com/);– Epson moverio.

Page 7: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Computer Vision based Augmented Reality

● Computer Vision allows to create augmented reality applications by superimposing 2D or 3D contents on the scene;

● In order to do so we need to:

1) detect and track the area where to show the content;

2) estimate its 3D position in the real world;

3) render the 2D/3D content according to the estimated position;

● Two main technologies:

– fiduciary markers;– markerless (i.e., object detection).

Page 8: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Fiduciary Markers Augmented Reality: ARToolkit

● ARToolkit is an Open Source toolkit for marker-based augmented reality;

● It is quite old (last update in 2007) but still a good starting point for understanding the AR concepts (open & well documented);

● It offers functions for detecting and tracking single or multiple markers while relaying on OpenGL/glut for 2D/3D rendering;

● http://www.hitl.washington.edu/artoolkit.

Page 9: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitdemo

Page 10: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolit

● For additional informations about the next topics, the reader is referred to the very well written ARToolkit documentation and tutorials:

– http://www.hitl.washington.edu/artoolkit/documentation/

● Some other useful information can be found in the examples provided with the toolkit.

documentation

Page 11: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkit

● Follow the instructions at:

– http://www.hitl.washington.edu/artoolkit/documentation/usersetup.htm

● For Linux/GStreamer configuration, include the following line (check your video device) in your .bashrc file:

– export ARTOOLKIT_CONFIG="v4l2src device=/dev/video0 use­fixed­fps=false ! ffmpegcolorspace ! capsfilter caps=video/x­raw­rgb,bpp=24 ! identity name=artoolkit ! fakesink"

setup

Page 12: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitbasic principles

Page 13: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitthe marker

● The marker plays the role of an object which geometry is known;

● In particular:

– we chose markers which are easily detectable (thick black borders);

– we know the real world size of the marker;– we chose the inner symbol which is neither

horizontally nor vertically symmetric in order to estimate its rotation.

Page 14: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitmarker detection

original image thresholded image connected components

contours edges and corners fitted square

Page 15: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitmaker candidates

● This method actually allows to find just candidates: any pattern with thick black borders;

● The actual marker is found normalizing the candidates and comparing them with the searched pattern using template matching;

● The candidate giving the highest confidence is selected.

Page 16: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitmarker matching

0.3

0.92

0.2

0.4

normalization

...

...

...

searched pattern

normalized candidates

found candidates

Page 17: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkit3D position and orientation estimation

● Now that we have an object which geometry, size, position and orientation are known, we can estimate its 3D position with respect to the camera;

● It can be done computing the extrinsic parameters as seen for camera calibration;

● Intrinsic parameters which are good for most cameras are part of the toolkit. Specific parameters can be obtained calibrating the camera.

Page 18: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitcoordinate systems

Page 19: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitcamera and marker relationships (demo - exview)

Page 20: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitarchitecture

Page 21: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitdevelopment principles

Page 22: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitinto the code!

Page 23: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkit

● Facilities are included in the toolkit to enable multi-marker tracking;

● A multi-marker pattern is used where the relative position of the markers is known;

● The transformation matrices between the different markers must be supplied.

multiple markers (demo)

Page 24: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkittrain a new pattern

● In order to use your own pattern, the blank pattern has to be modified and printed;

● The provided mk_patt application allows to generate a patt.yourpatt file containing all the information needed for the pattern matching.

Page 25: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

ARToolkitcamera calibration

● Intrinsic parameters which are enough general to work with most of the cameras are available in the toolkit;

● Although, in order to improve the detection and tracking performances, a utility for camera calibration is provided in order to calibrate your own camera.

Page 26: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Markerless Augmented Reality?

Tracking a number of feature points (e.g., SIFT) in order to detect a marker object (e.g., a photo) and to estimate its position and orientation.

Some mobile frameworks available (e.g., Vuforia).

Page 27: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Question Time

Page 28: An Introduction to Augmented Reality - unict.itfurnari/slides/augmented_reality_10_05_2014.pdfAn Introduction to Augmented Reality furnari@dmi.unict.it. Computer Vision AA. 2013/2014

Computer Vision AA. 2013/2014 - Augmented Reality

Contacts

● For any doubts please contact me:

[email protected];

– Room 30;● Slides available at:

– Studium course page:● http://studium.unict.it/dokeos/2014/course

s/73072C2/