How to install openCv in Digital Ocean ubuntu One click AI droplet.

How can I install opencv on digital ocean or is there any droplet available which comes with pre-installed opencv. ??

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

opencvcontrib url path changed to opencv_contrib

Need to add:

sudo apt-get install unzip


// download opencv-3.3.1

Digital Ocean doesn’t come with a pre-installed “one click” solution for OpenCV. You can do the install as follows on an Ubuntu 16.04 droplet

// Open CV 3

sudo apt-get -y install libtiff5-dev

sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev sudo apt-get -y install libxine2-dev libv4l-dev sudo apt-get -y install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev sudo apt-get -y install qt5-default libgtk2.0-dev libtbb-dev sudo apt-get -y install libatlas-base-dev sudo apt-get -y install libfaac-dev libmp3lame-dev libtheora-dev sudo apt-get -y install libvorbis-dev libxvidcore-dev sudo apt-get -y install libopencore-amrnb-dev libopencore-amrwb-dev sudo apt-get -y install x264 v4l-utils sudo apt-get install -y gcc-5 g+±5

// Optional sudo apt-get -y install libprotobuf-dev protobuf-compiler sudo apt-get -y install libgoogle-glog-dev libgflags-dev sudo apt-get -y install libgphoto2-dev libeigen3-dev libhdf5-dev doxygen

// download opencv-3.3.1 wget -O unzip

// download opencv_corntib-3.3.1 wget -O unzip

cd opencv-3.3.1 mkdir release cd release

// compile and install export CC=/usr/bin/gcc-5 export CXX=/usr/bin/g+±5 cmake -D CMAKE_BUILD_TYPE=RELEASE
-D OPENCV_EXTRA_MODULES_PATH=…/…/opencv_contrib-3.3.1/modules

// Build with all cores make “-j$(nproc)”

sudo make install sudo sh -c ‘echo “/usr/local/lib” >> /etc/’ sudo ldconfig