augmented reality with processing. oriol pla
TRANSCRIPT
![Page 1: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/1.jpg)
Oriol Pla Álvarez
B1E
![Page 2: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/2.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/3.jpg)
![Page 4: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/4.jpg)
![Page 5: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/5.jpg)
![Page 6: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/6.jpg)
This is an introduction of the code. The markers are patt.hiro and patt.kanji.
![Page 7: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/7.jpg)
These are where necessary libraries are imported.
![Page 8: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/8.jpg)
This several lines declare some specialized variables.
![Page 9: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/9.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/10.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/11.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/12.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/13.jpg)
To define this function, first the font, stroke color,
and the stroke weight.
![Page 14: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/14.jpg)
Here we can see the coordinates of the line and the
text font.
![Page 15: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/15.jpg)
Now begins the draw() function. As usual, this
contains the main repeating functionality of the
sketch.
![Page 16: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/16.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/17.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/18.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/19.jpg)
![Page 20: Augmented reality with processing. Oriol Pla](https://reader034.vdocuments.us/reader034/viewer/2022042816/5596622f1a28abf9338b4579/html5/thumbnails/20.jpg)