{"id":987,"date":"2016-12-18T23:35:59","date_gmt":"2016-12-19T04:35:59","guid":{"rendered":"http:\/\/xfloyd.net\/blog\/?p=987"},"modified":"2017-05-09T23:05:57","modified_gmt":"2017-05-10T04:05:57","slug":"installing-opencv-3-1-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/xfloyd.net\/blog\/?p=987","title":{"rendered":"Installing OpenCV 3.1 on Ubuntu 16.04"},"content":{"rendered":"<p>How to install OpenCV 3.1 on Ubuntu 16.04<\/p>\n<p><!--more--><br \/>\n<pre><code ><br \/>\n# INSTALL THE DEPENDENCIES<\/p>\n<p># Build tools:<br \/>\nsudo apt-get install -y build-essential cmake<\/p>\n<p># GUI (if you want to use GTK instead of Qt, replace 'qt5-default' with 'libgtkglext1-dev' and remove '-DWITH_QT=ON' option in CMake):<br \/>\nsudo apt-get install -y qt5-default libvtk6-dev<\/p>\n<p># Media I\/O:<br \/>\nsudo apt-get install -y zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev<\/p>\n<p># Video I\/O:<br \/>\n# sudo apt-get install -y libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev yasm libopencore-amrnb-dev libopencore-amrwb-dev libv4l-dev libxine2-dev<\/p>\n<p># Parallelism and linear algebra libraries:<br \/>\nsudo apt-get install -y libtbb-dev libeigen3-dev<\/p>\n<p># Documentation:<br \/>\n# sudo apt-get install -y doxygen<\/p>\n<p># INSTALL THE LIBRARY (YOU CAN CHANGE '3.1.0' FOR THE LAST STABLE VERSION)<\/p>\n<p>sudo apt-get install -y unzip wget<br \/>\nwget https:\/\/github.com\/opencv\/opencv\/archive\/3.1.0.zip<br \/>\nunzip 3.1.0.zip<br \/>\nrm 3.1.0.zip<br \/>\nmv opencv-3.1.0 OpenCV<br \/>\ncd OpenCV<br \/>\nmkdir build<br \/>\ncd build<br \/>\ncmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON ..<br \/>\nmake -j4<br \/>\nsudo make install<br \/>\nsudo ldconfig<\/p>\n<p><\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to install OpenCV 3.1 on Ubuntu 16.04<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/987"}],"collection":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=987"}],"version-history":[{"count":4,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/987\/revisions"}],"predecessor-version":[{"id":1015,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/987\/revisions\/1015"}],"wp:attachment":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}