20
Oriol Pla Álvarez B1E

Augmented reality with processing. Oriol Pla

Embed Size (px)

Citation preview

Page 1: Augmented reality with processing. Oriol Pla

Oriol Pla Álvarez

B1E

Page 2: Augmented reality with processing. Oriol Pla

You have to download and install Processing 1.5.1.

Then you have to install some things:

Quicktime 7 (Apple video software).

WinVDIG1.0.5.exe, it’s Video digitalizer for

Quicktime.

GSVideo-1.00windows.zip, this is a library.

NyAR4psg, this is a library.

Page 3: Augmented reality with processing. Oriol Pla
Page 4: Augmented reality with processing. Oriol Pla
Page 5: Augmented reality with processing. Oriol Pla
Page 6: Augmented reality with processing. Oriol Pla

This is an introduction of the code. The markers are patt.hiro and patt.kanji.

Page 7: Augmented reality with processing. Oriol Pla

These are where necessary libraries are imported.

Page 8: Augmented reality with processing. Oriol Pla

This several lines declare some specialized variables.

Page 9: Augmented reality with processing. Oriol Pla

The two lines following the colormode() function call

create the fonts that will be used for text.

Print a line in the console with the version of

multimaker.

Page 10: Augmented reality with processing. Oriol Pla

Next, a new GSCapture object is created and

assigned to the variable that has already been

declared for that purpose.

Page 11: Augmented reality with processing. Oriol Pla

Now that these values have been set, these variables

are used as arguments for the NyARMultiBoard

constructor to create the new NyARMultiBoard object

nya.

Page 12: Augmented reality with processing. Oriol Pla

The next chunk of code is for drawing the little

labeled dots that indicate the corner positions.

Page 13: Augmented reality with processing. Oriol Pla

To define this function, first the font, stroke color,

and the stroke weight.

Page 14: Augmented reality with processing. Oriol Pla

Here we can see the coordinates of the line and the

text font.

Page 15: Augmented reality with processing. Oriol Pla

Now begins the draw() function. As usual, this

contains the main repeating functionality of the

sketch.

Page 16: Augmented reality with processing. Oriol Pla

The read() method is called for the cam object. This

tells cam to read the camera data into an image.

Page 17: Augmented reality with processing. Oriol Pla

The next few lines draw down objects. Fill is the

color of the box. Translate is the movement. And we

can see that the box is of 40x40x40 pixels.

Page 18: Augmented reality with processing. Oriol Pla

It is the same that the other box because it is the

green box, only change the color.

Page 19: Augmented reality with processing. Oriol Pla
Page 20: Augmented reality with processing. Oriol Pla