[CAUTION: Make sure you have a cuda supported GPU and already installed cuda libraries on your machine. If you want to setup opencv without cuda support, please refer to this tutorial: http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/]
- Update your existing libraries and dependencies
$ sudo apt-get update
$ sudo apt-get upgrade
- Remove any previous installations of x264