Old OpenCV headers have deprecation warning and have to add two path to additional include directories for version of OpenCV 2. Better to have #ifdef switch (will be set to previous release of OpenCV to not to lose backward compatibility)