Instalando OpenCV no Ubuntu “from source”

A base teste tutorial encontra-se no site Opencv em https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html

Mas tem um excelente resumo aqui: http://answers.opencv.org/question/89075/no-makefile-to-build-after-cmake/

sudo apt-get install -y unzip wget
wget https://github.com/Itseez/opencv/archive/master.zip
unzip master.zip
rm master.zip

cd opencv-master
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo ldconfig

Importante notar que se voce esta usando o Jupyter Notebook é preciso (talvez) incluir um novo kernel do virtualenv

Veja: https://stackoverflow.com/questions/37891550/jupyter-notebook-running-kernel-in-different-env

source activate ENVNAME
pip install ipykernel
python -m ipykernel install --user --name ENVNAME --display-name "Python (nome que aparece no Jup. Notebook)"