Setup a deep learning machine – step3 . install opencv

  • PREPARE YOUR UBUNTU SYSTEM DEPENDENCIES BY EXECUTING THIS COMMAND:
    sudo apt-get install build-essential cmake git ffmpeg libopencv-dev libgtk-3-dev python-numpy python3-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libv4l-dev libtbb-dev qtbase5-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip
  • GET OPNCV
    #Download OpenCV from http://opencv.org/downloads.html and unpack
    #or clone it from github (recommended)
    git clone https://github.com/opencv/opencv.git
  • ENTER THE UNPACKED DIRECTORY. CONFIGURE AND MAKE:

cd opencv
mkdir build
cd build/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make

  • INSTALLATION USING MAKE.EXECUTE THE FOLLOWING:
  • sudo make install
    sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
    sudo ldconfig
    sudo apt-get update
  • REBOOT THE SYSTEM.
    sudo reboot
  • USING CHECKINSTALL:
    #This will create the OpenCV package that has a modern install/uninstall option. While you are in the build directory, execute these commands:

sudo apt-get install checkinstall
sudo checkinstall

Leave a Reply

Your email address will not be published. Required fields are marked *