Script for OpenCV 2.4.5 (tested on Ubuntu 12.10)