josemariaruiz / easy-opencv

Fabric script for installing OpenCV correctly in Ubuntu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

easy-opencv

Why?

Installing OpenCV correctly in Ubuntu is a hell.

This is why I have created this Fabric script for setting the right dependencies and compiling OpenCV from sources.

It's far from perfect but good starting point for having OpenCV installed.

I don't remember exactly all the websites I've read to get to this final script but thanks to all the Open Source community for their blogs, forums and documentation.

How

This installation guide will use PIP and not the standard packages of Ubuntu. You need to install:

  • setuptools -- sudo apt-get install python-setuptools
  • .pip -- sudo easy-install pip
  • .fabric -- sudo pip install fabric

Once you have these three packages installed you will be can enter into the directory where you cloned this repository and just execute:

$ fab -l

Fabric tasks for installing an updated and completely functional version of OpenCV in Ubuntu.

Available commands:

    cmake
    compile
    compile_opencv
    download_opencv
    ffmpeg                  Remove the default ubuntu packages of ffmpeg and install the la...
    full_install
    install_ffmpeg          Install last vers...
    install_x264            Install last ve...
    remove_ffmpeg_packages
$

You will need to first install the ffmpeg library correctly from sources:

$ fab ffmpeg

And then install the OpenCV library:

$ fab full_install

If everything went right you should be able to load the cv module in python

>>> import cv
>>>

That's all :D

About

Fabric script for installing OpenCV correctly in Ubuntu