project:ar_sandbox:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| project:ar_sandbox:start [2016/11/25 07:11] – ↷ Page moved and renamed from project:ar_sandbox to project:ar_sandbox:start ruza | project:ar_sandbox:start [2019/07/23 20:17] (current) – fullscreen support sachy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== AR SandBox ====== | ====== AR SandBox ====== | ||
| - | {{template> | + | {{template> |
| name=SARndbox| | name=SARndbox| | ||
| image=sarndbox-foto_by_alef.jpg? | image=sarndbox-foto_by_alef.jpg? | ||
| Line 7: | Line 7: | ||
| hw=-| | hw=-| | ||
| founder=[[user: | founder=[[user: | ||
| - | interested=[[user: | + | interested=[[user: |
| - | status=done | + | status=active |
| }} | }} | ||
| + | |||
| + | ~~META: | ||
| + | status = in restart process | ||
| + | & | ||
| + | ~~ | ||
| Augmented Reality SandBox is quite nice concept where you play with sand and a projector mounted on top of the sandbox projects constantly updating height-map on it. We've prepared a few installations. | Augmented Reality SandBox is quite nice concept where you play with sand and a projector mounted on top of the sandbox projects constantly updating height-map on it. We've prepared a few installations. | ||
| Line 36: | Line 41: | ||
| windowFullscreen true | windowFullscreen true | ||
| </ | </ | ||
| + | |||
| + | ==== Power Management ==== | ||
| + | === Piskoviste.brm PC === | ||
| + | in xfce4-panel go to " | ||
| + | === Projector === | ||
| + | Set "auto power off" to ON and " | ||
| ===== Software ===== | ===== Software ===== | ||
| Line 134: | Line 145: | ||
| * 3x VIKA LERBERG Trestle - http:// | * 3x VIKA LERBERG Trestle - http:// | ||
| * custom parts from OBI | * custom parts from OBI | ||
| + | |||
| + | ====== AR SandBox^2 ====== | ||
| + | |||
| + | The new software is based on Python + OpenCV + libfreenect to abadon that crappy software from the distant past and make hardware requirements as low as possible (lets convert from tower PC to raspberry). | ||
| + | |||
| + | <code python piskoviste.py> | ||
| + | # | ||
| + | from freenect import sync_get_depth as gdepth | ||
| + | import cv2 | ||
| + | import numpy as np | ||
| + | |||
| + | def loopa(): | ||
| + | global depth | ||
| + | while True: | ||
| + | (depth,_) = gdepth() | ||
| + | npd=np.array(depth) | ||
| + | mn=npd.min() | ||
| + | npd[npd> | ||
| + | # | ||
| + | npd-=mn | ||
| + | mx=npd.max() | ||
| + | |||
| + | npd2=npd*(255/ | ||
| + | npd=np.floor(npd2).astype(np.uint8) | ||
| + | |||
| + | # Debugging histrogram START | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # Debugging histogram END | ||
| + | |||
| + | fdepth=cv2.applyColorMap(npd, | ||
| + | |||
| + | cv2.imshow(' | ||
| + | # | ||
| + | if cv2.waitKey(1) & 0xFF == ord(' | ||
| + | break | ||
| + | |||
| + | cv2.namedWindow(" | ||
| + | cv2.setWindowProperty(" | ||
| + | loopa() | ||
| + | |||
| + | cv2.destroyAllWindows() | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Environment preparation ===== | ||
| + | Easiest way to do anything pyrelated without fighting incompatible python versions is to create virtual environment (venv). | ||
| + | |||
| + | |||
| + | <code bash> | ||
| + | apt-get install python3-venv python-opencv libusb-dev libusb-1.0.0-dev python3-dev | ||
| + | mkdir ./ | ||
| + | cd ./ | ||
| + | wget " | ||
| + | unzip " | ||
| + | python3 -m venv venv | ||
| + | source ./ | ||
| + | pip install --upgrade pip | ||
| + | pip install matplotlib | ||
| + | pip install numpy | ||
| + | pip install opencv-python | ||
| + | pip install cython | ||
| + | mkdir ./ | ||
| + | cd ./ | ||
| + | cmake -L .. -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON3=ON | ||
| + | make | ||
| + | make install | ||
| + | cd ../ | ||
| + | python ./setup.py install | ||
| + | cd ../../.. | ||
| + | wget " | ||
| + | python ./ | ||
| + | </ | ||
| + | |||
| + | ===== Result ===== | ||
| + | |||
| + | {{: | ||
| ===== Similar Projects ===== | ===== Similar Projects ===== | ||
| Line 144: | Line 236: | ||
| * http:// | * http:// | ||
| * http:// | * http:// | ||
| + | |||
| + | more useful links | ||
| + | * http:// | ||
| + | * https:// | ||
project/ar_sandbox/start.1480057860.txt.gz · Last modified: 2016/11/25 07:11 by ruza