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/28 02:33] – ruza | project:ar_sandbox:start [2019/07/23 20:17] (current) – fullscreen support sachy | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| hw=-| | hw=-| | ||
| founder=[[user: | founder=[[user: | ||
| - | interested=[[user: | + | interested=[[user: |
| status=active | status=active | ||
| }} | }} | ||
| ~~META: | ~~META: | ||
| - | status = active | + | status = in restart process |
| & | & | ||
| ~~ | ~~ | ||
| Line 41: | 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 139: | 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 149: | Line 236: | ||
| * http:// | * http:// | ||
| * http:// | * http:// | ||
| + | |||
| + | more useful links | ||
| + | * http:// | ||
| + | * https:// | ||
project/ar_sandbox/start.1480300401.txt.gz · Last modified: 2016/11/28 02:33 by ruza