When in AR mode, create an hologram by looking at a person/face/photo and tap on the screen, it should appear gently. (Beware of camera framing, not too close)
34 |
35 |
36 |
94 |
95 |
127 |
128 |
557 |
558 |
559 |
560 |
--------------------------------------------------------------------------------
/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | background-color: #000;
4 | color: #fff;
5 | font-family: Monospace;
6 | font-size: 13px;
7 | line-height: 24px;
8 | overscroll-behavior: none;
9 | overflow:hidden;
10 | }
11 |
12 | a {
13 | color: rgb(240, 205, 140);
14 | text-decoration: none;
15 | }
16 |
17 | a:hover {
18 | text-decoration: underline;
19 | }
20 |
21 | button {
22 | cursor: pointer;
23 | text-transform: uppercase;
24 | }
25 |
26 | canvas {
27 | display: block;
28 | }
29 | .containerV { position:relative; }
30 | .containerV video {
31 | position:relative;
32 | z-index:0;
33 | }
34 | .overlay {
35 |
36 | z-index:1;
37 | color: white;
38 | text-align: center;
39 | margin: 12px;
40 | margin-top: 42px;
41 | }
42 | .red-square {
43 | background-color: #FF4136;
44 | width: 300px;
45 | height: 300px;
46 | position: absolute;
47 | left: 50%;
48 | top: 50%;
49 | transform: translate(-50%, -50%);
50 | }
51 | #info {
52 | position: absolute;
53 | top: 0px;
54 | width: 100%;
55 | padding: 10px;
56 | box-sizing: border-box;
57 | text-align: center;
58 | -moz-user-select: none;
59 | -webkit-user-select: none;
60 | -ms-user-select: none;
61 | user-select: none;
62 | pointer-events: none;
63 | z-index: 1; /* TODO Solve this in HTML */
64 | }
65 |
66 | .linkG {
67 | font-size:xx-small;
68 | color: white;
69 | }
70 |
71 | #infoSeismic {
72 | position: absolute;
73 | top: 0px;
74 | width: 280px;
75 | padding: 10px;
76 | box-sizing: border-box;
77 | text-align: center;
78 | -moz-user-select: none;
79 | -webkit-user-select: none;
80 | -ms-user-select: none;
81 | user-select: none;
82 | pointer-events: none;
83 | z-index: 1; /* TODO Solve this in HTML */
84 | background-color: rgba(35, 4, 83, 0.6);
85 | }
86 |
87 | a, button, input, select {
88 | pointer-events: auto;
89 | }
90 |
91 | .dg.ac {
92 | -moz-user-select: none;
93 | -webkit-user-select: none;
94 | -ms-user-select: none;
95 | user-select: none;
96 | z-index: 2 !important; /* TODO Solve this in HTML */
97 | }
98 |
99 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Holography
2 |
3 | Simple demo of WebXR and Deep Learning using Tensorflow to create holograms on-the-fly.
4 | It works on Android with the last Chrome (>= r81)
5 |
6 | ! REMARK! : I discovered that the possibility to take pictures WHILE in AR Context just works on LG phones surprisingly (https://developers.google.com/ar/discover/supported-devices) as they use the wide angle camera for AR (the phone I used by chance)!! So to use this demo with other phones, take the picture (using usual browser get media api) but before launching the AR Context!
7 |
8 | 
9 |
10 | DEMO here: http://nosy-b.github.io/holography
11 |
12 | ## How to
13 |
14 | - First be sure to have an android phone with chrome >=r81
15 | - Choose your camera feed (ideally back camera)
16 | - Tap on start AR (the position of your phone at that moment will be the center of the frame)
17 | - Move a bit around if you want to help the space detection
18 | - Look at a human (real or a photo) and tap on the screen
19 | - It should appear coming from your phone to the direction you were looking at when clicked on Start (initial position)
20 |
21 | ## Description
22 |
23 | Small code that create particles for people extracted from camera feed using Bodypix model
24 | Feel free to use this dirty little code for your own experiments
25 | I put demos on my twitter sometimes https://twitter.com/AlexandreDevaux
26 |
27 | ## Getting Started
28 |
29 | ### Dependencies
30 |
31 | * ThreeJS, TensorFlowJS
32 |
33 |
34 | ## Help
35 |
36 | One thing to be careful about is not to frame too close the subject you want to make a hologram of. The camera frame is smaller than what your screen shows. (A good todo would be to show camera frame while in AR)
37 |
38 | ## Authors
39 |
40 | Alexandre Devaux
41 | [@AlexandreDevaux](https://twitter.com/AlexandreDevaux)
42 |
43 | ## Version History
44 |
45 |
46 |
47 | ## License
48 |
49 | Check the license of THREEJS and Tensorflow
50 |
51 |
--------------------------------------------------------------------------------