Repo for all information regarding the ophthalmoscope concept.
sudo apt-get update
sudo apt-get purge wolfram* libreoffice*
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg8-dev libjasper-dev libpng12-dev
sudo apt-get install libgtk2.0-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 libatlas-base-dev gfortran python2.7-dev
sudo apt-get install libgtkglext1 libgtkglext1-dev
cd ~
sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install numpy
sudo pip install --upgrade numpy
cd ~
sudo wget -O opencv.zip https://github.com/opencv/opencv/archive/3.1.0.zip
sudo unzip opencv.zip
sudo wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/3.1.0.zip
sudo unzip opencv_contrib.zip
TBB and OpenMP are enabled to improve FPS.
cd ~/opencv-3.1.0/
sudo mkdir build
cd build/
sudo cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D BUILD_TBB=ON \
-D WITH_TBB=ON \
-D WITH_OPENMP=ON \
-D WITH_OPENGL=ON \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.1.0/modules ..
sudo make -j2
sudo make install
sudo ldconfig
sudo pip install imutils
enable the camera in the interfacing option (5)
sudo raspi-config
then test output after reboot
raspistill -o output.jpg
$ sudo nano /usr/local/lib/python2.7/dist-packages/imutils/video/pivideostream.py
class PiVideoStream:
def __init__(self, resolution=(480, 368), framerate=32, vf=False, hf=False):
# initialize the camera and stream
self.camera = PiCamera()
self.camera.resolution = resolution
self.camera.framerate = framerate
self.camera.vflip = vf
self.camera.hflip = hf
When initializing use PiVideoStream(hf=True).start()