Skip to content

Commit 1e138ec

Browse files
author
Brandyn A. White
committed
Added AR figure
Signed-off-by: Brandyn A. White <[email protected]>
1 parent 1571431 commit 1e138ec

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

Diff for: ar.rst

+37
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11
Augmented Reality
22
=================
33

4+
While Glass has a relatively small display and won't be able to create full immersive overlays, there are several interesting applications of AR that have been under-explored. We have put together the building blocks to get you started, this will require understanding how they work to use them properly and this module is highly experimental.
45

6+
.. figure:: ardimensions.png
7+
:alt: Glass Prism, Photo, Preview (640x360) relationships
8+
9+
This shows the relationship between the Prism, Photo, and Preview (640x360) images.
10+
11+
displayWarpView([Array hBigToGlass]) : void
12+
Warps each preview image to the display such that it overlaps with what the user sees (works for objects > 7ft away, currently supported resolutions are 640x360 and 1280x720). If the hBigToGlass homography is not provided a default is used; however, it won't match perfectly, each Glass is slightly different and they only need to be calibrated once.
13+
14+
warpPreviewSampleGlass([Function callback]) : void
15+
Publishes the next preview image it gets, AR server uses it to match subsequent images to, a local copy is stored and can be drawn on using WS.warpDraw.
16+
17+
* Callback has parameters of the form function `callback(Homography array)`
18+
19+
warpDraw(x, y, radius, r, g, b) : void
20+
Draws a circle on the sample image
21+
22+
23+
.. code-block:: guess
24+
25+
function server() {
26+
WS.cameraOn(1.2, 360, 640);
27+
WS.displayWarpView();
28+
function sample() {
29+
setTimeout(function (){
30+
WS.warpDraw(640 / 2, 360 / 2, 10, 255, 0, 0);
31+
}, 1500)
32+
WS.warpPreviewSampleGlass('');
33+
}
34+
WS.dataLog(false, true, .15);
35+
WS.gestureCallback('onGesture', function (gesture) {
36+
if (gesture === 'TAP') {
37+
WS.sound('SUCCESS');
38+
sample();
39+
}
40+
});
41+
}

Diff for: ardimensions.png

506 KB
Loading

Diff for: pubsub.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Example: Ping/Pong
4848
4949
wearscript.parse(callback, argparse.ArgumentParser())
5050
51-
.. code-block:: Go
51+
.. code-block:: guess
5252
5353
// Go: Server
5454
package main

0 commit comments

Comments
 (0)