Ubuntu16.04 Opencv source code installation and solution (Tutorial), opencvcv2

Source: Internet
Author: User

Ubuntu16.04 Opencv source code installation and solution (Tutorial), opencvcv2

Ubuntu16.04 Opencv source code installation and Solution to the Problem of failure to import cv2 (Tutorial)

# Step 1 # Install dependencies (too many dependencies, replace them accordingly) sudo apt-get-y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libjasper-dev libavcodec-dev libavformat -dev libswscale-dev kernel-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-libdev xvidcore-dev x264 v4l-utils unzip sudo apt-get-y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libjasper-dev libavcodec-dev libavformat -dev libswscale-dev kernel-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-libdev xvidcore-dev x264 v4l-utils unzip -- fix-missing # step 2 # download and unpackage wget https://github.com/Itseez/opencv/archive/3.0.0-alpha.zipunzip Opencv-3.0.0-alpha.zip # step 3 # compile cd opencv-3.0.0-alphamkdir buildcd buildcmake-D CMAKE_BUILD_TYPE = RELEASE-D CMAKE_INSTALL_PREFIX =/usr/local-D WITH_TBB = ON-d release = ON-D WITH_V4L = ON-D WITH_QT = ON-D WITH_OPENGL = ON .. # step 4 # install make sudo make install # step 5 # the installation is complete, sudo/bin/bash-c 'echo "/usr/local/lib">/etc/ld. so. conf. d/opencv. conf 'sudo ldconfigsudo apt-get update

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.