This guide goes over the installation of OpenCV 3 on Ubuntu.

Install OpenCV 3.0 and Python 2.7+ on Ubuntu