-
Notifications
You must be signed in to change notification settings - Fork 14
Install MirrorOS on a Raspberry Pi
Thank you very much for supporting the MirrorOS project! MirrorOS is meant to be an interactive interface for smart mirrors and transparent screens that combines a futuristic UI with interesting functionalities.
Please be aware that MirrorOS is currently at the "proof of concept" stage. Almost all features are broken/in an early stage, for a more mature solution (non-interactive) please visit the MagicMirror project here at https://github.com/MichMich/MagicMirror
We recommend the following hardware to create an interactive Smart Mirror:
- Raspberry Pi Model 3
- Computer Monitor or TV Screen (with HDMI input)
- Capacitive Touch Frame (http://bit.ly/2nn4Lo7) or Leap Motion Controller (less accurate because of Mirror reflection)
- Raspberry Pi Camera (for face recognition and later on gesture recognition)
- Two-way Mirror Sheet (http://bit.ly/2mCYJ2J) A regular mirror WON'T work .
Although MirrorOS currently supports all platforms (thanks to Node and Electron!), it was created with a Raspberry Pi setup in mind. Raspberry Pi computers are very cheap (<$30) and small (can be embedded in a mirror frame).
MirrorOS requires a few libraries and packages to be installed on your system :
- Install OpenCV 3, Python and Pip (follow this tutorial http://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/ ) preferably on a fresh Raspberry Pi OS. The shell commands (taken from the tutorial) are as follows:
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install python2.7-dev python3-dev
cd ~
wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.1.0.zip
unzip opencv.zip
wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.1.0.zip
unzip opencv_contrib.zip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install virtualenv virtualenvwrapper
sudo rm -rf ~/.cache/pip
echo -e "\n# virtualenv and virtualenvwrapper" >> ~/.profile
echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.profile
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.profile
source ~/.profile
mkvirtualenv cv -p python3
workon cv
pip install numpy
cd ~/opencv-3.1.0/
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.1.0/modules \
-D BUILD_EXAMPLES=ON ..
make -j4
sudo make install
sudo ldconfig
cd /usr/local/lib/python3.4/site-packages/
sudo mv cv2.cpython-34m.so cv2.so
cd ~/.virtualenvs/cv/lib/python3.4/site-packages/
ln -s /usr/local/lib/python3.4/site-packages/cv2.so cv2.so
rm -rf opencv-3.1.0 opencv_contrib-3.1.0
-
Install NodeJS, following this tutorial (head directly to the "Install Node.js" section) Install NodeJS
-
Install Pillow
pip install pillow
-
Install Yarn
-
Clone the repository
git clone https://github.com/wassgha/MirrorOS.git
-
Cd to the repository folder (
cd MirrorOS
) then install dependenciesnpm install
-
Run the project
npm start
If you have any questions, please open an Issue