How to install openCV 2.4.13 for Python 2.7 on Ubuntu 16.04?

后端 未结 4 1648
心在旅途
心在旅途 2021-02-04 14:20

I have tried a lot of online posts to install opencv but they are not working for Ubuntu 16.04. May anyone please give me the steps to install openCV 2.4.13 on it?

4条回答
  •  忘了有多久
    2021-02-04 15:07

    sudo apt-get install build-essential cmake git pkg-config
    sudo apt-get install libjpeg8-dev libtiff4-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 libatlas-base-dev gfortran
    sudo apt-get install python2.7-dev
    sudo pip install numpy
    sudo apt-get install python-opencv
    

    Then you can have a try:

    $ python
    Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
    [GCC 4.8.4] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cv
    >>> import cv2
    
    

提交回复
热议问题